dwg2pdf cmd line tool unknown fonts missing

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
lloydzl
Newbie Member
Posts: 7
Joined: Thu Sep 09, 2021 12:23 am

dwg2pdf cmd line tool unknown fonts missing

Post by lloydzl » Wed Jul 27, 2022 9:50 am

Version:3.27 professional, OS:Windows
I'm using dwg2pdf to convert formats, but most of the chinese charactors are missing, how can I batch replace all the unknown fonts with a specific font?
Most of the files have dozens of fonts, I can't replace them one by one on command line.
Attachments
screenshots1.png
screenshots1.png (338.68 KiB) Viewed 3334 times
missingfonts1.dwg
(3.7 MiB) Downloaded 211 times

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

Re: dwg2pdf cmd line tool unknown fonts missing

Post by andrew » Wed Jul 27, 2022 9:57 am

You can specify multiple -font-substitution or -fs switches:

Code: Select all

./dwg2pdf ... -fs SomeFont1 Arial -fs SomeFont2 Arial ...

lloydzl
Newbie Member
Posts: 7
Joined: Thu Sep 09, 2021 12:23 am

Re: dwg2pdf cmd line tool unknown fonts missing

Post by lloydzl » Wed Jul 27, 2022 10:10 am

Thanks,I know this way, but I don't know what fonts of the file the users upload, I have to extract all the fonts by command first(maybe 10~100 different unknown fonts), it has more trouble, can I simplely use wildcard(or other way if it has) to repalce all the fonts with one?

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

Re: dwg2pdf cmd line tool unknown fonts missing

Post by CVH » Thu Jul 28, 2022 4:31 am

Hi,

Remark that there is a polyline in your example file that isn't rendered correctly by QCAD.

Handle 0x2a316a
Two 180° degree arc segments, Global Width 28.901376, Global Z -7999.999
It is rendered as a solid filled circle with a diameter of about 1600 units (Drawing units = None).

This is a reported issue, flatten to 2D will correct this.

AutoSave or Save (-As) will report:
Exception occurred. Entity NOT saved: 2b924d
Exception occurred. Entity NOT saved: 2b9250
3D polyline with arc segments flattened to 2D.
3D polyline with arc segments flattened to 2D.


The last two messages are not concerning the 0x2a316a entity what will remain as it is.

Regards,
CVH
Last edited by CVH on Thu Jul 28, 2022 5:43 am, edited 1 time in total.

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

Re: dwg2pdf cmd line tool unknown fonts missing

Post by CVH » Thu Jul 28, 2022 5:35 am

Similar topic, same author, marked as solved:
https://qcad.org/rsforum/viewtopic.php?t=8736

In this case there are 16 different fonts used.
I think that this is still possible within the 8191 character limitation.
Automated I would replace fonts one by one.

Regards,
CVH

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

Re: dwg2pdf cmd line tool unknown fonts missing

Post by andrew » Thu Jul 28, 2022 11:36 am

lloydzl wrote:
Wed Jul 27, 2022 10:10 am
Thanks,I know this way, but I don't know what fonts of the file the users upload, I have to extract all the fonts by command first(maybe 10~100 different unknown fonts), it has more trouble, can I simplely use wildcard(or other way if it has) to repalce all the fonts with one?
This is not currently possible.

Please note: We've sent you an e-mail and private forum message regarding your QCAD Professional license. Please reply to the e-mail or private message at your earliest convenience, thanks.

Post Reply

Return to “QCAD Troubleshooting and Problems”