Page 1 of 1

Check if FONT exists in PDF or not

Posted: Mon Jan 09, 2023 9:10 pm
by rhd_ole
Hello,

I'm trying to find a solution that I can have a check done if a font exists in a PDF or not. We are having some issues where barcodes are not generated due to improper weights, till the update happens the only way to check this outside a manual visual inspection is to see if the font is in the file or not from what Ive found. I'd like to do the check and fail if the font isn't there.

I tried to use PitStop to try and report it or not, I'm not seeing a way to do that.

Any other suggestions?

Re: Check if FONT exists in PDF or not

Posted: Tue Jan 10, 2023 8:39 am
by JimmyHartington
I would make it by "Select font by name" and then a "Log selection" with warning or error in regards to what your needs are.

Re: Check if FONT exists in PDF or not

Posted: Tue Jan 10, 2023 8:47 am
by freddyp
"Select font by name", "Check font is embedded" is a better alternative.

Re: Check if FONT exists in PDF or not

Posted: Tue Jan 10, 2023 1:05 pm
by rhd_ole
Thanks everyone.
freddyp wrote: Tue Jan 10, 2023 8:47 am "Select font by name", "Check font is embedded" is a better alternative.
This worked great. Then for some reason I realized I could use [Stats.Font] and then used [Stats.Font] contains <FontName> and it worked. Think this will be cleaner workflow not using PS.

Thanks again!! Always keeping me thinking.

Re: Check if FONT exists in PDF or not

Posted: Wed Sep 20, 2023 5:37 am
by Jemis
Open the PDF file on Adobe Acrobat Reader > Click File > Select Properties > Click Font. To identify fonts and paragraphs in PDF files, you must use Adobe Acrobat Pro (free): geometry dash scratch Right-click on the paragraph on the PDF file > Click Edit Text & Images > Highlight the text and paragraph you want to check. and see the Format section.

Re: Check if FONT exists in PDF or not

Posted: Thu Nov 30, 2023 12:40 pm
by rhd_ole
diamond wrote: Fri Nov 17, 2023 3:32 am One way to check if a font exists in a PDF is to use Adobe Acrobat Pro.
1. Open the PDF file in Adobe Acrobat Pro.
2. Click on "Edit PDF" in the right-hand pane.
3. Select the "Edit" option from the toolbar.
4. Click on the text that uses the font you want to check.
5. Right-click on the text and select "Properties" from the context menu.
6. In the "Text Properties" dialog box, look for the "Font" section.
If the font is embedded in the PDF, it will say "Embedded" next to the font name. If it is not embedded, it will say "Not Embedded".
We were looking for an automated check vs manually checking the fonts, it was a unneeded stopping point.


For this specific case I used built in switch variables [Stats.Font] contains <FontName>. and routed depending if it existed or not.

We did something similar to report non-embedded font to the customer as well. This was done the via PitStop Sever,

1. Pitstop Action to look for non-embedded fonts.
2. Recored the font error.
3. Exported the error log
4. Picked up Log as XML
5. Set the error line XML Path as PrivateData and used it in a variable within the email template that sends out errors to clients.
6. Enjoy not having to manually do it.

Re: Check if FONT exists in PDF or not

Posted: Mon Jan 29, 2024 9:55 am
by WillyDickens
rhd_ole wrote: Thu Nov 30, 2023 12:40 pm
We were looking for an automated check vs manually checking the fonts, it was a unneeded stopping point.


For this specific case I used built in switch variables [Stats.Font] contains <FontName>. and routed depending if it existed or not.

We did something similar to report non-embedded font to the customer as well. This was done the via PitStop Severtunnel rush,

1. Pitstop Action to look for non-embedded fonts.
2. Recored the font error.
3. Exported the error log
4. Picked up Log as XML
5. Set the error line XML Path as PrivateData and used it in a variable within the email template that sends out errors to clients.
6. Enjoy not having to manually do it.

Thx. I also had the same problem and your solution helped me to fix my error.

Re: Check if FONT exists in PDF or not

Posted: Mon Jan 29, 2024 10:39 am
by freddyp
rhd_ole wrote: Thu Nov 30, 2023 12:40 pm We did something similar to report non-embedded font to the customer as well. This was done the via PitStop Sever,

1. Pitstop Action to look for non-embedded fonts.
2. Recored the font error.
3. Exported the error log
4. Picked up Log as XML
5. Set the error line XML Path as PrivateData and used it in a variable within the email template that sends out errors to clients.
6. Enjoy not having to manually do it.
I want to say something about 3 and 4: if you use a "Data with Log" output connection from the PitStop Server app the XML report is immediately attached as a dataset: no need to export and pick up. That makes the flow a bit shorter and more efficient.