Monday, November 1, 2010

Obtain Vector Information from PDFs using Free Tools

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
GSView
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  
C:\Program Files\ghostgum\gsview\gsview32.exe

With your PDF open, take the following steps:
  1. Click on 'Media' and set the correct paper size.
  2. Go to 'Edit' and click on 'Convert to vector format...'
  3. 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)
  4. Click OK.
  5. Select the page in the next dialog (usually only 1), press OK, and then pick a place to save the DXF file.
  6. Click Save.
  7. Open in AutoCAD and scale to correct size.
  8. 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!


3 comments:

  1. I often convert pdf to dwg. I use either CorelDraw or Adobe Illustrator.

    Once you start converting, you will become aware of how badly pdf's are made by windows (unless generated in illustrator, indesign & CorelDraw). I am currently talking to one of the Adobe Acrobat Distiller tech to see if this can be resolved as often the dwg's made through conversion ore of only limited use.

    : )

    ReplyDelete
  2. I was not able to download the GSView because when I clicked on download link it didn't open the url which starts with mirror. I think that's because of the network security policies here. I tried to use pstoedit which was successfully downloaded and installed but it didn't run at all saying that there is a dll missing and I need to re-install ... reinstalling didn't solve it either. Can you please help getting GSView?

    ReplyDelete