• Blog posts

    Bio

    By Martin Phelps

    This function was first introduced in to AutoCAD in the 2017 release, and allows the conversion of the contents of PDF files created in CAD packages to be converted into AutoCAD objects.

    Prior to AutoCAD 2017, PDF files may be added to drawings as “Underlays” via the “References” dialogue. As shown in Figure 1.

    4.png

    Figure 1.

    AutoCAD objects could now be added to the drawing by tracing and snapping to points on the “Attached” PDF. 

    Importing a PDF File

    Using the “Import PDF” command, there are two main options. If the PDF was added as an attachment it may be converted in to DWG components, using the “File” option within the “PDF Import” command or the PDF file may be “Imported” directly into the current drawing file.

    The “PDF” to be added in to the drawing, may contain a number of sheets as shown in Figure 2.

    2017-06-13_15h32_37.pngFigure 2.

    This allows the user to selection of a single page which can then be imported into the AutoCAD file, in this case page 12 of 28.

     

    By checking the “Specify Insertion Point On-screen”, as in Figure 3.

    2017-06-13_15h32_56.pngFigure 3.

    The user can position the the PDF any where within the drawing area. By default the box is not checked so the imported PDF is placed at 0,0. As shown in Figure 4.

    2017-06-13_15h33_41.pngFigure 4.

     

    The actual size of the displayed PDF, is 5.85 x 8.27, in the same dialogue box the PDF may scaled and rotated. By default the rotation feature has the four main angles 0, 90, 180 and 270, but any angle may be typed in the rotation field. 

    However scaling the imported “PDF”  may be better carried out using commands within AutoCAD,since they give more flexiblity.

     

    What to Import.

    This next section relates to the “PDF Data to Import” section of the “Import PDF” dialogue box.

    As shown in Figure 5.

    2017-06-13_15h38_22.pngFigure 5.

     

    With the “Vector Geometry” and “TrueType Text” check boxes both ticked, all imported PDF geometry and text created with “TrueType" fonts are converted to AutoCAD vectors.

    As shown in Figure 6.

    2017-06-13_15h34_21.pngFigure 6.

     

    The imported data can now be modified using standard AutoCAD editing commands.

    With the “Vector Geometry” not checked, the “Solid Fills” option is automatically greyed out. The result being no geometry, only textural data is imported, providing the “True Type Text” box remains checked.

    As shown in Figure 7.

    2017-06-13_15h34_42.pngFigure 7.

    Note: - Some text may not be imported using this option, this may be due to the type of font used. Some true type fonts may not recognised, in this case the text is converted to AutoCAD geometry: - lines, arcs and solid fills.

    As shown in Figure 8.

    2017-06-13_15h35_01.pngFigure 8.

     

    Figure 9 shows the result if the “Vector Geometry” is checked, but “Solid Fills” are unchecked, this may be useful to reduce the file size since no “Solid Fills” will be imported.

    2017-06-13_15h35_26.pngFigure 9.

     

    The next option, is to restrict the import of “True type” text, however some text may still be imported, especially if the text has been created with “Shape” or “SHX” fonts, such as “Romans”, “Romanc”, and “Romant”, these are converted to lines and arcs.

     As in Figure 10.

    2017-06-13_15h36_21.pngFigure 10.

    Figure 11 compares all four options side by side.

    2017-06-13_15h36_56.pngFigure 11.

    The final option imports any “Raster Images” that may be part of the PDF, by default this is not checked so no images will be imported.

    Figure 12 comprises of two images on the left the result if the “Raster Image” box not checked no image is imported, on the right the “Raster Image” box is checked showing the imported image.

    2017-06-13_15h37_39.pngFigure 12.

    Data file courtesy of Travis Perkins.

     

    Layer Options.

    This section looks at the “Layer” functionality of the PDF import command. There are three options, “Use PDF layers”, “Create Object Layers”, and “Current Layer”. As shown in Figure 13.

    5.pngFigure 13.

    Figure 14 shows the original drawing file and its layers prior to “Printing” to PDF, all layers are clearly displayed. 

    2017-06-13_15h38_53.pngFigure 14.

     

    After printing to PDF, viewing the PDF file using Adobe Acrobat Reader DC, all layers are displayed down the left side, as shown in Figure 15.

    2017-06-13_15h39_27.pngFigure 15.

     

    Using the “Use PDF Layers” option, all layers that exist in the created PDF file are recreated when “Importing” the PDF file into AutoCAD, but with the addition of the prefix “PDF_” for each layer. This option gives greater control over how the drawing components can be displayed, but at the cost of increasing the number of layers with in the file.

    “Importing” the PDF back in to AutoCAD, as shown in Figure 16.

    7.pngFigure 16.

      

    The next option is ”Create Object Layers”, using this method layers are automatically created, depending on the contents of the PDF file to be imported.

    These are:-

    “PDF_Geometry”, created if the imported PDF contains geometry. All PDF geometry is placed on this layer.

    “PDF_Solid Fills”, created if the imported PDF contains solid fill areas. All PDF solid fills are placed on this layer.

    “PDF_Text” created if the imported PDF contains any text using TrueType fonts are placed on this layer.

    “PDF_Images” only created if the imported PDF file contains Raster images, all raster data is placed on this layer.

    All Objects regardless of type retain their colour, but are placed on their respective layers, so reducing the number of layers with in the drawing.

    If another PDF file is to be imported, the layers are created again, but this time the number 2 is incorporated in the name i.e.:- “PDF2_Geometry”, “PDF2_Solid Fills”, “PDF2_Text”, “PDF2_Images”, as more PDF files are imported the relevant layers are created, giving the user the flexibility to control drawing display.

     

    This section looks at the “Import Options” function of the PDF import command.

    As shown in Figure 17

    2017-06-13_15h41_23.pngFigure 17.

    Option 1, (Figure 18) and may be the most useful is “Import as Block”. Bringing in the complete PDF file as a block, instead of separate objects. Since the “Imported” file is now a block it can be “Exploded” and modified as required.

    2017-06-13_15h53_00.pngFigure 18.

    Option 2, (Figure 19) is “Join Line and Arc Segments” which will convert touching lines into polylines where possible.

    2017-06-13_15h41_59.pngFigure 19.

    Option 3, (Figure 20) converts solid fills into hatches whether this is checked or not checked the converted objects are still placed on the layer “PDF_Solid Fills.

    2017-06-13_15h42_15.pngFigure 20.

    Option 4 (Figure 21) when checked, objects with line weight applied, will retain the “Lineweight” properties, if existed in the original file. If unchecked line weight properties will be ignored. However to display the line weights once the file has been imported the “Lineweight” display icon in the status line must be turned on to display the line weights. 

    2017-06-13_15h42_34.pngFigure 21.