PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 18, 2024 1:40 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Feb 01, 2012 1:04 pm 
Offline

Joined: Wed Feb 01, 2012 12:58 pm
Posts: 4
Hi,
I am using MigraDoc to generate PDF files in c#. I have to add an image as watermark. How to do it? I dont want to mix both PDFSharp and MigraDoc.
Have any idea?
Please help. Its urgent.

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 01, 2012 3:17 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Hi!

You can add the watermark to the page header, so it will be drawn automatically on every page.

I'd suggest using a page from a PDF file as watermark. The header can contain an image that will fill the whole page.
Just use WrapStyle.Through for that image.
See this example:
viewtopic.php?p=4370#p4370

The approach with a PDF page will work for static watermarks only.
If you want to draw varying text as watermark, better mix MigraDoc and PDFsharp.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 30 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