You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jacques-Alexandre Gerber <ge...@intalio.com> on 2000/07/01 00:04:21 UTC

Re: Borders and Postscript

I have the same problem with Acrobat Reader 4.0 under Linux. The PDF
generated by FOP appears correctly but doesn't print well. It prints
perfect when I use Acrobat Reader under Windows. It doesn't come from
FOP.

JA

COFFMAN Steven wrote:
> 
> I don't think there is a bug in FOP. I think there's a bug in
> Postscript/PDF.
> 
> If you can edit in Adobe Acrobat (or other) and save the PDF file that FOP
> originally generated and experience the same problem, then it's not FOP.
> 
> If the problem only occurs when FOP was the last thing to touch the file,
> then it's definitely FOP's fault.
> 
> I don't have a postscript printer to test my suspicions. If you could try
> this and report back to the list, it would alleviate much uncertainty.
> 
> (Plus, I'm techincally gone already)
> 
> -----Original Message-----
> From: jack jack [mailto:jack_khaki@hotmail.com]
> Sent: Friday, June 30, 2000 5:46 PM
> To: fop-dev@xml.apache.org
> Subject: Borders and Postscript
> 
> I know that this is a known bug, but are there any workarounds available for
> 
> printing to postscript when using borders/lines?  My docs (and the included
> border.fo sample) render beautifully in acroread or xpdf -- is there a good
> way to get them to the printer?
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

RE: Borders and Postscript

Posted by Andy Robinson <an...@reportlab.com>.
As someone else who struggled for a year to write
a library to make PDFs, I can maybe shed some light.
I don't have time to look at the FOP source this
month, but went through exactly the same
experiences.

Acrobat Reader works in a totally different way
to PostScript printers and Distiller.  The page
marking operators are basically "compressed
postscript", but it does not interpret Postscript
itself.  It is far more forgiving. In addition,
what the PDF spec says and what Acrobat Reader
does are only loosely related.

I was not using CVS then so I don't have all
the details, but at least two things caused such
bugs:

1. The PDF 1.2 spec says that you may have graphics
operations inside text objects (between BT and ET
operators).  PDF 1.3 bans this.  Putting graphics
inside text objects definitely causes printer
errors but works in Acroread.

2. Make sure q and Q (saveState and restoreState)
operators are matched in pairs.

I have a third bug I haven't fixed, where clipping
gives different results in AcroRead and PostScript.

What I do remember is how I fixed it.  I bought
Acrobat and did end-to-end tests - make a PDF,
export to PS, distill to PDF and compare (or look
at the error messages).  It is the same Postscript
interpreter as most printers, and it was quite
easy to do more and more minimal files until I
found the operators which were giving the
trouble.  It took a day or so to debug once I
had the testing framework.

I wish I had kept notes, but I hope this helps
someone track the bug down.

- Andy Robinson
ReportLab (www.reportlab.com)





> -----Original Message-----
> From: root@dhcp23.intalio.com [mailto:root@dhcp23.intalio.com]On Behalf
> Of Jacques-Alexandre Gerber
> Sent: Friday, June 30, 2000 11:04 PM
> To: fop-dev@xml.apache.org
> Subject: Re: Borders and Postscript
>
>
> I have the same problem with Acrobat Reader 4.0 under Linux. The PDF
> generated by FOP appears correctly but doesn't print well. It prints
> perfect when I use Acrobat Reader under Windows. It doesn't come from
> FOP.
>
> JA
>
> COFFMAN Steven wrote:
> >
> > I don't think there is a bug in FOP. I think there's a bug in
> > Postscript/PDF.
> >
> > If you can edit in Adobe Acrobat (or other) and save the PDF
> file that FOP
> > originally generated and experience the same problem, then it's not FOP.
> >
> > If the problem only occurs when FOP was the last thing to touch
> the file,
> > then it's definitely FOP's fault.
> >
> > I don't have a postscript printer to test my suspicions. If you
> could try
> > this and report back to the list, it would alleviate much uncertainty.
> >
> > (Plus, I'm techincally gone already)
> >
> > -----Original Message-----
> > From: jack jack [mailto:jack_khaki@hotmail.com]
> > Sent: Friday, June 30, 2000 5:46 PM
> > To: fop-dev@xml.apache.org
> > Subject: Borders and Postscript
> >
> > I know that this is a known bug, but are there any workarounds
> available for
> >
> > printing to postscript when using borders/lines?  My docs (and
> the included
> > border.fo sample) render beautifully in acroread or xpdf -- is
> there a good
> > way to get them to the printer?
> > ________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>