> The PdfArray passed to GetNormalizedRectangle() is null if the PdfReader 
> is used more than once

Patient: "Doctor, it hurts when I do this."
Doctor:  "Don't do that."

;)

PdfReader is not designed to be reusable.


--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 

> -----Original Message-----
> From: Keith O [mailto:[email protected]]
> Sent: Sunday, June 27, 2010 5:53 PM
> To: [email protected]
> Subject: [iText-questions] iTextSharp - problem with PdfReader
> 
> 
> Converting the chapter 6 example from the new book here:
> 
> http://itextpdf.com/examples/index.php?page=example&id=109
> 
> to C#. C# code and PDF used by PdfReader attached. An Exception is thrown:
> 
> ==========================================================================
> ==
> Unhandled Exception: System.NullReferenceException: Object reference not
> set to
> an instance of an object.
>    at iTextSharp.text.pdf.PdfReader.GetNormalizedRectangle(PdfArray box)
>    at iTextSharp.text.pdf.PdfImportedPage..ctor(PdfReaderInstance
> readerInstance
> , PdfWriter writer, Int32 pageNumber)
>    at iTextSharp.text.pdf.PdfReaderInstance.GetImportedPage(Int32
> pageNumber)
>    at iTextSharp.text.pdf.PdfCopy.GetImportedPage(PdfReader reader, Int32
> pageNumber)
>    at SelectPages.manipulateWithCopy(PdfReader reader)
>    at SelectPages.Main(String[] args)
> ==========================================================================
> ==
> 
> Also tried using the latest code from SVN, with the same result. The
> PdfArray passed to GetNormalizedRectangle() is null if the PdfReader is
> used
> more than once - if either manipulateWithStamper() or manipulateWithCopy()
> is commented out the example works. If two separate instances of PdfReader
> are used the example works. The second (and first?) book mentioned that a
> single PdfReader object must only be used with one PdfStamper object, but
> am guessing this doesn't apply here, since PdfStamper/PdfCopy are used and
> the Java example works?
> 
> Thanks, keith
> 
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON
> :WL:en-US:WM_HMP:042010_3
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.830 / Virus Database: 271.1.1/2958 - Release Date: 06/27/10
> 23:37:00

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to