You can import the geometry, fills, raster images, and TrueType text from a PDF file into the current drawing. The visual fidelity along with some properties such as PDF scale, layers, lineweights, and colors can be preserved.
PDF files are a common way of publishing and sharing design data for review and markup. AutoCAD supports creating PDF files as a publishing output for AutoCAD drawings, and importing PDF data into AutoCAD 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, in part or entirely, which can be used 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 objects.
How Objects are Translated
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-based products, 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, or optionally as solid-filled hatches. They are assigned a 50% 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.
Text Created with SHX Fonts
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.
Limitations
When an AutoCAD 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
Protecting a Design
Design concepts often need to be shared with a wider collaborative team. However, the organization or professionals that originate the design can be concerned that the design files might be used or copied in an unauthorized way. Legal liability might also be a concern. When you work with someone else's PDFs, it's possible that the originator created the PDFs to communicate the design's visual aspects but with intentionally reduced precision or data portability. Here's what you might encounter:
- PDFs with the dpi deliberately set low to provide only a visual representation of the design at low precision.
- PDFs containing only a raster scan of a design. AutoCAD can import the raster image from a PDF, but it doesn't support raster-to-vector conversion. Converting raster images to vector data with specialized software cannot provide the same level of precision as objects created directly with AutoCAD.
If you receive low dpi PDFs or PDFs containing only a raster image, you might want to consider the alternative of relying on a legal agreement with the originator that specifies terms of use and liability.