PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun May 05, 2024 8:46 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
 Post subject: Watermark with MigraDoc
PostPosted: Wed May 05, 2010 8:46 pm 
Offline

Joined: Tue May 04, 2010 8:14 pm
Posts: 9
Hi,
I've been searching a way to add a watermark to my document with MigraDoc, but it only seems to be feasible with PDFSharp.
Does anyone have an idea how to do it?

Maybe I'm not doing the right thing, but I want to set an Image in my section that will use the whole page and add Text over this image.

Thanks for your help.
Simon


Top
 Profile  
Reply with quote  
PostPosted: Thu May 06, 2010 8:00 am 
Offline
PDFsharp Guru
User avatar

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

You can do this with MigraDoc: just add an image with absolute position and absolute size to every page.
That's the drawback: you must do it for every page, so you must know where pagebreaks are.

Rather use the technique shown here:
http://www.pdfsharp.net/wiki/MixMigraDo ... ample.ashx

You can use GetDocumentObjectsFromPage if you need different images for different sections.
See here:
viewtopic.php?p=1939#p1939
You can add a Tag to MigraDoc objects (e. g. Section or Paragraph) to determine which image to use.

See also:
viewtopic.php?p=1407#p1407

_________________
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: No registered users and 71 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