With these it helps I could solve this using Shell Script component. After generating file I added a post process step to remove the empty line at the end of the file. There could be other solutions but this fulfilled my requirement.
When Redirecting output of a command in Tcl to file, file is getting generated in DOS format
it helps some times Tcl lets you control the line ending conversion for a channel (file handle, socket, etc.) using the chan configure command (also called fconfigure). In particular, you want to configure the -translation option to be either lf (for use line-feeds) or binary (which sets a few other things as well). Tcl ignores the setting in C stdio, as it accesses the OS directly to do I/O, and the line ending translation isn't done at that point. Put one of these in your script, depending on what exactly you're doing:
chan configure stdout -translation lf
chan configure stdout -translation binary
/* Guess what 'chan configure' is a wrapper around? */
Tcl_SetChannelOption(interp, stdoutChannel, "-translation", "binary");
Way to default the name of the generated XPS file?