We often have to deal with data that hasn’t always “lived” in our CAD, BIM or Revit world. Take a hand sketch, for example – how can you get that into a format that can easily be used in AutoCAD or Revit? Some PDFs have vector information, which I have described how to access before. But the below workflow takes it one step further – how to get any raster image into a vector format, using a few free tools.
Here’s how to do it, without Adobe Illustrator:
- Make your source file (PDF / Scan etc) into bitonal TIFF image (I use Bluebeam and Irfanview in the video, but you could easily save the PDF to image using GSView)
- Open in Inkscape
- Vectorize using Path – Trace Bitmap… Brightness steps, set to 2.
Untick: Smooth, Stack scans, Smooth corners and Optimize paths.
(this step makes the black and white image into lines and outlines)
- Save as EPS
- Open in GSView (requires Ghostscript and pstoedit)
- Save as DXF (using Convert to Vector format). From here, you can get to AutoCAD or Navisworks easily…
- Open in AutoCAD
- NWCOUT and/or
- Append the DXF directly to Navisworks
- Scale and position appropriately
Here’s a quick video of the process:
The file sizes at each step look like this:
These steps helped me to leverage some data from a DWF file and convert it into vector data I could use in a DWG file:
- Open DWF in Design Review
- Print to PDF using CutePDF (this worked for me)
- Open resulting PDF in Gsview (see this link)
- Edit – Convert to vector format – dxf
- Open DXF in AutoCAD or DWG Trueview
- Save as DWG file
Hope this works for you.
Sometimes you will have access to a PDF file, but not to the original DWG. Is there any way you can get the base vector data, such as lines and arcs, out of the PDF and back into a DWG? Yes, there is – and it’s free.
You will need 3 things:
Ghostscript or here
pstoedit (or Windows exe link here)
Download and install each of the above tools. Make your life easy and stick with the 32-bit version of everything.
Once you have installed them all, open a PDF file using GSView. GSView is usually located in
With your PDF open, take the following steps:
- Click on ‘Media’ and set the correct paper size.
- Go to ‘Edit’ and click on ‘Convert to vector format…’
- At the resulting PS to Edit dialog box, choose dxf_s, and add the following Driver options:
-mm -splineaspolyline -splineprecision 10
(I have found these settings to work quite well)
- Click OK.
- Select the page in the next dialog (usually only 1), press OK, and then pick a place to save the DXF file.
- Click Save.
- Open in AutoCAD and scale to correct size.
- Save as DWG.
If you have any problems, feel free to comment and I will try and help you out. If you intend to import the DWG into Revit, keep in mind that Revit is not very impressed with very short lines.
Enjoy your PDF hacking!