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

Split example
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1240
Page 1 of 1

Author:  charlesmarsh [ Wed Jul 07, 2010 8:31 pm ]
Post subject:  Split example

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

Author:  omrisela [ Wed Jul 07, 2010 8:42 pm ]
Post subject:  Re: Split example

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.

Author:  charlesmarsh [ Wed Jul 07, 2010 8:59 pm ]
Post subject:  Re: Split example

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.

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