Force font embedding in Editor  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Force font embedding in Editor

Post by DIV »

Could I please request a clarification on the font-embedding behaviour of PDF-XChange Editor?

I have PDF-XChange Editor version 6.0 (Build 319.0).

This query was prompted by my experience trying to add a 'typewriter text' annotation to an existing PDF using the Typewriter Tool from the toolbar.

This document already contained two embedded font subsets (Arial and Arial-Bold).
For consistency with previously annotated PDF's (done using Adobe Acrobat Standard version 7), I wanted to choose a specific serif font for my new 'typewriter text' annotation. As that serif font would not be available on all users' devices, I wanted to keep it embedded — just as Acrobat 's 'text box' tool had done by default.

Unfortunately, when I added the annotation in Editor, when I saved it the serif font was not embedded at all — although at least the other two embedded subsets were retained. Nor could I subsequently find any options to force embedding of the font when saving.

I tried also another workflow:
1. Open in Acrobat and add the annotation in the desired font (but at the wrong font size). Save to new file: three font subsets were embedded, including the chosen serif font.
2. Open in Editor and amend the annotation by shrinking the font size (no change to the font style).
3. Then, in Editor, either of the following
(a) Save to another new file: embedding of the serif font is lost.
(b) Choose "Save as Optimized...", tick the "Fonts" option, and leave all three fonts in the 'retain' pane: embedding of the serif font is still lost.

Possibly one factor is that I do have the particular serif font as a system font — i.e. installed into Windows 8.1. Perhaps if it were not installed, then Editor would keep the embedding. (Although it would be entirely impractical to have to uninstall fonts in order to retain embedding!!) But I am most puzzled over why the "Save as optimized..." dialogue box seemed to ignore my settings and still unembedded one font.

I suppose it might be possible to try printing from Editor to Lite, and try to retain the fonts there. I haven't tried it: it would be an awkward workflow, and I feel that the PDF structure would be altered in the process (one example is that 'bookmarks' would surely be lost).

As a more general follow-up question, is there any post-hoc way of embedding (installed) fonts or font subsets into existing PDF files? I realise that Editor is described as having only "limited" "Font Embedding options", whereas Standard and PRO have "Complete Font Embedding control". So is that type of feature available in PDF-XChange Standard? If so, then I realise that each product has different features. On the other hand, if it isn't, I suggest/request adding that ability to at least one of your products, as surely it would be useful.
Example scenario: Some legacy PDF files exist that were created by you or within your organisation; the source documents are no longer/not readily available. The PDF files use funky fonts that are still installed on your system, but not common outside; yet no fonts were embedded in the PDF files. In order for the PDF files to be properly readable (as originally intended), they should have the necessary fonts (or font subsets) embedded. Is it too late?
BTW: It is a little-known fact that fonts also exist in different versions, but I think we can safely assume that it's generally better in the above sort of situation to 'risk' embedding a slightly different version of a font, rather than to have no font embedded.

Thank-you,
DIV
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Force font embedding in Editor

Post by TrackerSupp-Daniel »

Hello Div,

Currently the Editor is not capable of Embedding fonts directly, only our Standard Printer (included with PRO) can accomplish this.

It is a feature we are working on already, but there is no timeline or guarantee for when it will be complete. Currently the only method to embed a font is as you suggested printing it to PDF from out Standard Printer. Printing PDF to PDF does once again, come with its own set of difficulties, such as flattening comments and form fields in some cases, and eventual document corruption. As you are well aware, it is general not a good idea. The Save as Optimized function is only able to Unembed existing fonts, not add in new ones, which is where the confusion is coming from there.

In the future when this feature is functional, the fonts will of course need to be installed on your PC to be embedded, so there is no worry about needing to remove them there. This will also allow for the "Post-hoc" embedding of fonts you are looking for.

Best Regards,

P.S. As fun as BBCode is to play with, please refrain from using smaller than default sizes, It can become difficult to read anything lower than 90% text size.
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
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Re: Force font embedding in Editor

Post by DIV »

TrackerSupp-Daniel wrote:The Save as Optimized function is only able to Unembed existing fonts, not add in new ones, which is where the confusion is coming from there.
Hello, Daniel.

I appreciate from your explanation that it is currently not possible to newly embed a font (or subset) with Editor.

However I am still puzzled as to why Editor is choosing to unembed one of the three already-embedded fonts in this PDF file.
It chose to retain embedding of fonts used in the original text, but unembedded the serif font I'd used (in Acrobat) to add a text-box annotation.

Regards,
DIV

P.S. Yes, it is fun. Sorry if it was difficult to read: sizing was based loosely on importance.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Force font embedding in Editor

Post by TrackerSupp-Daniel »

Hello Div,

The Editor should not be removing any embedded fonts unless you have used the optimize function to manually remove them. Could I ask you to send a copy of this document before the font would be removed so that we can run some tests?
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
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

Re: Force font embedding in Editor

Post by Willy Van Nuffel »

Just for your information...

To embed fonts in your PDF-document via PDF-XChange Editor:
- Open the PDF
- Click File > Save As > Save As Type = PDF/A Document + "Save" (the fonts used in the document will be embedded)
- Close and re-open the PDF
- Click "Enable editing" and confirm via "Yes"
- Just click File > Save, to save the document once again (it will again be saved as a classic "PDF Document", but the fonts will keep embedded)

Regards.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Force font embedding in Editor

Post by TrackerSupp-Daniel »

That is an excellent point Willy!
I completely forgot about the archival formats doing this innately. Thank you for bring it up :)

Div, can you let us know if that works, and also, if following this still leads to that one font being removed?
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
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Re: Force font embedding in Editor

Post by DIV »

Many thanks, Willy, your suggestion has solved the problem!

Finding the PDF/A file-type option
While I am moderately familiar with PDF/A, I couldn't find how — or where — to set it!
My expectation was that any PDF/A setting would be specified under the Options button. As the Options button was ('strangely') always greyed out for me, it seemed that I was unable to set this. Even from Willy's accurate instructions I still struggled to overcome my preconceptions about where I would specify PDF/A — to the extent that I even looked up "Save Options" in the online Editor product manual, and still, with both of these resources, it took a couple of minutes for me to find the setting. I really don't think of "PDF/A" as something that would not be included in the default File Type, which is "PDF Documents (*.PDF)". In my thinking, files saved with PDF/A are still a type of PDF document, and typically still follow the *.PDF filename-extension pattern!
So I would prefer either:
  • Having the Options button always available, and when PDF is selected as Type, the Options will lead to the PDF/A settings, with an extra tick-box to enable PDF/A or — more simply — an additional option of "None" under the "Choose conformance" drop-down menu.
  • Renaming the "PDF" Type to "Non-archival PDF Documents (*.PDF)" or similar. However, that already sounds clunky to me, so I think the first option is better.
Using PDF/A
I can confirm that using PDF/A I was able to
  • retain already-embedded fonts;
  • add not-yet-embedded fonts.
Therefore this was successful in achieving font embedding in several different workflows:
  • Add annotation using the Typewriter Tool in Editor & save as PDF/A (embedding all fonts).
  • Add text-box annotation in Acrobat & save (embedding all fonts); then resize annotation in Editor & save as PDF/A (embedding all fonts).
  • [Optional actions outside Editor]; [optional actions inside Editor] & save as regular PDF in Editor (omitting some fonts); [optional actions inside Editor] & save as PDF/A in Editor (embedding all fonts).
In all of these cases, saving as PDF/A can (optionally) display a report, which stated
Fixes (8):
...
Font Courier Std was fixed: embed fontfile (4):
Object type: GE
...

By the way, there was one small quirk I noticed. After choosing Save As, the name of the file still open in Editor was unchanged, and an asterisk still appeared beside its (old) name in the viewer, indicating that it hadn't been Saved.
I guess there is no universal convention on software behaviour on this point. I was more expecting the Saved As name to now appear in the viewer (without asterisk), but I don't mind the actual behaviour.



Unembedding of serif font used in annotation
Previously I had thought that the serif font was unembedded by Editor upon saving. However, I was mistaken: it seems to happen immediately upon any sort of substantive editing of the text.
Specifically, the embedded font was removed immediately upon: deleting a word, adding an existing character, overtyping an existing character; adding a new character; choosing a smaller font size (and [optionally] immediately resizing to the original size [not with Undo]) in the annotation.

It doesn't seem that the same thing happens if I try the same actions on the 'ordinary text' in the document: i.e. those fonts are retained, even after substantive editing of that text. (I have also confirmed that independently in a second PDF document.)

I have attached a cut-down version of the file for reference. (One more "Arial" font was embedded as a result of my modifications before uploading.) As noted before, the font used in the annotation at the top-left of the page is installed on my system: behaviour may vary if the font is not installed.

Regards,
David
Attachments
Towards_n_censored.pdf
(488.3 KiB) Downloaded 93 times
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Force font embedding in Editor

Post by TrackerSupp-Daniel »

Hello Div,
Thank you for getting back to us!

For the unembedding issue, Thank you for the example file and detailed description, I have reproduced this and have created a bug report for the Dev team, for reference this is:
RT#4563: Font subsitution error
Any member of our support staff can look up the status of this ticket for you whenever you ask. In the meantime, I apologize for the inconvenience.

I am glad to hear that embedding is working for you now, and am sorry that the dialog options menu was a bit confusing. It is unlikely to change as this has been done for a very long time and it would likely be jarring for the vast majority of users who are used to this handling. If we see more requests for this handling to be changed however we may consider it.

As for this:
DIV² wrote:By the way, there was one small quirk I noticed. After choosing Save As, the name of the file still open in Editor was unchanged, and an asterisk still appeared beside its (old) name in the viewer, indicating that it hadn't been Saved.
That is intended, When saving as a PDF/A document the newly saved file is not immediately opened for editing, this is becuase PDF/A is intended for archival purposes and it is assumed you are archiving it at this point, not continuing to Edit it. Thus the file you are looking at is actually still the modified original file, which as the asterisk points out, indeed still has not been saved.

I hope this all helps!
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
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Re: Force font embedding in Editor

Post by DIV »

Hi, Daniel & Willy.

It sounds like everything is now either resolved or in the process of being resolved. Thank-you.

If my feedback could help improve the product, I would be pleased.
Of course on such a forum as this it is usual that from time to time people will post about problems they're encountering. Irrespective of that, I still appreciate the strengths of your software and the effort that has gone into developing it.

Regards,
David
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Force font embedding in Editor

Post by TrackerSupp-Daniel »

Hello Div,

We appreciate any feedback from our users, and be it feature requests or bug fixes, the vast majority of them see some form of action fairly soon after being mentioned.
So thank you once again for being a loyal customer.

Best 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
Emirena
User
Posts: 1
Joined: Wed Sep 11, 2019 1:43 am

Re: Force font embedding in Editor

Post by Emirena »

This trick worked like a charm for all display text - however, did not work with form text field font settings once the form's existing text was changed... is this possible?

To use an embedded font with form entry in text field?

Willy Van Nuffel wrote: Thu Nov 22, 2018 9:49 pm Just for your information...

To embed fonts in your PDF-document via PDF-XChange Editor:
- Open the PDF
- Click File > Save As > Save As Type = PDF/A Document + "Save" (the fonts used in the document will be embedded)
- Close and re-open the PDF
- Click "Enable editing" and confirm via "Yes"
- Just click File > Save, to save the document once again (it will again be saved as a classic "PDF Document", but the fonts will keep embedded)

Regards.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Force font embedding in Editor

Post by TrackerSupp-Daniel »

Hello Emirena,

Unfortunately it is not possible to make form fields use embedded fonts currently. You will need to ensure that your form fields use universally available fonts, such as Arial and Times New Roman.

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
DIV
User
Posts: 252
Joined: Fri Jun 23, 2017 1:47 am

Re: Force font embedding in Editor

Post by DIV »

Hello, Daniel.

Is that a 'universal' limitation, as part of the official PDF (or PDF/A) specification, or does it depend upon implementation in the software application?

—DIV
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Force font embedding in Editor  SOLVED

Post by Tracker Supp-Stefan »

Hello Div,

I've spoken with one of our devs and they told me that technically it's not forbidden to use fonts already embedded in the file for form fields, and we will do so when an embedded font is available.
And we will see what can be done so that you can tell the Editor you want to embed some or all fonts used in a document's form fields, as currently such a feature does not exist.

The only way to currently force a font to be embedded with the Editor is the PDF/A route discussed above.

If you want to keep a font embedded - I can think of the following possible workaround:
You can create an invisible "The quick brown fox jumps over the lazy dog! 1234567890" string as base content and format it with the desired font before you make the file PDF/A. This way when you later modify the form fields - you will still have (invisible) text in the desired font as part of the base content, and the Editor will remember and keep that embedded.
This will obviously not be quite practical for East Asian fonts with their thousands of symbols though!

Regards,
Stefan
Post Reply