Hi Bill,
unfortunatly the implementation of the postscript interpreter is seriously limited at the moment. The good news is that some parts of it can easily extended. It is based on the postsriptviewer sample at


http://java.sun.com/products/java-media/2D/samples/

If you unpack the PostscriptViewer Demo you find several examples files that sun created. If you have the time to try things out then please test if you can find settings that can produce files the postscript interpreter processes successfully. It would be interesting if there are settings that work out of the box. It might help to try to remove some content before exporting it. Unfortunatly I do not have Adobe Illustrator.


Best regards, Carsten


Bill Ambrosini wrote:

Hello all,
I am trying to use an EPS file with iText version 1.3 and am having extreme difficulty. I have saved my eps file using Adobe Illustrator. I first had problems with iText even recognizing the .eps file until I removed the previews from the file (these are save options in Illustrator).


Once I removed the previews I had problems with iText parsing the file when saved as a level 2 eps file.

I am now saving the file without previews or thumbnails and as level 1. It still does not work. iText cannot parse the file and I get the stack trace that is at the bottom of this file (The iText error are highlighted).

What am I doing wrong? How are eps files supposed to be saved so they play nice with iText? I did read the tutorial on eps files and am using code straight from the example as a starting point.

com.lowagie.text.pdf.codec.postscript.ParseException: com.lowagie.text.pdf.codec.postscript.PainterException: Operand stack is empty

at com.lowagie.text.pdf.codec.postscript.PAParser.parse(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.PAContext.draw(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.MetaDoPS.readAll(Unknown Source)
at com.lowagie.text.ImgPostscript.readPostscript(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.addDirectImageSimple(Unknown Source)
at com.lowagie.text.pdf.PdfContentByte.addImage(Unknown Source)
at com.lowagie.text.pdf.PdfContentByte.addImage(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.addImage(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)
at com.lowagie.text.Document.add(Unknown Source)
at com.greet.RptPdfBuilder.buildWatermark(RptPdfBuilder.java:1937)
com.lowagie.text.pdf.codec.postscript.TokenMgrError: Lexical error at line 589,column 8. Encountered: "#" (35), after : ""
at com.lowagie.text.pdf.codec.postscript.PAParserTokenManager.getNextToken(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.PAParser.getToken(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.PAParser.error_skipto(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.PAParser.parse(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.PAContext.draw(Unknown Source)
at com.lowagie.text.pdf.codec.postscript.MetaDoPS.readAll(Unknown Source)
at com.lowagie.text.ImgPostscript.readPostscript(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.addDirectImageSimple(Unknown Source)
at com.lowagie.text.pdf.PdfContentByte.addImage(Unknown Source)
at com.lowagie.text.pdf.PdfContentByte.addImage(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.addImage(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)
at com.lowagie.text.Document.add(Unknown Source)
at com.greet.report.RptPdfBuilder.buildWatermark(RptPdfBuilder.java:1937)
at com.greet.RptPdfBuilder.buildReport(RptPdfBuilder.java:507)
at com.greet.idcimpl.TCPServer.run(TCPServer.java:150)(RptPdfBuilder.java:1401)


at com.greet.RptPdfBuilder.buildReport(RptPdfBuilder.java:507)
at com.greet.MsgProcessorProcessOrders.processPrintSelected(MsgProcessorProcessOrders.java:343)


at com.greet.MsgProcessorProcessOrders.processPage(MsgProcessorProcessOrders.java:146)

at com.greet.MsgProcessor.process(MsgProcessor.java:251)
at com.greet.ServerHandler.processData(ServerHandler.java:67)
at com.greet.idcimpl.TCPServer.run(TCPServer.java:150)
at java.lang.Thread.run(Thread.java:534)
Thanks,
Bill


------------------------------------------------------------------------
With MSN Spaces email straight to your blog. Upload jokes, photos and more. It's free! <http://g.msn.com/8HMAENUS/2746??PS=47575> ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20



------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to