concatenating postscript files 
Author Message
 concatenating postscript files

Hi,
i had a little problem translating a html-file to ps. Because of the
size of the file and the many pictures in it i had to split it up into
several html-files, so html2ps could handle it.  Now i am stuck with 4
ps-files i cannot bring back together, because  i know to little about
ps programming. "Cat file1.ps file2.ps.....>file.ps" produces a file
with several beginnings and ends. I tried to delete what seemed to much
but it did not work.
Can someone please help me?
Thanks
 Rudi


Fri, 28 Feb 2003 04:16:38 GMT  
 concatenating postscript files

| i had a little problem translating a html-file to ps. Because of the
| size of the file and the many pictures in it i had to split it up into
| several html-files, so html2ps could handle it.  Now i am stuck with 4
| ps-files i cannot bring back together, because  i know to little about
| ps programming.

Why do you need to "bring them back together"? If all you want to do is
print them (which is pretty much what PS files are for), then just
print them one after another. The fact that there were several PS
files isn't going to matter, or even be discernible, after they're
printed.

| "Cat file1.ps file2.ps.....>file.ps" produces a file with several
| beginnings and ends.

That's not necessarily a problem in and of itself. PS files produced
by a single app usually can be concatenated that way. Did you try to
use the output file that cat produced? If so, what went wrong?

| I tried to delete what seemed to much but it did not work.

What went wrong?

| Can someone please help me?

Not until you explain exactly what it is that you want to do. It helps
to explain what you've tried, if you also explain what went wrong for
you when you tried it.

--



Fri, 28 Feb 2003 13:17:23 GMT  
 concatenating postscript files

John Doherty schrieb:

Quote:
> | Can someone please help me?

> Not until you explain exactly what it is that you want to do. It helps
> to explain what you've tried, if you also explain what went wrong for
> you when you tried it.

I agree, i should have been more acurate from the beginning. Thanks for
telling anyway.
There is this chapter from a book with about 80 pages and a lot of graphics
in it.
'html2ps' kept running 'out of memory' till i split it into 4 parts. And now
i try to put them back together, so i can print the whole thing as a
booklet.
'cat' put the first two parts together alright. I can look at it in 'gv' or
'ghostscript'. And 'cat ' also added part 3 and 4, one can tell by the size
of the file - but it is not visible (part 3 +4). Still only the first parts
are shown. (The file has more than 25 MB)
I looked at the file - where things like  %%BeginSetup and %%EndSetup;
%%Page and %%EndPageSetup are. I changed the numbers of the pages where they
started a new from "1" and i deleted lines ( in the setup area of part 3 and
4) which i thought should not be there. But it did not change anything - gv
still showed the first 20 pages.
And here i am now...

Hope this helps.
Rudi



Fri, 28 Feb 2003 19:12:43 GMT  
 concatenating postscript files
The problem you're running into is that within each .ps file, there's an EOF
delimeter which apps use to determine where the file ends. When you simply
cat several files together, each section still has an eof delimeter, so when
you open the concatenated file, the app stops at the first EOF marker it
reads, and the remaining pages aren't displayed.

What you need to use is ghostscript to concatenate the files for you. I
tried this myself for the first time this week. The command is the
following:

#>gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOUTPUTFILE=mycatfiles.ps
infile1.ps infile2.ps infile3.ps ...

read the man page for gs if you want to know what all the switches are
doing.

IMPORTANT:
the output file name must already exist before you run this command because
gs can't actually create a new file. I guess it can only append to an
existing one. All you need is to create a 0-byte file with the name of your
output file before you start (e.g., using the touch command). It took me
several tries to figure that out.


Quote:

> John Doherty schrieb:

> > | Can someone please help me?

> > Not until you explain exactly what it is that you want to do. It helps
> > to explain what you've tried, if you also explain what went wrong for
> > you when you tried it.

> I agree, i should have been more acurate from the beginning. Thanks for
> telling anyway.
> There is this chapter from a book with about 80 pages and a lot of
graphics
> in it.
> 'html2ps' kept running 'out of memory' till i split it into 4 parts. And
now
> i try to put them back together, so i can print the whole thing as a
> booklet.
> 'cat' put the first two parts together alright. I can look at it in 'gv'
or
> 'ghostscript'. And 'cat ' also added part 3 and 4, one can tell by the
size
> of the file - but it is not visible (part 3 +4). Still only the first
parts
> are shown. (The file has more than 25 MB)
> I looked at the file - where things like  %%BeginSetup and %%EndSetup;
> %%Page and %%EndPageSetup are. I changed the numbers of the pages where
they
> started a new from "1" and i deleted lines ( in the setup area of part 3
and
> 4) which i thought should not be there. But it did not change anything -
gv
> still showed the first 20 pages.
> And here i am now...

> Hope this helps.
> Rudi



Sun, 02 Mar 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Concatenate postscript-files

2. psjoin - script to concatenate PostScript files

3. Concatenating PostScript Files

4. Question on concatenating PostScript files

5. Concatenate postscript files

6. Concatenating postscript files

7. Concatenating postscript files for output.

8. Concatenating Postscript Files

9. Concatenating Postscript Files

10. Concatenate postscript files.

11. concatenate Postscript-Files

12. Concatenating PostScript files

 

 
Powered by phpBB® Forum Software