What’s New? PDF Import

AutoCAD® Architecture saw the addition of the PDF Import feature a few releases ago and Autodesk has consistently improved this great feature each time.  The 2018 release is no different.  This is a feature I have utilized a lot and I receive questions on it from time to time so I thought this would be the perfect time to delve in to the PDF Import feature.  I will also discuss an overview of the PDF Export feature as they are both very useful.

Importing PDF Files

PDF files are a common way of publishing and sharing design data for review and markup.  AutoCAD Architecture supports the creation of PDF files as a publishing output for ACA drawings and importing PDF data into AutoCAD Architecture using either of two options:

  • PDF files can be attached to drawings as underlays, which can be used as a reference when collaborating on projects.
  • PDF data can be imported as objects, which can be used as a reference and also modified.  If you import PDF data, you can choose to specify a page from a PDF file or you can convert all or part of an attached PDF underlay into AutoCAD Architecture objects.

When a PDF file is generated, all supported objects are translated into paths, fills, raster images, markups, and TrueType text.  In PDF, paths are composed of line segments and cubic Bézier curves, either connected or independent.  However, when a PDF file is imported into AutoCAD Architecture, note the following:

  • Bézier curves are converted into circles and arcs if they are within a reasonable tolerance to those shapes.  Otherwise, they are converted into 2D polylines.
  • Elliptical shapes can be converted into 2D polylines, splines, or ellipses depending on how they were stored in the PDF.
  • As an option, each set of approximately collinear segments can be combined into a polyline with a dashed linetype named PDF_Import.
  • Compound objects such as dimensions, leaders, patterned hatches, and tables result in many separate objects as if these objects were exploded.
  • Solid-filled areas are imported as 2D solids.  They are assigned a 50 percent transparency to make sure that any text within the areas is visible.
  • Text that used TrueType fonts is preserved, but text that originally used SHX fonts is imported as separate geometric objects.
  • Raster images generate PNG format files that are attached to the drawing file as external references.  These image files are saved in a folder specified by the PDFIMPORTIMAGEPATH system variable, which can also be specified in the Options dialog box, Files tab.
  • Point objects are converted to zero-length polylines.
  • Markups are not imported.

After you import a PDF, you can use the PDFSHXTEXT command to convert the geometric representation of any SHX text into multiline text objects.  The conversion process compares the selected geometry successively against the selected SHX fonts listed in the dialog box.  When the geometry and an SHX font are a close enough match to pass the recognition threshold that you specify, the geometry is converted into multiline text objects.  You can then use the TXT2MTXT command to combine the multiline text objects that you select into a single multiline text object.

When an AutoCAD Architecture DWG file is exported as a PDF file, both information and precision are unavoidably lost.  It is important to be aware of the degree of visual fidelity that can be reasonably expected.  The data in DWG files are stored as double-precision floating-point numbers, while the data in PDF files are only single precision.  This reduction rounds off coordinate values, and the loss of precision is most noticeable in the following cases:

  • Computed locations such as tangent points, the endpoints of arcs, and the endpoints of rotated lines
  • Data with a large dynamic range from the largest to the smallest values
  • Large coordinates in PDF files such as those found in maps
  • PDF files that were generated with a low dpi (dots per inch) setting

Importing PDF Data

You can import the objects in a PDF file or PDF underlay into your current drawing file.  To import the objects in a PDF file, click Insert tab, Import panel, PDF Import, and then select Find.  In the Import PDF dialog box, specify the PDF file that you want to import and click Open.  If the PDF has multiple pages, choose the page to import by clicking a thumbnail image or by entering a page number.  Now choose any of the options and click OK.  Specify the insertion point if prompted (see Figure 1).

To import the objects in a PDF underlay, click Insert tab, Import panel, PDF Import, and then select Find (see Figure 2).  Now select the PDF underlay.  On the PDF Underlay Contextual tab, click Import as Objects and then click Find.  At the prompt, click two diagonal points that define a rectangular crossing area or choose one of the other options.  A crossing area is similar to a crossing selection.  The Settings option displays a dialog box in which you can choose what types of objects to import, how layers should be accommodated, whether the imported objects should be imported as a block, and several other options.  Choose whether you want to keep, detach, or unload the attached PDF after the selected objects have been imported.  The specified area of the attached PDF is imported into the drawing as AutoCAD objects.

To convert SHX Geometry into multiline text objects, click Insert tab, Import panel, Recognition Settings, and then click Find.  In the PDF Text Recognition Settings dialog box, under SHX Fonts to Compare, click one or more fonts that appear to be the most similar to the imported SHX geometry.  Click the up or down arrow buttons to order the list so the most likely font is at the top.  Choose any other options as desired and then click OK.  Select the geometric objects that represented the SHX text in the PDF and press Enter.  Be careful to avoid selecting any objects that are not part of the characters.  A dialog box reports the percent of the objects that could not be converted to multiline text.  The characters that were converted are highlighted.  If the threshold percent you set is not achieved, then the next font that you specified on the list is processed.  If none of the fonts pass the threshold, try one of the following:

  • Select fewer objects for processing.  This can help you identify problems and extraneous geometry.
  • Select a different font that might be a better match.
  • Lower the success threshold percent in the PDF Text Recognition Settings dialog box.

Once you're satisfied with your settings, the process for converting SHX geometry into multiline text becomes much simpler:  Click Insert tab, Import panel, Recognize SHX Text, and then select Find.

Figure 1: Import PDF

Figure 2: PDF Import ribbon

Attaching PDF Files as Underlays

You can attach a PDF file as an underlay to a drawing file.  You can reference and place underlay files in drawing files the same way you do raster image files; they are not actually part of the drawing file.  Like raster files, the underlay is linked to the drawing file through a path name, which can be changed or removed at any time.  However, you cannot bind an underlay to a drawing and you cannot edit or modify the underlay’s content.  By attaching underlays, you can access files in your drawing without greatly increasing the drawing file size.

There are a few special considerations to think about:

PDF files with more than one page are attached one page at a time.
You can drag underlays directly into the current drawing.
You can reattach an underlay multiple times, treating it as a block.  Each underlay has its own clip boundary and settings for contrast, fade and monochrome.
You can view PDF underlays only in the 2D Wireframe visual style.
Hypertext links from PDF files are converted to text.

A file that you attach to a drawing as an underlay can be password protected.  PDF file passwords are case sensitive.  You cannot attach the file until you have entered the correct password and you will be prompted for the underlay file’s password each time you open the drawing.  If the drawing has several password-protected underlays attached, you will be prompted for multiple passwords.

If you wish to attach a PDF underlay, click Insert tab, Reference panel, Attach.  In the Select Reference File dialog box, select the PDF file you want to attach and click Open (see Figure 3).  In the Attach PDF Underlay dialog box, select one page or use SHIFT or CTRL to select multiple pages (see Figure 4).  Now you can select Specify On-Screen to use the pointing device to attach the underlay at the location, scale, or angle you want or you can clear Specify On-Screen and enter values for Insertion Point, Scale, and Rotation at the command prompt.  Now click OK.

Figure 3: Attach PDF underlay

Figure 4: PDF underlay select pages

Export to PDF

You can export AutoCAD Architecture files to PDF as well.  There are many commands and methods you can use to produce PDF files, as follows:

  • Export model space or a single layout to a PDF file using the PLOT or EXPORTPDF command (see Figure 5).
  • Export all layouts of a drawing to a PDF file using the EXPORTPDF command.
  • Export selected layouts of a drawing to PDF using the PUBLISH command.
  • Export model space and selected layouts to PDF using the PUBLISH command.
  • Export multiple drawing files to PDF using the PUBLISH command.
  • Export a sheet set to a PDF file using the Publish to PDF option in the Sheet Set Manager.

PDF presets are named groups of settings that control the PDF creation process and are saved as plotter configuration files (*.pc3).  Presets let you balance the file size with quality and functionality, depending on how you want to use the PDF files.  The predefined PDF presets listed address most typical usage scenarios.  However, if you have specific requirements that a predefined preset cannot meet, customize an existing preset and save it as a *.pc3 file with a different name.

If a PDF viewer does not have access to a font that you used in a drawing, it displays the affected text using a substitute font.  Often, the substitute font doesn't match up to the original font.  Consequently, the text in the drawing can appear different than the text in the PDF file.  You can prevent font substitution by capturing the font in the drawing and embedding it in the PDF file.  Alternatively, you can convert all text to geometry.  Converting text to geometry ensures that the text in the PDF file is identical to that of the drawing.  However, the PDF file size increases and text pixilation can occur when you view the PDF file at a high magnification.  You can reduce pixilation by increasing raster image quality.

Exporting a DWG to PDF has a few limitations:

  • Resolution − The highest possible resolution of PDF data is 4800 dpi.
  • 3D Visual Styles − All viewports, model space or layout that have a 3D Visual style applied to them are converted to raster images when plotted to PDF.  As a result, drawing information such as the layers within the viewport is lost.  Furthermore, text within the viewport is not searchable and hyperlinks are removed.
  • Printing PDF files − If you use the Adobe Acrobat Reader default printer settings to print a PDF drawing, transparent objects and wipeouts might not print correctly.  If the PDF file contains transparent objects, you may need to adjust some settings in Adobe Acrobat.  Set Transparency Flattening to "Print as Image" or reduce the Raster/Vector Balance in Adobe Acrobat.
  • Loss of precision − PDF stores data in single precision numbers, while DWG stores data as double-precision numbers.  

Figure 5: Export to PDF options

Appears in these Categories