Fonts & Text
If the PDF file contains characters, pdf2cad will convert them and map them as MTEXT objects in the DXF file. Unfortunately, when creating a PDF file from a CAD drawing, the text is not always retained. Sometimes it is “plotted” as pen strokes or turned into curves. When this happens, the character definition is lost. There is nothing that pdf2cad can do about this – it can only reproduce the curves (=SPLINES entities) in the DXF file. What looks like text in the original file may actually just be an object, comprised of a series of pen strokes that looks like a letter.
Tip: to see if the text in your PDF drawing is live and searchable, open the PDF file in Acrobat (Reader) and use the Text Select tool. If you cannot highlight any words, the text is already outlined to curves. If a PDF file contains searchable text, pdf2cad will reproduce it as MTEXT in the DXF file, preserving the fonts and styles.
Tip: To create a PDF with searchable text from AutoCAD, make sure to use TrueType fonts in the drawing and ensure that your printer driver is set to retain text as text instead of converting it to curves. Text can be lost in either of these two steps in creating a PDF file. See how to create a PDF file with searchable text from CAD Digest.
Tip: if your PDF files contain non-Roman font text (such as Chinese, Arabic or Cyrillic), or if the text looks garbled in the DXF output, try using the “Convert characters to curves” option in the General tab of the Options menu of pdf2cad. This outlines the text during conversion to ensure WYSIWYG rendering (not editable).
PDF Fonts Not Displaying Correctly?
Using the perfect font can make or break the impact a document has. Fonts are also complicated. If you have a PDF file which is not displaying well, it’s likely that PDF font mapping is the culprit.
A PDF document expects to have its fonts installed wherever it’s viewed. When it’s opened, the PDF matches its referenced fonts to the local system’s fonts. If all the fonts are available, the document looks great. Success relies on the set of fonts available of the viewing PC. Using standard system fonts as much as possible will help prevent font mismatches. An exception is branding, where the font used is a valuable, recognizable asset. It should never become compromised.
Listing of standard fonts by system
- The 14 standard PDF fonts are Courier (Regular, Oblique, Bold, Bold Oblique), Helvetica (Regular, Oblique, Bold, Bold Oblique), Times (Roman, Italic, Bold, Bold Italic), Symbol and ITC Zapf Dingbats.
- Fonts available on all Windows 10 systems
- Fonts included with MacOS
- Fonts included with Adobe Cloud subscriptions.
Top 5 Reasons Fonts Don’t Display Right
1. Font Substitution
When the PDF file can’t find the same font on the reader’s PC, it will choose the closest substitute. This may be almost impossible to see or very obvious. It all depends on the font chosen as a substitute. There are three basic options when dealing with font substitution:
- Accept the substitution if it’s a minor difference
- Buy the missing font and install it on your system
- Define a font-mapping (see below) if possible
Example of a font substitution with a minor difference. Adobe does a very good job when substituting fonts. They get close in most cases. Close enough that there’s no need to purchase fonts or spend a lot of time troubleshooting. In the example below, substituted text (yellow) is placed over the original embedded font text (red). The visible red marks show where the substitution deviates from the original font.
Yellow substituted font text is placed over original red embedded font text.
2. Embedding Fonts to Avoid Font Substitution not Possible
Several PDF creation tools allow you to embed fonts or font subsets. Embedded fonts travel with the PDF file and ensure accurate display on any system. Be careful because they will increase file size, usually at least doubling it. Due to license restrictions, embed fonts at your own risk. You can only embed fonts with permission. Even free, open source fonts can have restrictions. Example of Adobe’s Font Embedding Policy
A note about Visual integrity Software and Embedded Fonts. In compliance with font rules, our programs do not embed fonts by default. We reference the fonts by their names. If fonts, with the same names, are on the target PC, the file will open and display as intended. If the same fonts are not on the PC, which is much more likely, the text includes the closest allowable font. If you need fonts embedded for a project, we can do that for you as a custom service, with proof of license.
How to see what embedded fonts your document contains.
Open the PDF in either Reader or Acrobat. Bring up the document properties (Ctrl-D or Cmd-D), then go to the Fonts tab. Here, you can see the state of each font. The two examples below show the same font when it’s embedded and when it has been substituted.
3. When PDF Document Font Names Don’t Match PC Font Names, Use Font Mapping
For fonts to display as intended in a PDF file, the same font with the same name must be on both systems. Unfortunately, the exact same font may go by several different names. Arial Bold on your system, for example, may be “EHJPKB+Arial-Bold” in the original file. Even though these are identical fonts, the PDF does not know it because they have different names. You have to tell it with a PDF font mapping. In this example, map “EHJPKB_Arial-Bold” as “Arial” with font style “Bold”.
Mismatches are common. Resolve them whenever possible through font mapping. If mapping the font is not possible, it’s substituted as described above.
4. Unknown Font in the PDF Document
Ensure an exact match by converting formatted text to bezier curves. When you need a precise match, but the source font is unknown or not available, it’s best to convert the text to a graphic. This is an excellent approach for logos and other brand assets. It’s also recommended for technical text like equations and formulas. Once converted to graphics, they are no longer editable and there’s no possibility to introduce error during font substitution.
A note about Visual integrity Software and Text as Curves. Our programs offer a “Characters to Curves” option. Using it, each character renders as a bezier curve object. This graphical representation of the character uses font information stored in the PDF. If the font was not embedded in the PDF, we refer to the /fonts/ directory in the installation folder. Add Type 1 or TrueType fonts to this folder as needed to ensure a perfect match. To outline specific fonts during conversion, contact us.
5. It’s a Kerning Issue, Not a Font Issue
When PDF is converted into vector formats such as SVG or EMF, kerning may be the culprit if the text doesn’t look right. Kerning is the process of adjusting space between characters to make the text more visually appealing. This feature is only available for use with proportions fonts; not fixed width fonts. Please contact us if you need more information how to configure thus. Turning this option on could improve the WYSIWYG matching of the text strings.
Look for Font Warnings. Many programs that output PDF produce error and warning logs. Check these if you create or receive a PDF file that doesn’t look right.
Contact Us. We have 25+ years of expertise built up around PDF, file formats and fonts. We may be able to help you make sense of your font issues.
After conversion, if you can not edit text, chances are that the text was already stored as graphics in the PDF original. It was probably converted to curves or plotted as pen strokes when the PDF file was created. It is no longer text, just vector curves that look like text. This often happens for example with PDF drawings are created from CAD, EDA or GIS applications as well as with print advertisements from a DTP-package to ensure font display accurately. Text is often converted to curves to ensure accurate print results and to protect against font incompatibilities. Once the text has been turned into curves, there is no way for pdf2picture to retrieve it as real text. If the text is still searchable in the PDF file, we can produce it as editable text in the conversion output.
Tip: To see if the text is searchable and convertable or not, open your PDF file in Acrobat Reader and try to “Select” some text. If you can mark it, you can convert it.
Try deselecting the “Convert Characters to Strings” option in the General tab of the Options menu. Doing so will carefully place every character individually in the output instead of trying to recreate the actual words as objects. This option is turned on by default to combine individual characters into words and words into lines during conversion. This is a nice option to ease editing when it works but is dependent on the perfect alignment of inbound text. When turned off, every character will be placed precisely as it was in the original.
If the characters are converting but not displaying properly, you likely have a font mapping issue. To comply with the licensing regulations of font suppliers, our software can not embed fonts in the vector output formats. Instead, we reference the fonts by their names. If the fonts, with the same names, are on the target PC, the file will open and display perfectly. If the same fonts are not on the PC that opens the file, which is much more likely, the text will not display properly. To complicate things, often, one font may go by several different names. Arial Bold, for example, may be referenced as “EHJPKB+Arial-Bold” in the original file. This font may be normal Arial Bold but the target application does not know it unless you tell it. This is known as font mapping. If the font is not mapped correctly, the closest font will be substituted. In this example, “EHJPKB_Arial-Bold” must be mapped as “Arial” with font style “Bold”. In order to learn more, please read the Tech Note: Font Mapping
In case of SVG or EMF as output format we support kerning. Please contact us if you need more information how to configure thus. Turning this option on could improve the WYSIWYG of the text strings.
There are two important issues at play here.
First – make sure you choose the correct image format for your file type. If your PDF file is mostly text, you should choose GIF or PNG since they render images with few colors sharply. JPEG is better suited for photographic images which use many colors.
The second consideration is resolution or “dots per inch” (dpi). The resolution you choose determines the quality (and the size) of the output. Although a high resolution will yield a super-sharp image, it will also product a large file size which may impact performance. The rule of thumb is to use the lowest resolution which delivers the quality you need. Some guidelines are:
- For screen display (web or office) – use 96dpi.
- For images that will be printed on laser or inkjet printers – use 150 dpi
- For images that will be printed professionally – use 300 dpi
If you want to adjust the resolution, simply increase the dpi setting in the Options menu.
The font glyphs of the 13 standard PostScript fonts are included.
If you need to convert to an image format or the text to curves/polys (= emulate) in a vector format either the font must be one of the 13 standard fonts or the font should be embedded within the PDF or PostScript file. Contact firstname.lastname@example.org if you want to add font glyphs.