PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jul 20, 2018 8:23 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
PostPosted: Fri Apr 29, 2016 1:27 pm 
Offline

Joined: Fri Apr 29, 2016 10:59 am
Posts: 5
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.


Attachments:
File DPF.7z [105.82 KiB]
Downloaded 120 times
Top
 Profile  
 
PostPosted: Thu May 05, 2016 8:09 am 
Offline

Joined: Fri Apr 29, 2016 10:59 am
Posts: 5
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. :(


Top
 Profile  
 
PostPosted: Wed May 11, 2016 7:43 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2829
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
 
PostPosted: Wed May 11, 2016 7:54 am 
Offline

Joined: Fri Apr 29, 2016 10:59 am
Posts: 5
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.


Attachments:
Desktop.zip [210.46 KiB]
Downloaded 112 times
Top
 Profile  
 
PostPosted: Thu May 12, 2016 8:55 am 
Offline

Joined: Fri Apr 29, 2016 10:59 am
Posts: 5
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.


Top
 Profile  
 
PostPosted: Thu May 12, 2016 11:45 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2829
Location: Cologne, Germany
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".

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
 
PostPosted: Thu May 12, 2016 12:42 pm 
Offline

Joined: Fri Apr 29, 2016 10:59 am
Posts: 5
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


Top
 Profile  
 
PostPosted: Wed Mar 14, 2018 2:06 pm 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2829
Location: Cologne, Germany
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

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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