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

Problem with PDFsharp 1.50 beta 1
https://forum.pdfsharp.net/viewtopic.php?f=3&t=3153
Page 1 of 1

Author:  Anil Raju [ Tue Jul 21, 2015 10:42 pm ]
Post subject:  Problem with PDFsharp 1.50 beta 1

Hi Thomas ,

We use PDFsharp library extensively in our application as we work alot with pdf files.

we are using version 1.32.2608.0 in our application, we recently got into an issue where when we upload certain pdf files , PDFsharp would fail to read the file throwing error message “Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6."

We used ITextSharp to change the version of the unsupported pdf file on the fly and then PDFsharp was able to read it but the final output (pdf file) generated by PSFsharp would have the content chopped off.

We got to know that iref stream issue in solved with PDFsharp version 1.50.3638.0 so we thought having a small POC to check if it fixes both issues (reading the file & chopping off the content ) . it can read the file with out any issue but it does not prevent the final output from chopping off .

I have attached the files for your refernce.

Please help us with this issue in preventing the file from chopping off the content , Its a critical one and we are trying hard to figure out a solution .

Thanks
Anil

Author:  () => true [ Wed Jul 22, 2015 6:31 am ]
Post subject:  Re: PDFsharp and MigraDoc 1.50 beta now available via NuGet

Hi!
Anil Raju wrote:
I have attached the files for your refernce.
I don't see an attachment.

Author:  Anil Raju [ Wed Jul 22, 2015 4:37 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

I could not add both the pdf as it said its in invalid format , so I took a screen shot of both the pdf and created a png image and attached it .

Please let me know if you need additional information.

Thanks
Anil

Author:  TH-Soft [ Wed Jul 22, 2015 8:54 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

Anil Raju wrote:
I could not add both the pdf as it said its in invalid format , so I took a screen shot of both the pdf and created a png image and attached it.
You can zip the PDF files and attach the ZIP file to a post.

Author:  Anil Raju [ Wed Jul 22, 2015 10:11 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

Here is the source file, which I will be reading using pdfsharp 1.5 and saving it as show below .


PdfSharp.Pdf.PdfDocument PDFDoc = PdfSharp.Pdf.IO.PdfReader.Open(path);//path is the source file location
PDFDoc.Save("some location to save new file");

Attachments:
File comment: here is the source file
Source file.rar [173.98 KiB]
Downloaded 226 times

Author:  Anil Raju [ Wed Jul 22, 2015 10:13 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

here is the final output file.

Attachments:
File comment: Here is the final output file
Final output file.rar [172.98 KiB]
Downloaded 225 times

Author:  Anil Raju [ Tue Jul 28, 2015 4:16 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

HI Thomas/Stefan,
Just following up to see if you guys could figure the problem out ?

Thanks
Anil

Author:  TH-Soft [ Tue Jul 28, 2015 9:04 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

Anil Raju wrote:
Just following up to see if you guys could figure the problem out?
I don't have a solution yet.

But I assume the workaround shown here will work (or at least will take you one step further):
viewtopic.php?p=2637#p2637

Do not modify the PDF file, create a new, blank PDF file and import the pages one by one. Hope this helps.

Author:  Anil Raju [ Tue Jul 28, 2015 9:17 pm ]
Post subject:  Re: Problem with PDFsharp 1.50 beta 1

Thank you ,Thomas .
Will Try that suggestion and see if it helps us .

Will keep you updated going further , Thanks once again :)

Thanks
Anil

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