PDF to DWG using free open source Inkscape

inkscape-screenshotInkscape is a completely free open source program for drawing vector graphics and has a lot of nifty features, among them file format conversion.

This guide will go through the procedure to get those pesky PDF drawings into AutoCAD using Inkscape.

This tutorial is written in a easy to follow step by step instructional guide intended for everyone. (Hopefully) even computer novices.

There are some limitations to the act of converting PDF to DWG that should be noted beforehand:

  • PDF files are not as accurate as DWG and should not be considered to exact scale. Think of it almost as importing a paper drawing.
  • Not all features will be converted. Some color fills, raster graphics and custom objects may be lost in the conversion. (Or require more work)
  • You can only import 1 page at a time.
  • Conversions like this can be tricky and unfortunately some files don’t do very good.

In depth step by step guide

1. Figure out the paper size of your PDF file.

Start up Adobe Acrobat. Go to File -> Properties

1

In the Description tab you should see the page size. Depending on the program used to create the PDF file (in this case AutoCAD) it might not say the ISO standard page size. Take note of the page size. In this case 841 x 594 mm which is a A1 ISO standard page size.

2

2. Download and install Inkscape.

For most windows users that’s here https://inkscape.org/en/download/windows/

If you’re uncertain which version to get read here. Most probably you will want the 64 bit installer unless you’re on an old computer with less than 4GB of ram. Then get the 32 bit installer.

3. Start up Inkscape and set the correct paper size. When starting for the first time it should have opened an empty document with an A4 size paper.

Go to File -> Document properties. Find the size of your paper or manually enter the custom page size into the text boxes. Also select the orientation of the paper to be portrait or landscape.

4 5

This page can be a bit slow and unresponsive. If Inkscape freezes or stops responding it has not crashed, have patience and give it some time and it will come to.

5. Import the PDF document from File -> Import

A new dialog box should appear with settings. If you encounter problems repeat the previous steps and return to this step and retry it with different settings. After clicking OK Inkscape may appear to freeze depending on the size of the PDF file. Large A0 drawings can take 5 minutes… just saying 🙂 Again, patience is the key here.

3 6

6. Align the imported page by clicking and draging it to the center of the paper canvas. When you’re satisfied click outside the canvas to deselect the paper.

7

7. Go to File -> Save a copy. Locate the folder where you want to save the file and select Desktop Cutting Plotter (AutoCAD DXF R14) (*.dxf) from the drop down list below in the save dialog window.

8

8. Select the base units for the drawing. In the case of ISO standard A1 paper it should be millimeters (mm).

If you have problems with the importing process repeat all the previous steps and return to this dialog and try checking or unchecking the other options.

9

Click OK to start the process. Depending on the size of the drawing this could take a while.

9. Inspect the DXF file by opening it in AutoCAD.

You should now have a quite large DXF drawing file exported. DXF stores coordinates in plain text without any compression so a DXF file might take 30 times or more data space than a DWG. Keep this in mind and try to avoid storing DXF files (for the sake of hard drive space).

10. Carefully check the scale….. and any possible errors

Its very easy to accidentally mess up the scale while importing/exporting so make sure to properly measure and compare the scale in the output drawing. There will be some inaccuracies.

11. Correct the scale if necessary

One way to correct scale is to use scale by reference.

1. SCALE command
2. Specify base point
3. Type R to use scale by Reference
4. Specify reference length by start point and end point
5. Specify new length

scale by reference

11. Save the DXF file as a DWG file.

Congratulations! You should now be done!

If you have errors opening the file try repeating the procedure with slightly different options where specified. You might also try the RECOVER or AUDIT command in Autocad. Keep in mind that errors probably mean that something was also lost in the procedure. Make sure to compare and figure out what it was.

I hope this was helpful! 🙂

Advertisements

3 Comments on “PDF to DWG using free open source Inkscape”

  1. Mark says:

    When I bring in a D sized drawing Pdf into inkscape, set the document size to 36×24 or 24×36, and export with units at inches, the resulting dxf is only 5k in size.

  2. L N Balaji says:

    Thanks, i landed here from a google search and was able to get my pdf into dxf!.

  3. Olaf says:

    Sometimes it just so happens, that the DXF export will not work. You might want/need to ungroup the contents, simply select all (ctrl+a), and hit ungroup (or ctrl+u). Then wait till it finishes ungrouping (you can tell it did when the selection dotted line reappears) and then ungrup again, untill it tells you there’s nothing left to ungroup. I had some issues with that, but I never encountered a file which just would not be exported. If you apply enough willpower to it, it will. It’s like magic that way.
    But that’s all fun and games untill you have a vector PDF with 50k, 150k or 250k lines. Then Inkscape just turns into the resource hog it has been all along and soon enough your RAM runs out and all goes to hell.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s