OSArch Community

Inkscape: error when converting PDF to dxf

  1. T

    Can anyone convert the following PDF to a DXF?

    I used Inkscape, but got the following error, which I don't know how to overcome.

    Anyone have any pointers?

    file: https://www.dropbox.com/s/4lmkni2tyi8y6qk/Existing%20Floor%20plan.pdf?dl=1

    
    
    Traceback (most recent call last):
    
      File "dxf_outlines.py", line 332, in <module>
    
        DxfOutlines().run()
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 140, in run
    
        self.save_raw(self.effect())
    
      File "dxf_outlines.py", line 317, in effect
    
        self.process_group(doc)
    
      File "dxf_outlines.py", line 265, in process_group
    
        self.process_group(node)
    
      File "dxf_outlines.py", line 265, in process_group
    
        self.process_group(node)
    
      File "dxf_outlines.py", line 265, in process_group
    
        self.process_group(node)
    
      [Previous line repeated 979 more times]
    
      File "dxf_outlines.py", line 260, in process_group
    
        trans = group.get('transform')
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements\_base.py", line 175, in get
    
        value = getattr(self, prop, None)
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements\_base.py", line 153, in __getattr__
    
        setattr(self, name, value)
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements\_base.py", line 165, in __setattr__
    
        self.attrib[attr] = str(value)
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 501, in __str__
    
        if not self:
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 363, in __bool__
    
        return not self.__eq__(Transform())
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 524, in __eq__
    
        for l, r in zip(self.to_hexad(), Transform(matrix).to_hexad()))
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 312, in __init__
    
        self._set_matrix(matrix)
    
      File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\transforms.py", line 321, in _set_matrix
    
        if isinstance(matrix, (str, unicode)):
    
    RecursionError: maximum recursion depth exceeded in __instancecheck__
    
    
    
    
  2. T

    Thanks Guys! love learning new workflows!

  3. B

    Another tool to convert PDF to DXF is pstoedit. My batch script:

    #!/bin/sh
    
    for PDF
    
    do
    
    DXF=`echo $PDF | sed 's/\.pdf$/%d.dxf/i'`
    
    pstoedit -f "dxf:-polyaslines -mm -ctl" -split "$PDF" "$DXF"
    
    done
  4. M

    I tried with Inkscape and didn't get any errors, but the final DXF file looked messed up with a bunch of blocks in the top right. I recommend filing a bug for the Inkscape devs?

    Then I tried using an older method I've documented here: https://thinkmoult.com/how-to-bulk-convert-pdf-to-dxf-or-dwg.html and I got much better results:

    I've attached the file for your convenience.

  5. B

    @theoryshaw said:

    Can anyone convert the following PDF to a DXF?

    I used Inkscape, but got the following error, which I don't know how to overcome.

    Here you are.

    I opened the PDF with Scribus (I think it has more robust libraries to work with PDF files). Then I exported the file as SVG. Later I opened the SVG file with Inkscape, I ungrouped the image (no sure if it is necessary) and exported the file with Save a Copy, DXF 14.

  6. T
  7. B

    Do you know SolveSpace 3.0 is able to import DWG files?

Login or Register to reply.