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).
This warning is to let you know that your PDF file uses non-standard fonts or font names. When this happens, you’ll probably notice that the text in your output file may look different than in the PDF when you open it in your target application. This not an error – just a reminder that some fine-tuning may be required, Please see the other entries on fonts and visit the Help system in the software for more detail.
If needed you can turn off the font messages, by adding the line: font_warnings(0) to the ini file of the application.
If you do not need to edit the text, you can create a perfect vector object for each character. You can choose this by checking the “Convert Characters to Curves” option in the General tab of the Options menu. Every character will then be rendered with curves as a graphical representation of the character using the font information stored in the PDF. If a font was not embedded in the PDF, pdf2picture will refer to the /fonts/ directory in the pdf2picture installation folder. You can add Type 1 or TrueType font to this folder as needed to ensure a perfect match. To outline only specific fonts during conversion, email email@example.com for instructions.
If you do not need to edit the file at all, another option is to use the bitmap mode in pdf2picture or use pdf2image which creates a high-quality image of the file in four popular web and publishing formats..
For fonts to appear correctly in a vector output file, the same font with the same naming convention must be on both systems. Sometimes, any mismatch can be resolved through font mapping. If you need support on adding fonts to your environment please contact firstname.lastname@example.org. Custom font mapping is available as a service but is not covered by the standard Advantage Support Subscription.
By default the fontname used in the PostScript or PDF file is used also as fontname in the vector output file. Using the Font Mapping dialog you can change this by creating a mapping between the original fontname and the fontname you want to use in the vector output file.
Fonts are not embedded in the vector output formats. Most of the vector output formats do not support embedding of font data.
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 email@example.com if you want to add font glyphs.