You'll also have to browse the content stream and remove all the references to the missing image. PdfContentParser will help you with that.
Paulo ----- Original Message ----- From: "RastaM" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, June 09, 2008 3:17 PM Subject: [iText-questions] re move image > > Hi! > > I've been trying to remove an image from a pdf using Itext. And now I am > realy stuck. I've been browsing these forums for I dont know how long.. If > anyone could help me I would be very very happy. > > This is what I've done so far: > > I have browsed my way thorugh the pdf-tree to my image I want to remove. > > And then I have removed the image using: > > PdfReader.KillIndirect(obj); > > or > > xobj.Remove(name); > > The image do disapere but when I open the pdf in the viewer i get the > 'Could > not find the XObject named img0'-message. > > How can I fix this? I've guess I missed to remove som reference some > where.. > Please help me! > > I have also tryed RemoveUnusedObjects(); after removing image. > > Thax for any help. ------------------------------------------------------------------------- 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
