PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Exception after loading pdf
https://forum.pdfsharp.net/viewtopic.php?f=3&t=1729
Page 1 of 1

Author:  tom 88 [ Mon Aug 01, 2011 1:18 pm ]
Post subject:  Exception after loading pdf

I ran into an issue when loading a particular pdf file.
I load the pdf and ask its page count. Apparantly no pages were found/loaded.
Adobe reader 9 gives me a document with 1 page though.

Code:
System.NullReferenceException occurred
  Message=Object reference not set to an instance of an object.
  Source=PdfSharp
  StackTrace:
       at PdfSharp.Pdf.PdfDocument.get_PageCount() in D:\Documents and Settings\tDebie\My Documents\Visual Studio 2010\Projects\PdfSharpBug\PdfSharp\PdfSharp.Pdf\PdfDocument.cs:line 481
  InnerException:


I prefer to send the pdf by mail, so I'll see who responds and send it to you.

Thx in advance!

Author:  Thomas Hoevel [ Mon Aug 29, 2011 1:59 pm ]
Post subject:  Re: Exception after loading pdf

I received your file and I can replicate the exception, but I can't fix it.

Stefan will have to look at it when he's back from his vacation.

The PDF file contains no information about the application that created it. Which application/library is it?

BTW: using JPEG compression (RGB) is not the best choice for that type of image (scanned invoice). Conversion to monochrome and saving as PNG reduced the file size to 114 kiB.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/