Dear All,
https://sdkhelp.pdf-xchange.com/vie ... FontParams
I am working on adding watermark .And I use the operation "op.document.addWatermarks" to do this, however,I encounter some trouble with setting some properties of the Font dictionary.
I have listed my problems as follows:
1.As you can see from the link above,it does not mention any property like "Italic" at all.If I need to set the italic style of the font,how can I do this?
2.As you can see from the link above,there is a property "FColor" which is used to set the color of the font.But how to set it with a correct format,make me a little bit confused.
So,I want to known that how to set FColor property correctly from a RGB color instance(e.g. C# Color object).
I am waiting for your response.
Thanks.
how to set watermark font color and italic SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: how to set watermark font color and italic SOLVED
Hello kyo,
Here's how you can do this:
Cheers,
Alex
Here's how you can do this:
Code: Select all
options["Font.FColor"].v = "RGB(255,0,0)";
options["Font.Name"].v = "Arial Bold Italic";
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: how to set watermark font color and italic
Thanks very much for your sample.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: how to set watermark font color and italic
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 158
- Joined: Mon Aug 04, 2014 7:34 pm
Re: how to set watermark font color and italic
Sorry to necro an old thread, but it seemed related.
How can we set the font style if the font is generated from: this.pdf.CreateNewFont(fontName, 0, 400);
The documentation page seems to be down and I couldn't quite figure it out from the available intellisense options.
How can we set the font style if the font is generated from: this.pdf.CreateNewFont(fontName, 0, 400);
The documentation page seems to be down and I couldn't quite figure it out from the available intellisense options.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: how to set watermark font color and italic
Hello DolphinMann,
Here's an example of the italic and bold font (weight == 700 is bold by specification):
Cheers,
Alex
Here's an example of the italic and bold font (weight == 700 is bold by specification):
Code: Select all
coreDoc.CreateNewFont("Source Sans Pro", (uint)PXC_CreateFontFlags.CreateFont_Italic, 700);
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ