Page 1 of 1

DXF to PDF to PNG - Programatically...

PostPosted: Wed Jun 18, 2014 12:41 pm
by 1966Mustang
Hello,

I have just started getting back into datacad on a project with several collaborators. For now I'm primarily using github to commit my DXF's and other changes - the files we are creating are for CNC cutting of flat metal parts.

I am using Datacad 11 and have that running in a virtualbox windows xp on linux - no problems at all. The location I save all my work to is a 'network' location on the linux OS, which also has several shell scripts working on the dir to do various things with the DXFs.

One of the things I would like to do is to generate PNG graphics from the DXF's themselves. This would save me a step of having to plot preview in datacad and saving as a PDF. It also would help with keeping the naming consistent between the DXF's and the PDF's and the PNGs. The end result is to attach the various generated documents into the ERP system (xTupleERP). The PNG's get sent to the webstore and are linked back to the ERP through whatever same-name concatenation.

Right now, I can easily use imagemagick to convert PDF to png and that works great. But I would really like to go from DXF to PDF or DXF to PNG directly from the command line. Again, the main goal is to produce a DXF in datacad and then generate a PDF then a PNG without having to print preview save-as pdf in datacad.

I've researched quite a bit on the linux side - TeighaViewer from the ODA (which Datacad is listed as a member) looked like it had some promise but it seems gimped for what I want to do. The utility pstoedit seems like it might be able to - but I haven't researched how to use it all yet. , inkscape could do it but not programmatically that I am aware.

Has anyone solved this issue programatically?

Thanks,

Perry Clark
Norfolk, VA