Sorry about that, Here is one of the pdfs i am having issues with. Thanks, Josh
On Dec 12, 2007 9:51 AM, Paulo Soares <[EMAIL PROTECTED]> wrote: > Post the pdf and we'll see what's going on. > > Paulo > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of Joshua Holt > > Sent: Wednesday, December 12, 2007 2:39 PM > > To: [email protected] > > Subject: [iText-questions] Expected Dict Object > > > > I am trying to add an annotation to PDFs created from scans. The the > > AcroForm object in the Reader is null. How do i get around this? > > Here is my code: > > > > > > > > private void AddAnnotation(string outputFile, byte[] data, > > string text) > > { > > > > PdfReader reader = newPdfReader( data ); > > PdfStamper stamper = new PdfStamper(reader, new > > FileStream(outputFile, FileMode.Open)); > > > > Rectangle rect = new Rectangle(200f, 25f, 400f, 40f); > > > > PdfContentByte pcb = newPdfContentByte(stamper.Writer); > > pcb.SetColorFill(iTextSharp.text.Color.BLACK); > > > > PdfAnnotation anno = > > PdfAnnotation.CreateFreeText(stamper.Writer, > > rect, > > text, pcb); > > > > anno.Flags = PdfAnnotation.FLAGS_PRINT; > > anno.Color = Color.WHITE; > > > > stamper.AddAnnotation(anno, 1); > > > > stamper.Close(); > > } > > This works fine on PDFs created with acrobat, but the ones that we > > have scanned in seem to get the error "Dict object required" after i > > atry to add the annotation. > > > > Any ideas? > > > Aviso Legal: > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter > informação confidencial ou legalmente protegida. A incorrecta transmissão > desta mensagem não significa a perca de confidencialidade. Se esta mensagem > for recebida por engano, por favor envie-a de volta para o remetente e > apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o > destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. > > Disclaimer: > This message is destined exclusively to the intended receiver. It may contain > confidential or legally protected information. The incorrect transmission of > this message does not mean the loss of its confidentiality. If this message > is received by mistake, please send it back to the sender and delete it from > your system immediately. It is forbidden to any person who is not the > intended receiver to use, distribute or copy any part of this message. > > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > 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 > Buy the iText book: http://itext.ugent.be/itext-in-action/ > >
Document (2).pdf
Description: Adobe PDF document
------------------------------------------------------------------------- SF.Net email is sponsored by: 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 Buy the iText book: http://itext.ugent.be/itext-in-action/
