PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 16, 2024 7:45 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Split example
PostPosted: Wed Jul 07, 2010 8:31 pm 
Offline

Joined: Wed Jul 07, 2010 8:27 pm
Posts: 2
When I run the sample I get the following error:
A PDF document must be opened with PdfDocumentOpenMode.Import to import pages from it.

Can you provide me with a solution. I am not sure what I am missing.

Thanks,
Charles


Top
 Profile  
Reply with quote  
 Post subject: Re: Split example
PostPosted: Wed Jul 07, 2010 8:42 pm 
Offline

Joined: Wed Jul 07, 2010 11:17 am
Posts: 9
Check the Program.cs file of this sample program.
The line of code opening the file should be:
Code:
// Open the file
PdfDocument inputDocument = PdfReader.Open(filename, PdfDocumentOpenMode.Import);


Is this the line in your file?

Try to debug the program and find the line which fails.


Top
 Profile  
Reply with quote  
 Post subject: Re: Split example
PostPosted: Wed Jul 07, 2010 8:59 pm 
Offline

Joined: Wed Jul 07, 2010 8:27 pm
Posts: 2
My mistake. I forgot to put the path where I wanted the file to go in the name and as a result it went into the program directory.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 167 guests


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 post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group