PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unhandled Exception

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
EmbeddedChicago



Joined: 22 Sep 2007
Posts: 1

PostPosted: Sat Sep 22, 2007 9:41 pm    Post subject: Unhandled Exception Reply with quote

Hello All. I am integrating your software in a project to add a watermark to a PDF document. Unfortunately I am not competent in C#. I get an exception (shown below) when I open *some* PDF Files. That is some PDFs are fine, others make the exception. Kind regard and a fine job on this project.

The code from the Watermark sample which causes the problem is here:

PdfDocument document = PdfReader.Open(filename);


The Error Output:

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
at PdfSharp.Pdf.PdfPages.GetKids(PdfReference iref, InheritedValues values, P
dfDictionary parent) in C:\Projects\PDF Tools\PDFSharp-1.0.898\PDFsha
rp\PdfSharp\PdfSharp.Pdf\PdfPages.cs:line 359
at PdfSharp.Pdf.PdfPages.FlattenPageTree() in C:\Projects\PDF Tool
s\PDFSharp-1.0.898\PDFsharp\PdfSharp\PdfSharp.Pdf\PdfPages.cs:line 315
at PdfSharp.Pdf.Advanced.PdfCatalog.get_Pages() in C:\Projects\PDF
Tools\PDFSharp-1.0.898\PDFsharp\PdfSharp\PdfSharp.Pdf.Advanced\PdfCatalog.cs:li
ne 102
at PdfSharp.Pdf.PdfDocument.get_Pages() in C:\Projects\PDF Tools\P
DFSharp-1.0.898\PDFsharp\PdfSharp\PdfSharp.Pdf\PdfDocument.cs:line 590
at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocument
OpenMode openmode, PdfPasswordProvider passwordProvider) in C:\Projects\PDF Tools\PDFSharp-1.0.898\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\PdfReader.cs:lin
e 388
at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOp
enMode openmode, PdfPasswordProvider provider) in C:\Projects\PDF Too
ls\PDFSharp-1.0.898\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\PdfReader.cs:line 200
at PdfSharp.Pdf.IO.PdfReader.Open(String path) in C:\Projects\PDF
Tools\PDFSharp-1.0.898\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\PdfReader.cs:line 216
at Watermark.Program.Main(String[] args) in C:\Projects\PDF Tools\
PDFSharp-1.0.898\PDFsharp\Samples C#\Watermark\Program.cs:line 81
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com