dxf looks fine but export fails?

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
caduser99
Newbie Member
Posts: 4
Joined: Thu Feb 03, 2022 8:15 pm

dxf looks fine but export fails?

Post by caduser99 » Thu Feb 03, 2022 8:18 pm

I'm using qcad 3.22.1.0 professional. The following file loads /renders fine but when I export it to a PDF or SVG it is blank. I can't tell what's wrong with the pdf but looked at the svg file and it appears to have elements and if I drag it over to qcad to reimport it also looks fine. What is wrong?

See Attached files
Attachments
test.svg
(2.47 KiB) Downloaded 306 times
test.pdf
(1.11 KiB) Downloaded 226 times
test.dxf
(7.27 KiB) Downloaded 231 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: dxf looks fine but export fails?

Post by Husky » Thu Feb 03, 2022 8:41 pm

caduser99 wrote:
Thu Feb 03, 2022 8:18 pm
What is wrong?
The content of the drawings needs to be on the paper position - adjust that and it will print just fine.

Husky-2022.02.03-01.png
Husky-2022.02.03-01.png (18.29 KiB) Viewed 4077 times

Detailed information can be found within this tutorial:
https://qcad.org/en/tutorial-printing
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: dxf looks fine but export fails?

Post by andrew » Thu Feb 03, 2022 9:18 pm

Also, your lineweight is set to "Default", The default line weight might be configured to be really thin (e.g. 0.00mm) in which case you might not see your lines in SVG or PDF or on a printout.

You can either change the lineweight of layer "Layer_1" or change the default lineweight under:
Edit > Application Preferences > Graphics View > Appearance > Default lineweight

caduser99
Newbie Member
Posts: 4
Joined: Thu Feb 03, 2022 8:15 pm

Re: dxf looks fine but export fails?

Post by caduser99 » Fri Feb 04, 2022 1:26 am

I created the DXF files in inkscape (original test.svg) which results an export as test.dxf

test.dxf looks fine on opening in qcad and there is no page size definition.

Once I do the export to pdf, it just randomly generates a page which is not the same as the original inkscape svg where all the objects fit on the page.

Is this a problem with inkscape DXF export?

Shouldn't qcad set the page size so the object fits? If not, is there a way to set the page size programmatically via the command line as I am primarily using qcad through the dwg2pdf.bat command line too and the page is not generated automatically.

Can I add extra parameters into dwg2pdf.exe there to make the page size fit as I expect it?
Attachments
test.svg
(2.46 KiB) Downloaded 278 times
test.dxf
(7.27 KiB) Downloaded 231 times

caduser99
Newbie Member
Posts: 4
Joined: Thu Feb 03, 2022 8:15 pm

Re: dxf looks fine but export fails?

Post by caduser99 » Fri Feb 04, 2022 1:27 am

I created the DXF files in inkscape (original test.svg) which results an export as test.dxf

test.dxf looks fine on opening in qcad and there is no page size definition.

Once I do the export to pdf, it just randomly generates a page which is not the same as the original inkscape svg where all the objects fit on the page.

Is this a problem with inkscape DXF export?

Shouldn't qcad set the page size so the object fits? If not, is there a way to set the page size programmatically via the command line as I am primarily using qcad through the dwg2pdf.bat command line too and the page is not generated automatically.

Can I add extra parameters into dwg2pdf.exe there to make the page size fit as I expect it?

caduser99
Newbie Member
Posts: 4
Joined: Thu Feb 03, 2022 8:15 pm

Re: dxf looks fine but export fails?

Post by caduser99 » Fri Feb 04, 2022 1:42 am

Ok I investigated further and if selection from inkscape is export R14 with px as units then it's off but if select mm as units then it exports fine and pdf conversion works. Both look fine but for some reason qcad conversion does not do the page correctly unless mm is selected.

As the DXF can randomly be generated, is there a way to automatically detect and set the paper size to import any dxf and save it to pdf correctly?

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: dxf looks fine but export fails?

Post by Husky » Fri Feb 04, 2022 3:41 am

You can check all available option with dwg2pdf -h
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: dxf looks fine but export fails?

Post by CVH » Fri Feb 04, 2022 8:09 am

Husky wrote:
Fri Feb 04, 2022 3:41 am
You can check all available option with dwg2pdf -h
Or look here:
https://www.ribbonsoft.com/en/products/ ... line-tools
caduser99 wrote:
Fri Feb 04, 2022 1:27 am
is there a way to set the page size programmatically via the command line
caduser99 wrote:
Fri Feb 04, 2022 1:27 am
Can I add extra parameters into dwg2pdf.exe there to make the page size fit as I expect it?
Not knowing what you expect, but yes:
-a, -auto-fit Auto fit and center drawing to paper
-auto-orientation Auto paper orientation (landscape or portrait)
based on document bounding box

-c, -center Auto center drawing on paper
-l, -landscape Landscape (default is portrait)
-p, -paper=WxH Set paper size to W x H in mm or to named paper size
('A4', 'Letter', ...)

-s, -scale=SCALE Set drawing scale to given scale
('1', '2', '0.5', '1:1', '1:5', '5:1', ...)

-w, -min-lineweight=LW Set minimum line weight on paper to LW Millimeter
-max-lineweight=LW Set maximum line weight on paper to LW Millimeter
caduser99 wrote:
Fri Feb 04, 2022 1:27 am
Shouldn't qcad set the page size so the object fits?
A) Optionally, yes.
B) For printing from CAD drawings it is common to use Layouts.


Regards,
CVH

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: dxf looks fine but export fails?

Post by andrew » Fri Feb 04, 2022 8:38 am

caduser99 wrote:
Fri Feb 04, 2022 1:42 am
As the DXF can randomly be generated, is there a way to automatically detect and set the paper size to import any dxf and save it to pdf correctly?
If you need to analyze the DXF and decide what paper size / orientation to use based on the drawing boundary, you can use bbox prior to dwg2pdf:
https://qcad.org/en/qcad-command-line-tools#bbox

Post Reply

Return to “QCAD Troubleshooting and Problems”