Hi Bruno,

Solved - I simply removed the surrounding over.beginText(); and over.endText(); 
and the error is gone. I will have to put text on the page later, it's the next 
thing to implement. So, surrounding the image code with begin-/endText() is a 
bad idea?

Mit freundlichen Grüßen / Best regards

Robert Spielmann
IT Consultant

-- 

codecentric GmbH
Grünewalder Str. 29-31
42657 Solingen

Telefon +49 (212) 2494-322
Fax +49 (212) 2494-334
Mobil +49 (151) 14705709

E-Mail [EMAIL PROTECTED]

Internet www.codecentric.de <http://www.codecentric.de/> 

Geschäftsführer: Peter Gierse, Mirko Novakovic und Rainer Vehns
Sitz der Gesellschaft: Solingen

Registergericht: Amtsgericht Wuppertal, HRB 19214

 

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im 
> Auftrag von Bruno Lowagie
> Gesendet: Dienstag, 17. Juni 2008 16:19
> An: Post all your questions about iText here
> Betreff: Re: [iText-questions] Adding a JPG to a page causes errors
> 
> Robert Spielmann wrote:
> > Hi all,
> > 
> > I'm adding a JPG to a page using the stamper like this:
> > 
> > // Load the arrow
> > Image pfeil = Image.getInstance("templates/Pfeil_schwarz_oben.jpg");
> > 
> > // Scale the arrow (the template PDF has 300 dpi)
> > pfeil.scalePercent(((float)pfeil.getDpiX()/300)*100);
> > 
> > pfeil.setAbsolutePosition(calculated coordinates);
> > over.addImage(pfeil);
> 
> OK.
> 
> > Then I perform over.endText();
> 
> Why? Did you add any text?
> Do you have an over.beginText() anywhere?
> 
> > and continue with stamping operations for the next template pages.
> 
> So maybe you have text, maybe you haven't.
> You aren't telling us.
> If you haven't, drop the endText();
> if you have: are all the beginText() and endText() operations
> in balance?
> 
> > As soon as I open the resulting PDF file in Acrobat Reader (v8.1.2),
> > it tells me the usual cryptic "An error exists on this page." etc.
> 
> That's not cryptic to us if you indeed have an ET without a BT.
> That's an error in your PDF syntax.
> 
> > Foxit Reader says nothing,
> 
> Because Foxit is sloppy.
> 
> > and btw Acrobat Reader DOES display the page correctly.
> 
> Because Adobe did an effort to overcome the syntax error.
> (It's not fatal, but you should correct it.)
> 
> > However, I'd like to get rid of this error popup.
> 
> Correct the syntax error.
> 
> > What should I do? Might I have made some kind of mistake 
> adding the image this way?
> 
> If you're only adding an image and no text, drop the endText().
> (Why did you put it there in the first place?)
> br,
> Bruno
> 
> --------------------------------------------------------------
> -----------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Do you like iText?
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar
> 
> 
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to