You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Torsten Erler <To...@net-linx.com> on 2003/06/17 13:00:27 UTC

multipage postscript files

Hi all,

I've tried to insert a multipage postscript document into a pdf-document
(via external-graphic) but the result looks not as expected (only one side
was rendered and the different pages are overdrawing each to the other).
I'm afraid that the feature isn't implemented now.

Is it in maintenance, planned or has anyone already started working on this
issue???

If all is no, has anyone a pointer where (and how) to patch this up.

ThanX Torsten


RE: multipage postscript files

Posted by Torsten Erler <To...@net-linx.com>.
Really good and simple pointer (I haven't tried it with multiple input for
pdfwriter!)

ThanX it works ;)

> -----Original Message-----
> From: Leonid Kleiner [mailto:mtfleonid@fibimail.co.il]
> Sent: Dienstag, 17. Juni 2003 15:18
> To: fop-user@xml.apache.org; Torsten.Erler@net-linx.com
> Subject: Re: multipage postscript files
>
>
> Using Ghostscript you can merge 2 or more pdf files.
>
> ----- Original Message -----
> From: "Torsten Erler" <To...@net-linx.com>
> To: <fo...@xml.apache.org>
> Sent: Tuesday, June 17, 2003 2:05 PM
> Subject: RE: multipage postscript files
>
>
> > Ok Thanx Jeremias, U'r suggestions were very helpful for me.
> >
> > cu Torsten
> >
> > > -----Original Message-----
> > > From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
> > > Sent: Dienstag, 17. Juni 2003 13:54
> > > To: fop-user@xml.apache.org
> > > Subject: Re: multipage postscript files
> > >
> > >
> > >
> > > On 17.06.2003 13:47:58 Torsten Erler wrote:
> > > > The last one sounds good...
> > > >
> > > > Any other Idea (don't know whether it works):
> > > > I've tried to distill the postscript file by GhostScript
> > > and the result
> > > > looks good.
> > > > It creates a pdf site for each postcript page.
> > > > Can I append/insert the created pdf into the original one,
> > > created by FOP?
> > >
> > > Yep. A PDF postprocessor like iText can do that. See here:
> > > http://xml.apache.org/fop/resources.html#products-pdf
> > >
> > > That functionality is on the todo list for FOP's PDF library,
> > > too, but I
> > > guess it'll take a while until someone implements it.
> > >
> > > Jeremias Maerki
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: fop-user-help@xml.apache.org
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: multipage postscript files

Posted by Leonid Kleiner <mt...@fibimail.co.il>.
Using Ghostscript you can merge 2 or more pdf files.

----- Original Message ----- 
From: "Torsten Erler" <To...@net-linx.com>
To: <fo...@xml.apache.org>
Sent: Tuesday, June 17, 2003 2:05 PM
Subject: RE: multipage postscript files


> Ok Thanx Jeremias, U'r suggestions were very helpful for me.
> 
> cu Torsten
> 
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
> > Sent: Dienstag, 17. Juni 2003 13:54
> > To: fop-user@xml.apache.org
> > Subject: Re: multipage postscript files
> > 
> > 
> > 
> > On 17.06.2003 13:47:58 Torsten Erler wrote:
> > > The last one sounds good...
> > > 
> > > Any other Idea (don't know whether it works):
> > > I've tried to distill the postscript file by GhostScript 
> > and the result
> > > looks good.
> > > It creates a pdf site for each postcript page.
> > > Can I append/insert the created pdf into the original one, 
> > created by FOP?
> > 
> > Yep. A PDF postprocessor like iText can do that. See here:
> > http://xml.apache.org/fop/resources.html#products-pdf
> > 
> > That functionality is on the todo list for FOP's PDF library, 
> > too, but I
> > guess it'll take a while until someone implements it.
> > 
> > Jeremias Maerki
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: multipage postscript files

Posted by Torsten Erler <To...@net-linx.com>.
Ok Thanx Jeremias, U'r suggestions were very helpful for me.

cu Torsten

> -----Original Message-----
> From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
> Sent: Dienstag, 17. Juni 2003 13:54
> To: fop-user@xml.apache.org
> Subject: Re: multipage postscript files
> 
> 
> 
> On 17.06.2003 13:47:58 Torsten Erler wrote:
> > The last one sounds good...
> > 
> > Any other Idea (don't know whether it works):
> > I've tried to distill the postscript file by GhostScript 
> and the result
> > looks good.
> > It creates a pdf site for each postcript page.
> > Can I append/insert the created pdf into the original one, 
> created by FOP?
> 
> Yep. A PDF postprocessor like iText can do that. See here:
> http://xml.apache.org/fop/resources.html#products-pdf
> 
> That functionality is on the todo list for FOP's PDF library, 
> too, but I
> guess it'll take a while until someone implements it.
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: multipage postscript files

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 17.06.2003 13:47:58 Torsten Erler wrote:
> The last one sounds good...
> 
> Any other Idea (don't know whether it works):
> I've tried to distill the postscript file by GhostScript and the result
> looks good.
> It creates a pdf site for each postcript page.
> Can I append/insert the created pdf into the original one, created by FOP?

Yep. A PDF postprocessor like iText can do that. See here:
http://xml.apache.org/fop/resources.html#products-pdf

That functionality is on the todo list for FOP's PDF library, too, but I
guess it'll take a while until someone implements it.

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: multipage postscript files

Posted by Torsten Erler <To...@net-linx.com>.
The last one sounds good...

Any other Idea (don't know whether it works):
I've tried to distill the postscript file by GhostScript and the result
looks good.
It creates a pdf site for each postcript page.
Can I append/insert the created pdf into the original one, created by FOP?

cu and ThanX Torsten

> The other idea is to write a little Java class that parses the
> PostScript file, and splits it in three parts: header, pages
> and trailer.
> The header and trailer you store in memory and for each page
> you create
> a new PS file with the header the page x and the trailer, so you get a
> PS file for every page in the original file: myfile.ps --> myfile1.ps,
> myfile2.ps, myfile3.ps. Then you can use external-graphic to
> place every
> page on the PDF. Parsing the PS should be real simple if they are in
> ASCII-mode since you simply have to look for the DSC comments.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: multipage postscript files

Posted by Jeremias Maerki <de...@greenmail.ch>.
As I said, external-graphic is not suited to display multi-page images.
The behaviour of layouting multi-page images is not defined in the spec.

If the PostScript pages are the only content on a page and you use FOP
to basically print a header page only, then you could distill your PS
file to PDF (using GhostScript) and add the generated pages to the
header page generated in FOP using iText or something like that.

The other idea is to write a little Java class that parses the
PostScript file, and splits it in three parts: header, pages and trailer.
The header and trailer you store in memory and for each page you create
a new PS file with the header the page x and the trailer, so you get a
PS file for every page in the original file: myfile.ps --> myfile1.ps,
myfile2.ps, myfile3.ps. Then you can use external-graphic to place every
page on the PDF. Parsing the PS should be real simple if they are in
ASCII-mode since you simply have to look for the DSC comments.

Does that help?

On 17.06.2003 13:18:29 Torsten Erler wrote:
> I use FOP among other things to create customer proofs for advertisements
> sold by our system.
> 
> Now we've to implement selling of double-sided display ads (yellow pages
> etc...).
> 
> The Advertisements are stored in postscript format (also the multipage ads).
> 
> Now the proof now genereated by a stylesheet which consumes all related
> contract data (customer-data, publication-data and last but not least the
> URL's of all generated ad's).
> This ads will be inserted by <fo:external-grahic> tag.
> 
> After creating the PDF File the result will be redistilled by ghostscript to
> make the postscript content visible also in Acrobat Reader for (EMail and
> FAX Proofing). The original result can be printed on postscript printer (to
> avoid loss of quality) for sending Proofs to cusotmers by snail mail.
> 
> If I insert a multipage postscript file it sems to be the Renderer reservs
> only the space defined in the 'BoundingBox' DSC Comment for the whole
> document.
> 
> But each %%page: and %%PageBoundingBox: is ignored respectively drawed into
> the boundingbox of the whole document.
> 
> Do you know any soluition for that?
> 
> Any help would be appreciated!!


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: multipage postscript files

Posted by Torsten Erler <To...@net-linx.com>.
Hi Jeremias...

I use FOP among other things to create customer proofs for advertisements
sold by our system.

Now we've to implement selling of double-sided display ads (yellow pages
etc...).

The Advertisements are stored in postscript format (also the multipage ads).

Now the proof now genereated by a stylesheet which consumes all related
contract data (customer-data, publication-data and last but not least the
URL's of all generated ad's).
This ads will be inserted by <fo:external-grahic> tag.

After creating the PDF File the result will be redistilled by ghostscript to
make the postscript content visible also in Acrobat Reader for (EMail and
FAX Proofing). The original result can be printed on postscript printer (to
avoid loss of quality) for sending Proofs to cusotmers by snail mail.

If I insert a multipage postscript file it sems to be the Renderer reservs
only the space defined in the 'BoundingBox' DSC Comment for the whole
document.

But each %%page: and %%PageBoundingBox: is ignored respectively drawed into
the boundingbox of the whole document.

Do you know any soluition for that?

Any help would be appreciated!!

cu Torsten


> -----Original Message-----
> From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
> Sent: Dienstag, 17. Juni 2003 13:05
> To: fop-user@xml.apache.org
> Subject: Re: multipage postscript files
>
>
> That's really a new use case, you know. And external-graphic is not
> really suited to do that at all. Please tell us what exactly
> you need to
> do. Are you trying to do some kind of PS2PDF/Distiller thing? Do you
> want to append a few pages from a PostScript file to a PDF you're
> generating with FOP? I may be able to give you a few hints.
>
> On 17.06.2003 13:00:27 Torsten Erler wrote:
> > I've tried to insert a multipage postscript document into a
> pdf-document
> > (via external-graphic) but the result looks not as expected
> (only one side
> > was rendered and the different pages are overdrawing each
> to the other).
> > I'm afraid that the feature isn't implemented now.
> >
> > Is it in maintenance, planned or has anyone already started
> working on this
> > issue???
> >
> > If all is no, has anyone a pointer where (and how) to patch this up.
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: multipage postscript files

Posted by Jeremias Maerki <de...@greenmail.ch>.
That's really a new use case, you know. And external-graphic is not
really suited to do that at all. Please tell us what exactly you need to
do. Are you trying to do some kind of PS2PDF/Distiller thing? Do you
want to append a few pages from a PostScript file to a PDF you're
generating with FOP? I may be able to give you a few hints.

On 17.06.2003 13:00:27 Torsten Erler wrote:
> I've tried to insert a multipage postscript document into a pdf-document
> (via external-graphic) but the result looks not as expected (only one side
> was rendered and the different pages are overdrawing each to the other).
> I'm afraid that the feature isn't implemented now.
> 
> Is it in maintenance, planned or has anyone already started working on this
> issue???
> 
> If all is no, has anyone a pointer where (and how) to patch this up.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org