Getting the width of a string?
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, 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.
Getting the width of a string?
More or less along the lines of the old PXC_GetStringWidth() ?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Getting the width of a string?
Hello omascia,
The equivalent is the CalcTextSize method:
https://sdkhelp.pdf-xchange.com/vie ... lcTextSize
Though there is much more versatile method:
https://sdkhelp.pdf-xchange.com/vie ... wTextBlock
Don't forget to initialize the content creator:
Cheers,
Alex
The equivalent is the CalcTextSize method:
https://sdkhelp.pdf-xchange.com/vie ... lcTextSize
Though there is much more versatile method:
https://sdkhelp.pdf-xchange.com/vie ... wTextBlock
Don't forget to initialize the content creator:
Code: Select all
PDFXEdit.IPXC_ContentCreator CC = pdfCtl.Doc.CoreDoc.CreateContentCreator();
CC.SetFontSize(14.0f);
PDFXEdit.IColor color = auxInst.CreateColor(PDFXEdit.ColorType.ColorType_RGB);
color.SetRGB(0.0f, 0.0f, 1.0f);
CC.SetFillColorRGB(color.RGB);
color.SetRGB(1.0f, 0.0f, 0.0f);
CC.SetStrokeColorRGB(color.RGB);
PDFXEdit.IPXC_Font fnt = pdfCtl.Doc.CoreDoc.CreateNewFont2("ArialMT");
CC.SetFont(fnt);
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ