PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 7:12 pm

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: "Custom" blank page.
PostPosted: Thu Oct 11, 2018 8:54 am 
Offline

Joined: Thu Oct 11, 2018 8:37 am
Posts: 5
Hi there,
thanks to a previous post in this forum, I've found an "easy" solution for a problem I have in the generation of a PDF.
When a section end on a even page, I need to add a blank page to let the new one begin in a odd page.
That's "easy" thanks to the Section.PageSetup.SectionStart set to BreakOddPage, but I need to modify this "blank page" adding some text/header/footer (a classic "page intentionally left blank" stuff).
But I didn't found a way to do that.
Do you have any suggestions over this :roll: ?

Thanks a lot!

Best regards.


Top
 Profile  
Reply with quote  
 Post subject: Re: "Custom" blank page.
PostPosted: Thu Oct 11, 2018 9:28 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Hi!
Anandir wrote:
Do you have any suggestions over this?
When you create the PDF page by page as shown in this sample you can also obtain a list of document elements on that page.

Each document element has a member "Tag" for your use. You can e.g. add an empty paragraph with zero height and the tag "Last Paragraph" to each section.
If you encounter a page without elements and the previous page contained the "Last Paragraph" tag then use PDFsharp to draw the "This page was intentionally left blank" message.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: "Custom" blank page.
PostPosted: Thu Oct 11, 2018 9:33 am 
Offline

Joined: Thu Oct 11, 2018 8:37 am
Posts: 5
Thomas Hoevel wrote:
When you create the PDF page by page as shown in this sample you can also obtain a list of document elements on that page.

Each document element has a member "Tag" for your use. You can e.g. add an empty paragraph with zero height and the tag "Last Paragraph" to each section.
If you encounter a page without elements and the previous page contained the "Last Paragraph" tag then use PDFsharp to draw the "This page was intentionally left blank" message.


Funny thing? I've already used the "Tag" field in different part of the code exactly for this use :| . So, basically, I just to follow the path I already using :facepalm: .

Thanks a lot :D :D !!


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