PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
Help open document in DPFSharp (PdfDocument) http://forum.pdfsharp.com/viewtopic.php?f=2&t=3350 |
Page 1 of 1 |
Author: | Frost661 [ Fri Apr 29, 2016 1:27 pm ] | ||
Post subject: | Help open document in DPFSharp (PdfDocument) | ||
Hi. Sorry for my Eng ((( Code: try { PdfDocument inputDocument_test = PdfReader.Open(@"It's error.pdf", PdfDocumentOpenMode.Import); MessageBox.Show(inputDocument_test.PageCount.ToString()); // <- You get an error (object Reference not set to an instance of an object) } catch (Exception eeee) { MessageBox.Show(eeee.Message + "\r\n" + eeee.StackTrace); } This DPF file received from the scanner. When I open this document in Adobe reader and save it with a new name, it does not generate an error. Down, attach it's file.
|
Author: | Frost661 [ Thu May 05, 2016 8:09 am ] |
Post subject: | Re: Help open document in DPFSharp (PdfDocument) |
When you try to save the document, you receive the error: Cannot save a PDF document with no page. Code: PdfDocument inputDocument_test = PdfReader.Open(@"C:\Users\Admin\Desktop\It's error.pdf", PdfDocumentOpenMode.Import); inputDocument_test.Save("test.pdf"); And if you open a second document (It's ok.pdf), then no error. Help me plz. |
Author: | Thomas Hoevel [ Wed May 11, 2016 7:43 am ] |
Post subject: | Re: Help open document in DPFSharp (PdfDocument) |
Hi! PDF sharp currently cannot open some "exotic" PDF files. I don't know if your PDF file has this known problem or a new, unknown problem because my PC cannot handle .7z files. We intend to fix the known issue with the stable release of PDFsharp 1.50. I cannot give an ETA for that. |
Author: | Frost661 [ Wed May 11, 2016 7:54 am ] | ||
Post subject: | Re: Help open document in DPFSharp (PdfDocument) | ||
Thomas Hoevel wrote: Hi!
PDF sharp currently cannot open some "exotic" PDF files. I don't know if your PDF file has this known problem or a new, unknown problem because my PC cannot handle .7z files. We intend to fix the known issue with the stable release of PDFsharp 1.50. I cannot give an ETA for that.
|
Author: | Frost661 [ Thu May 12, 2016 8:55 am ] |
Post subject: | Re: Help open document in DPFSharp (PdfDocument) |
Thomas Hoevel wrote: Hi! PDF sharp currently cannot open some "exotic" PDF files. I don't know if your PDF file has this known problem or a new, unknown problem because my PC cannot handle .7z files. We intend to fix the known issue with the stable release of PDFsharp 1.50. I cannot give an ETA for that. Hi. Version PDF file in both 1.3 (Acrobat 4.x). I noticed the only difference between the files is: Code: Fast web view : (Yes or No) Where there error Fast web view : No. |
Author: | Thomas Hoevel [ Thu May 12, 2016 11:45 am ] |
Post subject: | Re: Help open document in DPFSharp (PdfDocument) |
There are many differences under the hood. "Fast web view" is not a problem. I can replicate the problem and will add it to the TO DO list for "PDFsharp 1.50 stable". |
Author: | Frost661 [ Thu May 12, 2016 12:42 pm ] |
Post subject: | Re: Help open document in DPFSharp (PdfDocument) |
Thomas Hoevel wrote: There are many differences under the hood. "Fast web view" is not a problem. I can replicate the problem and will add it to the TO DO list for "PDFsharp 1.50 stable". Promlem is -> Linearized |
Author: | Thomas Hoevel [ Wed Mar 14, 2018 2:06 pm ] |
Post subject: | Re: Help open document in DPFSharp (PdfDocument) |
Frost661 wrote: Promlem is -> Linearized No.Problem is the declaration of the XRef table as "xref 1 7". Change this with a binary editor to show "xref 0 7" and everything works fine. PDFsharp does not find any pages because it blindly trusts the entries of the corrupt XRef table. The PDF file is corrupt (as I understand the Adobe PDF Reference), but PDFsharp could show a better error message or maybe even ignore the wrong entries. Same problem also discussed here: viewtopic.php?p=11487#p11487 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |