HPGL plotter won't print TechDraw text.

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

HPGL plotter won't print TechDraw text.

Post by techGuy »

The shop wants large drawings as they sometimes use them for templates for various things. So I'm printing things large on an HPGL pen plotter these days.

Here is the process I am using to do this:

1) print the TechDraw page as PDF.
2) open the PDF with InkScape. Save it as HPGL.
3) Connect to the plotter with a terminal program. I use GTKTerm.
4) Set the pen force, speed and home position on the plotter.
5) Send the HPGL file created by InkScape to the plotter.

This works pretty well. The only issue is that the text on my drawings isn't printing. Dimensions, labels, etc.

Would anyone know how I could make it work ? Is there a way to force fonts in FreeCAD to be vector ? Or convert them to such ?

It would be really, really nice if TechDraw/FreeCAD could output HPGL directly to a plotter. As far as I know there is no HPGL plotter driver in Linux. If you can generate HPGL for a drawing, it is pretty easy to drive an HPGL plotter.

Ideas and advice ?
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: HPGL plotter won't print TechDraw text.

Post by kaktus »

The TechDraw preferences allow you to use any font you want. As you noticed you need a vector font.

Set the appropriate vector font in the preferences and your printout should have text.

You can easily find vector fonts on the internet if you do not have any in your collection.
.
label_font.png
label_font.png (67.12 KiB) Viewed 1257 times
.
I hope this helps you.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
HowThatWorks
Posts: 40
Joined: Mon Feb 10, 2020 4:27 pm
Contact:

Re: HPGL plotter won't print TechDraw text.

Post by HowThatWorks »

What happens if you export to SVG instead of PDF? Inkscape can be a bit hinky with text when importing from PDF. It might also me an issue with fonts - if you haven't already, try installing OSIfont (on Windows you have to "install for all users"). You can download it from here: https://github.com/hikikomori82/osifont

And as de rigueur, make sure that you're using an up to date copy of FreeCAD.
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: HPGL plotter won't print TechDraw text.

Post by techGuy »

kaktus wrote: Wed Jun 22, 2022 12:24 pm The TechDraw preferences allow you to use any font you want. As you noticed you need a vector font.

Set the appropriate vector font in the preferences and your printout should have text.

You can easily find vector fonts on the internet if you do not have any in your collection.
I hope this helps you.
Thanks
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: HPGL plotter won't print TechDraw text.

Post by techGuy »

HowThatWorks wrote: Wed Jun 22, 2022 12:25 pm What happens if you export to SVG instead of PDF? Inkscape can be a bit hinky with text when importing from PDF. It might also me an issue with fonts - if you haven't already, try installing OSIfont (on Windows you have to "install for all users"). You can download it from here: https://github.com/hikikomori82/osifont

And as de rigueur, make sure that you're using an up to date copy of FreeCAD.
I'll test this out and get back to you. FWIW, I'm running 0.20 on Fedora.

I never thought to use SVG instead of PDF to go between FC and InkScape. Makes perfect sense though.
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: HPGL plotter won't print TechDraw text.

Post by techGuy »

I am not able to export my TechDraw page as Drawing (*.svg *.svgz *dxf) nor as Flattened SVG (*.svg). I get errors with both.

Flattened SVG gives me an un resizeable pop up window that has "Exp...led" in the title and getViewer in the body.

Drawing SVG give me "Export Failed. Export of this object type is not supported by the Drawing module.
HowThatWorks
Posts: 40
Joined: Mon Feb 10, 2020 4:27 pm
Contact:

Re: HPGL plotter won't print TechDraw text.

Post by HowThatWorks »

Interesting! I get the same errors when trying to File > Export as both a Flattened SVG (the popup is "Export Failed") and a Drawing SVG, but it works if I try to File > Export to Technical Drawing (*.SVG *.DFX *.PDF). The TechDraw_ExportPageSVG button still works - that's what I normally use anyway.

I don't know if this counts as a bug - exporting to Flattened SVG and Drawing SVG may be meant for other modules.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: HPGL plotter won't print TechDraw text.

Post by wandererfan »

HowThatWorks wrote: Fri Jun 24, 2022 9:31 am ...it works if I try to File > Export to Technical Drawing (*.SVG *.DFX *.PDF). The TechDraw_ExportPageSVG button still works....

I don't know if this counts as a bug - exporting to Flattened SVG and Drawing SVG may be meant for other modules.
Export to Technical Drawing & ExportPageSVG are definitely the ones to use for a TD page.

Flattened Svg is for direct 3D object to Svg export, Drawing Svg is for the deprecated Drawing WB.
HowThatWorks
Posts: 40
Joined: Mon Feb 10, 2020 4:27 pm
Contact:

Re: HPGL plotter won't print TechDraw text.

Post by HowThatWorks »

wandererfan wrote: Fri Jun 24, 2022 3:14 pm Flattened Svg is for direct 3D object to Svg export, Drawing Svg is for the deprecated Drawing WB.
Ah! Thanks for the explanation.
Post Reply