PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Nov 27, 2020 6:00 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: Older PDF Files
PostPosted: Tue Nov 17, 2020 2:46 am 
Offline

Joined: Tue Nov 17, 2020 2:40 am
Posts: 2
I have PDF files that have "no trailer". I need to load them and merge them with other PDF files then write a composite file.

IS there a way to load these ignoring the no trailer exception/error and have them load so I can use them?

Loading using:
PdfDocument inputDocument = PdfReader.Open(file, PdfDocumentOpenMode.Import);

The PDFs are version 1.3 and possibly 1.4. IS there a load I can do to get it loaded or a repair using just PdfSharp so I can automate this?

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Older PDF Files
PostPosted: Tue Nov 17, 2020 7:23 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 592
Location: CCAA
If Adobe Reader can open the files then iTextSharp probably also can.

Maybe you can modify PDFsharp so those files also open with PDFsharp. But "out of the box" it will most likely not work.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
 Post subject: Re: Older PDF Files
PostPosted: Tue Nov 17, 2020 3:57 pm 
Offline

Joined: Tue Nov 17, 2020 2:40 am
Posts: 2
TH-Soft wrote:
If Adobe Reader can open the files then iTextSharp probably also can.

Maybe you can modify PDFsharp so those files also open with PDFsharp. But "out of the box" it will most likely not work.


I was hoping not to have to alter the code but if that's the way forward I'll do it. Was hoping I could just eat the exception and continue trucking on. But I don't think the file is actually loaded when this exception is thrown.


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 17 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