PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to Change Font size of Watermark Text

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
dpsubi1



Joined: 06 Mar 2008
Posts: 10
Location: Tech-Tips-Now.com

PostPosted: Fri Mar 21, 2008 6:34 am    Post subject: How to Change Font size of Watermark Text Reply with quote

Hello,

How to change the font size of Watermark Text ?

I have been using the sample C# code (PDF Sharp)

However, I am not sure how I can change/reduce the font size of the Watermark text.

I tried changing the value of the emsize, but there is no changes in font sizes.

Quote:
string watermark = WatermarkText;
const int emSize = 140;


There is no issue with watermark. I just want to reduce the font size.

BTW, I am using the 3rd method.

Please let me know.

Thanks
_________________
Subi
Back to top
View user's profile Send private message Visit poster's website
robiman



Joined: 24 Mar 2008
Posts: 1

PostPosted: Mon Mar 24, 2008 4:32 pm    Post subject: Re: How to Change Font size of Watermark Text Reply with quote

dpsubi1 wrote:
I tried changing the value of the emsize, but there is no changes in font sizes.

Quote:
string watermark = WatermarkText;
const int emSize = 140;


Well, it's pretty simple. The const "emSize" is not used for watermark size, even though it was declared (presumably) for such purpose. So you have to correct the following line:

Code:
path.AddString(watermark, font.FontFamily, XFontStyle.BoldItalic, 150, new XPoint((page.Width - size.Width) / 2, (page.Height - size.Height) / 2), XStringFormat.Default);


The "150" after XFontStyle.BoldItalic is the font size, so change this to "emSize" or just put in your value.

Perhaps the samples should also be corrected to avoid confusion?
Back to top
View user's profile Send private message
dpsubi1



Joined: 06 Mar 2008
Posts: 10
Location: Tech-Tips-Now.com

PostPosted: Tue Mar 25, 2008 3:51 am    Post subject: Reply with quote

Wow! thanks it worked great.

Thanks a lot for your help.
_________________
Subi
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com