...
>> Does anyone have experience printing PDFs from within a Java program?
>...
>> As some context, I produce my PDF file using Apache FOP (start with an XML
>> file, use an XSLT stylesheet to create XHTML, then another stylesheet to
>> generate XSL:FO, then use FOP to generate my PDF file).
>...
Hi Murray,
Thanks for the reply.
>Do you need:
> a) the ability to print *any* PDF, e.g. you somehow provide a PDF file
>to your program and it prints it, or
Ideally yes. For now, the PDFs are coming from FOP, but I'd like to be able to
print pre-existing PDF files too.
> b) do you want to print the PDF documents that you're generating via
>FOP?
Yes as well, and this would be a useful start.
>If b), then couldn't you use the FOP AWTRenderer instead of PDFRenderer? It
>implements Printable and Pageable so it should be easy to plug it into the
>printing API.
I haven't tried the AWTRenderer yet. Do you have any feel for how mature it is?
If it's like the PDFRenderer, great, but if it's like the PS renderer, then i
doubt it's worth the investigation time (at this point in time - I'm really
looking forward to the day that active development on FOP becomes visible
again!)
>If a) then the GPL jPedal might do the trick. Though you mention jPedal is
>too expensive, so I assume GPL won't work for you ...
I've looked at the GPL version of jPedal, but the problem is that only the
enterprise version seems to support printing (at least that's what I understand
from reading their website: http://www.jpedal.org/versions.html
I must confess, though, that I haven't actually downloaded jPedal and tried for
myself. If anyone out there has experience and can tell me definitively whether
the GPL version supports PDF printing, please shout! :-)
Thanks again for the suggestions, Murray.
Cheers,
Andrew