PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Oct 17, 2017 2:48 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Sep 08, 2017 9:17 pm 
Offline

Joined: Fri Sep 08, 2017 8:55 pm
Posts: 3
This is from https://github.com/empira/PDFsharp/ which I just pulled down today. In PdfPages.cs

In the method ImportExternalPage there is a conditional compilation set that excludes Annotations from being cloned when a page is imported into a PDF document.

Code:
#if true
            // Do not deep copy annotations.
            //CloneElement(page, importPage, PdfPage.Keys.Annots, false);
#else
            // Deep copy annotations.
            CloneElement(page, importPage, PdfPage.Keys.Annots, true);
#endif


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 09, 2017 7:53 am 
Offline
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 287
Location: CCAA
Hi!

Thanks for the feedback.

How did it look in the working 1.32 code?
Should we go for "CloneElement(page, importPage, PdfPage.Keys.Annots, false);" or for "CloneElement(page, importPage, PdfPage.Keys.Annots, true);".

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 09, 2017 12:19 pm 
Offline

Joined: Fri Sep 08, 2017 8:55 pm
Posts: 3
TH-Soft wrote:
How did it look in the working 1.32 code?
Should we go for "CloneElement(page, importPage, PdfPage.Keys.Annots, false);" or for "CloneElement(page, importPage, PdfPage.Keys.Annots, true);".

I haven't looked at the 1.32 code as I am working with PDFs that can't be opened by the 1.32 version ("The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6").

I don't know which version of the code to use. That's above my pay grade. When I tested it yesterday I thought that the "false" value worked and the "true" value failed. But I can't duplicate that now.


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: No registered users and 2 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:  
Powered by phpBB® Forum Software © phpBB Group