*SOLVED* Pdf Editor Displaying Poor Number Formatting
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: 12
- Joined: Wed Apr 07, 2021 5:24 pm
*SOLVED* Pdf Editor Displaying Poor Number Formatting
Hi there,
I have a custom calculator application that is embedded into the pdf editor.
The issue I am having is with copying the output into the pdf editor.
The output looks great in the app, and if you copy and paste the text into notepad it is formatted nicely like
so:
But when I paste the same output into the pdf editor, the numbers are all out of place and the format looks bad:
As you can see in the second image the numbers do not line up at all, the addition symbols are all over the place, etc.
Is there any way I could fix this somehow? It is important for the user to have these numbers formatted properly into their pdf documents.
Thanks,
Sam
I have a custom calculator application that is embedded into the pdf editor.
The issue I am having is with copying the output into the pdf editor.
The output looks great in the app, and if you copy and paste the text into notepad it is formatted nicely like
so:
But when I paste the same output into the pdf editor, the numbers are all out of place and the format looks bad:
As you can see in the second image the numbers do not line up at all, the addition symbols are all over the place, etc.
Is there any way I could fix this somehow? It is important for the user to have these numbers formatted properly into their pdf documents.
Thanks,
Sam
Last edited by sherron_docit on Fri Dec 10, 2021 9:18 pm, edited 1 time in total.
-
- Site Admin
- Posts: 8624
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Pdf Editor Displaying Poor Number Formatting
Hello, sherron_docit
This is not a case of poor formatting, but a case of the default font you are using not having a unified size for every character. In your notepad application, it appears you are using "Consolas" but in the Editor, you are instead using what appears to be "Arial". You can change the default font for text content by following the steps here: https://www.pdf-xchange.com/knowle ... nge-Editor
Kind regards,
This is not a case of poor formatting, but a case of the default font you are using not having a unified size for every character. In your notepad application, it appears you are using "Consolas" but in the Editor, you are instead using what appears to be "Arial". You can change the default font for text content by following the steps here: https://www.pdf-xchange.com/knowle ... nge-Editor
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Pdf Editor Displaying Poor Number Formatting
Hi Sam.
It depends what kind of data puts your embedded calculator to the clipboard. If just a plain text - the problem can be solved easily. But if it puts the rich-text with variable-width font specified(Arial, TimesNewRoman etc.) - there not be a good solution because our Paste obeys the rich-formatting from the clipboard.
So you may try to solve your problem using this:
pxvInst.Settings["Tools.TextBox.Style.TS.Font.Name"] = "CourierNewPSMT";
- it sets the 'Courier New' font postscript-name. This is typical monospaced font that will be user for new TextBox-comments creation. The Paste feature adds such type of comments when handles text from the clipboard..
HTH.
It depends what kind of data puts your embedded calculator to the clipboard. If just a plain text - the problem can be solved easily. But if it puts the rich-text with variable-width font specified(Arial, TimesNewRoman etc.) - there not be a good solution because our Paste obeys the rich-formatting from the clipboard.
So you may try to solve your problem using this:
pxvInst.Settings["Tools.TextBox.Style.TS.Font.Name"] = "CourierNewPSMT";
- it sets the 'Courier New' font postscript-name. This is typical monospaced font that will be user for new TextBox-comments creation. The Paste feature adds such type of comments when handles text from the clipboard..
HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 12
- Joined: Wed Apr 07, 2021 5:24 pm
Re: Pdf Editor Displaying Poor Number Formatting
Hi Vasyl,
I have tried the following:
Is there a way to set this? Possibly using pxvInst.LoadUserSettings() or pxvInst.Settings.Insert() ?
Sam
I have tried the following:
It seems that .Settings is a readonly property.Vasyl-Tracker Dev Team wrote: ↑Fri Dec 10, 2021 6:38 pm pxvInst.Settings["Tools.TextBox.Style.TS.Font.Name"] = "CourierNewPSMT";
Is there a way to set this? Possibly using pxvInst.LoadUserSettings() or pxvInst.Settings.Insert() ?
Sam
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Pdf Editor Displaying Poor Number Formatting
No, the Settings object is R/W definitely. What programming language do you use?It seems that .Settings is a readonly property.
I added the:
pdfCtl.Inst.Settings["Tools.TextBox.Style.TS.Font.Name"].v = "CourierNewPSMT";
to our FullDemo C# example-project and it works as expected...
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 12
- Joined: Wed Apr 07, 2021 5:24 pm
Re: Pdf Editor Displaying Poor Number Formatting
We use Vb.net for this project.
I modified my syntax to match yours (I was missing the .v) and it compiled.
Unfortunately when I paste text into the document it still shows 'Arial' by default.
Any ideas?
I modified my syntax to match yours (I was missing the .v) and it compiled.
Unfortunately when I paste text into the document it still shows 'Arial' by default.
Any ideas?
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Pdf Editor Displaying Poor Number Formatting
Just for additional test - copy something from notepad and then paste to editor (be sure that Font.Name is changed before paste)..
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 12
- Joined: Wed Apr 07, 2021 5:24 pm
Re: Pdf Editor Displaying Poor Number Formatting
When I create a new textbox, the font showing by default is still 'Arial'.Vasyl-Tracker Dev Team wrote: ↑Fri Dec 10, 2021 9:11 pm (be sure that Font.Name is changed before paste)
Note: This was before I pasted anything.
Sam
-
- User
- Posts: 12
- Joined: Wed Apr 07, 2021 5:24 pm
Re: Pdf Editor Displaying Poor Number Formatting
I got it Vasyl.
The issue was with the font name.
I changed this:
To this:
It is now selecting Courier New by default.
I will mark this thread as solved.
Thank you so much for your help and have a fantastic weekend!
Sam
The issue was with the font name.
I changed this:
Code: Select all
pdfCtrl.Inst.Settings.Item("Tools.TextBox.Style.TS.Font.Name").v = "CourierNewPSM"
Code: Select all
pdfCtrl.Inst.Settings.Item("Tools.TextBox.Style.TS.Font.Name").v = "CourierNew"
I will mark this thread as solved.
Thank you so much for your help and have a fantastic weekend!
Sam
-
- Site Admin
- Posts: 8624
- Joined: Wed Jan 03, 2018 6:52 pm
*SOLVED* Pdf Editor Displaying Poor Number Formatting
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: *SOLVED* Pdf Editor Displaying Poor Number Formatting
Maybe "CourierNewPSMT" ?pdfCtrl.Inst.Settings.Item("Tools.TextBox.Style.TS.Font.Name").v = "CourierNewPSM"
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.