Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: pstoedit (ghostscript) error converting PDF to DXF

  1. #1
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,937

    Default pstoedit (ghostscript) error converting PDF to DXF

    pstoedit 3.70-5.22-x86-64 from leap 42.3 standard repo

    Tested with:

    ghostscript 9.15-13.14-x86_64 from leap 42.3 standard repo,
    ghostscript 9.15-14.3.1-x86_64 from leap 42.3 update repo, or
    ghostscript 9.22-97.1-x86_64 from leap 42.3 printing repo

    With either ghostcript version installed, an attempt to convert a pdf file to dxf (drawing exchange format) throws an error:

    Version 9.15-13:

    Code:
    :~> pstoedit -nb -f dxf:-mm DE-HS-2-MET-001_REV_0.pdf DE-HS-2-MET-001_REV_0.dxf
    pstoedit: version 3.70 / DLL interface 108 (built: Jul  8 2017 - release build - g++ 4.8.5 - 64-bit) : Copyright (C) 1993 - 2014 Wolfgang Glunz
    Error: /undefined in --run--
    Operand stack:
       false   false   --dict:280/300(ro)(G)--   .Qqwarning_issued   false
    Execution stack:
       %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1950   1   3   %oparray_pop   1949   1   3   %oparray_pop   1933   1   3   %oparray_pop   1820   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   1950   1   3   %oparray_pop   1949   1   3   %oparray_pop   1933   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--
    Dictionary stack:
       --dict:1182/1684(G)--   --dict:1/20(G)--   --dict:302/450(L)--   --dict:302/450(L)--   --dict:116/127(ro)(G)--   --dict:280/300(ro)(G)--   --dict:26/32(L)--
    Current allocation mode is global
    Last OS error: No such file or directory
    Current file position is 87895
    GPL Ghostscript 9.15: Unrecoverable error, exit code 1
    Unrecoverable error: typecheck in setpagedevice
    Operand stack:
        false  false  false  --nostringval--
    PostScript/PDF Interpreter finished. Return status 256 executed command : /usr/bin/gs -I/home/blimmer/.fonts -q -dNOBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/psin3fWK8C"
    The interpreter seems to have failed, cannot proceed !
    Version 9.15-14 gives a larger output, but fails similar to the other two. I can downgrade and post the output in necessary.

    Version 9.22:

    Code:
    :~> pstoedit -f dxf:-mm DE-HS-2-MET-001_REV_0.pdf DE-HS-2-MET-001_REV_0.dxf                                             
    pstoedit: version 3.70 / DLL interface 108 (built: Jul  8 2017 - release build - g++ 4.8.5 - 64-bit) : Copyright (C) 1993 - 2014 Wolfgang Glunz
    
     *** WARNING - the DELAYBIND command has been deprecated, and will be
                   removed in the next version. For now you can restore
                   the behaviour by using -dREALLYDEALYBIND but if you
                   require continued use of this command you should contact
                   the Ghostscript developers. Commercial customers of
                   Artifex should email their support contact, free users
                   are encouraged to talk to us on the #ghostscript IRC
                   channel on irc.freenode.net.
    
    Unrecoverable error: undefined in DELAYBIND
    PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -I/home/blimmer/.fonts -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/psinOOcPjJ"
    The interpreter seems to have failed, cannot proceed !
    blimmer@bruno:~/Trabalhos em curso/PDF> man pstoedit
    blimmer@bruno:~/Trabalhos em curso/PDF> pstoedit -nb -f dxf:-mm DE-HS-2-MET-001_REV_0.pdf DE-HS-2-MET-001_REV_0.dxf
    pstoedit: version 3.70 / DLL interface 108 (built: Jul  8 2017 - release build - g++ 4.8.5 - 64-bit) : Copyright (C) 1993 - 2014 Wolfgang Glunz
    Error: /undefined in .currentglobal
    Operand stack:
    
    Execution stack:
       %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1999   1   3   %oparray_pop   1998   1   3   %oparray_pop   1982   1   3   %oparray_pop   1868   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--
    Dictionary stack:
       --dict:980/1684(G)--   --dict:0/20(G)--   --dict:130/200(L)--
    Current allocation mode is local
    Current file position is 6949
    GPL Ghostscript 9.22: Unrecoverable error, exit code 1
    PostScript/PDF Interpreter finished. Return status 256 executed command : /usr/bin/gs -I/home/blimmer/.fonts -q -dNOBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/psin4JQ92L"
    The interpreter seems to have failed, cannot proceed !
    From https://github.com/pmonta/gerber2gra...ment-357777922

    ... Ghostscript 9.22 depreciates the -dDELAYBIND flag which pstoedit depends on. The result is no output from pstoedit. pstoedit and this project haven't seen any development in while so I don't expect this will magically be fixed.
    ...
    Downgrading Ghostscript to 9.21 seems the logical answer,but ...
    It looks like this upstream bug that should be fixed, but apparently isn't: https://bugs.ghostscript.com/show_bug.cgi?id=697846

    This capability is quite important to my work, I'm stumped without it. Please help!

    Thank you,

    Bruno

    Note: the online converters I've tried until now are no good, as they don't preserve line thickness, something that pstoedit/ghostcript does.

  2. #2
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,937

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Obs: this worked fine in openSUSE 13.2, unfortunately I upgraded all installs I had.

    https://software.opensuse.org/package/ghostscript show that oS 13.2 also used ghostscript version 9.15, but it's not available to download it from there to test Leap 42.1 and 42.2 unsupported repos have various minor versions of ghostcript 9.15, perhaps one of these will work.

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,487
    Blog Entries
    2

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    If you have no objections,
    Nowadays there are a variety of online services that will convert PDF to various formats.

    So, for example this is one that promises to do the version for you (at no cost)
    https://www.zamzar.com/convert/pdf-to-dxf/

    I haven't done your specific conversion, so don't know if this service works well.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,937

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Version 9.15-3.9 from standard 42.1 repo works! Yast removed ghostscript-X11 package, but it didn't seem to make a difference.

    This is the oldest version I downloaded, and didn't try the other ones (from 42.1 update and 42.2)

  5. #5
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,937

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Quote Originally Posted by tsu2 View Post
    If you have no objections,
    Nowadays there are a variety of online services that will convert PDF to various formats.

    So, for example this is one that promises to do the version for you (at no cost)
    https://www.zamzar.com/convert/pdf-to-dxf/

    I haven't done your specific conversion, so don't know if this service works well.

    TSU
    Thanks, but see the last line on post #1.

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,487
    Blog Entries
    2

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Quote Originally Posted by brunomcl View Post
    Thanks, but see the last line on post #1.
    Perhaps then you should consider looking at alternatives to pstoedit

    eg
    http://getalternative.net/software/pstoedit

    When software is no longer actively supported and maintained (last update to pstoedit was 3 yrs ago) you may have to find a substitute.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,606

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    It seems that, Inkscape can import PDF, one page at a time, and then write the imported drawing to a DXF file: <http://wiki.inkscape.org/wiki/index....nt_PDF_Support>.

  8. #8
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,937

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Quote Originally Posted by dcurtisfra View Post
    It seems that, Inkscape can import PDF, one page at a time, and then write the imported drawing to a DXF file: <http://wiki.inkscape.org/wiki/index....nt_PDF_Support>.
    Hi, dcurtisfra, thanks for the tip. I tried Inkscape after updating ghostscript back to the latest in the update repo, but the conversion is partial, most of the drawing (a large one) was not converted. So, back to pstoedit for now.

    For future reference, the most recent ghostscript version that works with pstoedit is 9.15-10.1, from the official (i.e., not the update) 42.2 repo. Version 9.15-11-x and newer fail.

  9. #9
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,937

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Quote Originally Posted by tsu2 View Post
    Perhaps then you should consider looking at alternatives to pstoedit

    eg
    http://getalternative.net/software/pstoedit

    When software is no longer actively supported and maintained (last update to pstoedit was 3 yrs ago) you may have to find a substitute.

    TSU
    Thanks for the suggestion. Unfortunately none of the alternatives export to DXF.

    As a workaround, in the future I'll probably keep a VM of LEAP with pstoedit and ghoscript installed when LEAP 42.3 goes EOL.

    Best thing in a long while, VMs are.

  10. #10
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,606

    Default Re: pstoedit (ghostscript) error converting PDF to DXF

    Quote Originally Posted by brunomcl View Post
    but the conversion is partial, most of the drawing (a large one) was not converted.
    Yes, (technical) CAD is, was, and will probably remain, as it is (I could be vulgar but, I'm restraining myself) …

    To be perfectly honest, I've often given up and simply redrawn the thing with the tool at hand -- after a while (with a somewhat painful posterior), one has a collection of the (technical) drawing in various file formats …

    Lesson to be learnt: "Export technical drawings into as many file formats as possible."

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •