Copy multiples files to a single file in seperate pages..

W

Wg

Hi,

Trying to understand if we have a mechanism to copy multiple files
( txt files ) to a single file (say abc.txt) with each file residing
in single page. Each input file is large enough to fit into a single
page. I have tried using perl format's like $- and other mechanism in
vain.

Is there a way to insert a page character after reading each file or
seperate each file into different pages? Any suggestions other than
adding "\n" is greatly appreciated..

The goal of this exercise is to convert the single file (abc.txt) to
postscript file and then to pdf using ps2pdf utility.. Can't use cpan
modules as some of these input files contain unicode characters...

This post is more verbose but repeated as the earlier post didn't
appear in the group..

Thanks for your patience,
-Wg.
 
W

Willem

Wg wrote:
) Hi,
)
) Trying to understand if we have a mechanism to copy multiple files
) ( txt files ) to a single file (say abc.txt) with each file residing
) in single page. Each input file is large enough to fit into a single
) page. I have tried using perl format's like $- and other mechanism in
) vain.
)
) Is there a way to insert a page character after reading each file or
) seperate each file into different pages? Any suggestions other than
) adding "\n" is greatly appreciated..
)
) The goal of this exercise is to convert the single file (abc.txt) to
) postscript file and then to pdf using ps2pdf utility.. Can't use cpan
) modules as some of these input files contain unicode characters...

What utility are you using to generate the postscript file ?
That should have some kind of documentation that describes what it uses
to separate pages.

If it doesn't, bad luck. You can probably generate several postscript
files, one for each page, and then use a simple utility to put those
together into one postscript file, or even directly into a pdf.

Or if you want to do it by hand, just generate the postscript directly
from the perl script. That shouldn't be too hard, actually.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
S

smallpond

Hi,

Trying to understand if we have a mechanism to copy multiple files
( txt files ) to a single file (say abc.txt) with each file residing
in single page. Each input file is large enough to fit into a single
page. I have tried using perl format's like $- and other mechanism in
vain.

Is there a way to insert a page character after reading each file or
seperate each file into different pages? Any suggestions other than
adding "\n" is greatly appreciated..

The goal of this exercise is to convert the single file (abc.txt) to
postscript file and then to pdf using ps2pdf utility.. Can't use cpan
modules as some of these input files contain unicode characters...

This post is more verbose but repeated as the earlier post didn't
appear in the group..

Thanks for your patience,
-Wg.


You can try inserting form feed = chr(12) which some conversion
utilities will interpret as a page break according to the ASCII
chart on my pocket protector.
--S
 
J

Jürgen Exner

Wg said:
Trying to understand if we have a mechanism to copy multiple files
( txt files ) to a single file (say abc.txt) with each file residing
in single page. Each input file is large enough to fit into a single
page. I have tried using perl format's like $- and other mechanism in
vain.

Is there a way to insert a page character after reading each file or
seperate each file into different pages? Any suggestions other than
adding "\n" is greatly appreciated..

On the level of text files a FormFeed character (FF, ASCII 0x0C)
_should_ result in a page break.
The goal of this exercise is to convert the single file (abc.txt) to
postscript file and then to pdf using ps2pdf utility..

Another approach would be to convert the individual files first and then
merge the PS or even the PDF files into one large file. I am sure there
are tools to join individual PS/PDF files.
Can't use cpan
modules as some of these input files contain unicode characters...

I hope all of them are Unicode only, because I would guess you probably
would have some serious problems with the conversion to PS and PDF if
there were any non-Unicode characters in those files.
But it would be a very unusual text indeed if it consists of non-Unicode
characters only. After all somewhere I've heard that even Klingon
characters and Babylonian cuneiform are included in Unicode somewhere.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top