In fact itext uses the postscript engine from
http://java.sun.com/products/java-media/2D/samples/
which knows most commands of the postscript language but not all.
You can easily showthis if you add a postscript programm like this to
your document:
PdfContentByte cb = pdfwriter.getDirectContentUnder();
cb.addImage(new ImgPostscript( ("/Helvetica-Bold findfont " +
"50 scalefont setfont " +
"/oshow" +
"{ true charpath stroke } def\n" +
"/circleofItext" +
"{ 30 15 345\n" +
"{ gsave\n" +
"rotate 0 0 moveto\n" +
"( itext) oshow\n" +
"grestore\n" +
"} for\n" +
"} def\n" +
"250 400 translate\n" +
".5 setlinewidth\n" +
"circleofItext\n" +
"showpage\n").
getBytes(), 500, 800), 500, 0, 0,
800, 0, 0);
The postscript interpreter interpretes postscript sequences no matter if
it is postscript or encapsulated postscript. Unfortunatly some commands
are missing. They can be added but it seems there is not enough interest
(or time) at the moment to do this.
Of course there is a much more complete implementation of postscript in
java at https://sourceforge.net/projects/toastscript/ that could
immediatly do a better job for postscript support in itext. However
because of being GPL there is a incompatibility in regard of the licence.
Best regards,
Carsten
Ross Presser wrote:
On Fri, 18 Nov 2005 10:39:58 +0000 (UTC), John Smith wrote:
Hi,
I was wondering if it was possible to convert any PostScript files to PDF
with the iText API. I guess the answer is no (we can only add EPS files)
but I wanted to be sure.
No, this operation is known as distillation; you want either ghostscript or
the Distiller portion of Adobe Acrobat.
When iText adds an EPS, it is actually ignoring the postscript content and
using only the bitmap preview. (Paulo, please correct me if I'm wrong.)
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions