PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Nov 09, 2024 12:29 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Mon Jul 25, 2022 10:56 am 
Offline

Joined: Mon Jul 25, 2022 10:32 am
Posts: 6
Hello!

First of all, I want to thank you for your work and this excellent library!

I'm using PDFsharp latest version 1.50.5147 in a .Net Framework 4.8 C# application.

When merging multiple PDF files into one using the PdfDocument.AddPage method to insert pages into a PDF file and PdfDocument.Save to save it, PDFSharp changes the page format in output file.

For example, please see the attached image file Merge_Text_Format_Problem.png that demonstrate how line breaks are added to text that was not in the source file.
On the left side PDF file opened with Adobe Acrobat DC (64-bit). On the right side, the text copied from the PDF file in notepad++ with "Show All Characters" option.

Is there a way to merge files without changing the page format?

I have attached a console application in an archive PDFSharpMergeConsoleApp.zip with sample code that merges PDF files "TestData\\Test_File_1.pdf" and "TestData\\Test_File_2.pdf" into the resulting "Output\\Result.pdf"
You can run the application and get the result. All code is in Program.cs. The path to the resulting file is displayed in the console.

Thanks in advance for your feedback!


Attachments:
File comment: A demonstration how line breaks are added to text that was not in the source file.
Merge_Text_Format_Problem.png
Merge_Text_Format_Problem.png [ 199.08 KiB | Viewed 11740 times ]
File comment: A simple console application that merges two PDF files into one.
PDFSharpMergeConsoleApp.zip [58.46 KiB]
Downloaded 829 times
Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 04, 2022 9:00 am 
Offline

Joined: Mon Jul 25, 2022 10:32 am
Posts: 6
Hello!

Are there any updates to the question above?

Best regards,
Vitaly Kvashin


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2022 7:22 am 
Offline

Joined: Mon Jul 25, 2022 10:32 am
Posts: 6
Dear PDFsharp team,

Any updates on this topic?
It is still relevant..

Best regards,
Vitaly Kvashin


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2022 11:37 am 
Offline
PDFsharp Guru
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 1007
Location: CCAA
Hi, Vitaly,

I'm sorry, but I didn't yet find the time to debug your issue.
We're currently working on PDFsharp and I should be able to investigate this issue in this month.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 21, 2022 11:03 am 
Offline

Joined: Mon Jul 25, 2022 10:32 am
Posts: 6
Hi Thomas,

Did you have some time to debug this issue? Any updates on this one?

Best regards,
Vitaly Kvashin


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 22, 2022 9:42 am 
Offline
PDFsharp Guru
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 1007
Location: CCAA
Hi, Vitaly,
I can replicate the behaviour, but it still needs more research.

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 09, 2023 8:25 am 
Offline

Joined: Mon Jul 25, 2022 10:32 am
Posts: 6
Hi Thomas,

Nice to hear that you replicated this behavior!
Any new updates on this one?

Best regards,
Vitaly Kvashin


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 18, 2023 7:56 am 
Offline

Joined: Mon Jul 25, 2022 10:32 am
Posts: 6
Dear PDFsharp team,

Any updates on this issue?
It is still relevant.

Best regards,
Vitaly Kvashin


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group