Discussion:
Print monochromatic schematic?
(too old to reply)
Jason White
2014-04-12 16:09:06 UTC
Permalink
I am using the latest version of gSchem and would like to print my
schematics in a nice readable black and white format. Under the view
menu there is a black and white color scheme, however printing always
seems to use the light color scheme which features green and blue
elements/text that is almost unreadable on my printer. Presumably this
is a bug/unimplemented feature.

Is there any way currently to print schematic pages monochrome?

Thanks,
Jason White
Alexey Shaposhnikov
2014-04-12 16:59:02 UTC
Permalink
On Sat, 12 Apr 2014 12:09:06 -0400
I am using the latest version of gSchem and would like to print my schematics
in a nice readable black and white format.
[...]
Is there any way currently to print schematic pages monochrome?
If "latest" mean "git" or "unstable" (1.9 branch) then you can just use
--no-color option of gaf export.
--
С уважением, Алексей Шапошников.
Stefan Salewski
2014-04-12 17:12:19 UTC
Permalink
Post by Jason White
Is there any way currently to print schematic pages monochrome?
You may be able to select black&white in your printer dialog.

For gschem 1.8.2 we have

cat /usr/share/gEDA/system-gschemrc

; output-color string
;
; Controls if output (postscript) is color (enabled) or black/white
(disabled)
;
(output-color "disabled")
;(output-color "enabled")

Maybe there are (more) similar options in gschem 1.9.x
Jason White
2014-04-12 18:11:10 UTC
Permalink
Post by Stefan Salewski
Post by Jason White
Is there any way currently to print schematic pages monochrome?
You may be able to select black&white in your printer dialog.
Sadly it is a gray-scale only printer, no option for that.
Post by Stefan Salewski
For gschem 1.8.2 we have
cat /usr/share/gEDA/system-gschemrc
; output-color string
;
; Controls if output (postscript) is color (enabled) or black/white
(disabled)
;
(output-color "disabled")
;(output-color "enabled")
Maybe there are (more) similar options in gschem 1.9.x
I pasted (output-color "disabled") into my local gafrc file using the
gSchem 1.9.1 release. It does day it loaded the RC file however it
does not effect print operation.

I took a look at the source code and the function In x_print.c:
x_print_draw_page on line 139 (ish), take and argument is_color.
Forcing this value to zero causes monochromatic printing as desired.
Looking at the source reveals two problems.

First hadling of color vs mono printing is not consistent between the
three functions below. As far as I can tell you cannot actually invoke
x_print_export_pdf and x_print_export_pdf_page from the gui as I tried
exporting PDFs and PDF pages and only draw_page__print_operation was
called.

Second, when the view is set to black and white in gSchem
CFG_KEY_PRINTING_MONOCHROME is not being set in the global project
configuration.

Also, it seems that w_current->toplevel->image_color is depreciated
yet still compiles? hmm...


Below are the Functions "that print" in x_print.c and the ways they
determine if the project is monochrome

In x_print.c function on line 220 (ish): draw_page__print_operation
is_color = !eda_config_get_boolean (cfg, CFG_GROUP_PRINTING,
CFG_KEY_PRINTING_MONOCHROME, NULL);

In x_print.c function on line 338 (ish): x_print_export_pdf
is_color= w_current->toplevel->image_color

In x_print.c function on line 273 (ish): x_print_export_pdf_page
is_color = !eda_config_get_boolean (cfg, CFG_GROUP_PRINTING,
CFG_KEY_PRINTING_MONOCHROME, NULL);


Okay, so that brings up a question I would like to make a patch to fix
this printing issue. However, I cannot find the file and related
functions which are called from the the menu View->Dark/Light/BW where
the color scheme is set. Does anyone have any pointers?
--
Jason White
Jason White
2014-04-12 20:46:09 UTC
Permalink
Okay, I have found it and have created a patch to fix this. Starting a
new threak

On Sat, Apr 12, 2014 at 2:11 PM, Jason White
Post by Jason White
Post by Stefan Salewski
Post by Jason White
Is there any way currently to print schematic pages monochrome?
You may be able to select black&white in your printer dialog.
Sadly it is a gray-scale only printer, no option for that.
Post by Stefan Salewski
For gschem 1.8.2 we have
cat /usr/share/gEDA/system-gschemrc
; output-color string
;
; Controls if output (postscript) is color (enabled) or black/white
(disabled)
;
(output-color "disabled")
;(output-color "enabled")
Maybe there are (more) similar options in gschem 1.9.x
I pasted (output-color "disabled") into my local gafrc file using the
gSchem 1.9.1 release. It does day it loaded the RC file however it
does not effect print operation.
x_print_draw_page on line 139 (ish), take and argument is_color.
Forcing this value to zero causes monochromatic printing as desired.
Looking at the source reveals two problems.
First hadling of color vs mono printing is not consistent between the
three functions below. As far as I can tell you cannot actually invoke
x_print_export_pdf and x_print_export_pdf_page from the gui as I tried
exporting PDFs and PDF pages and only draw_page__print_operation was
called.
Second, when the view is set to black and white in gSchem
CFG_KEY_PRINTING_MONOCHROME is not being set in the global project
configuration.
Also, it seems that w_current->toplevel->image_color is depreciated
yet still compiles? hmm...
Below are the Functions "that print" in x_print.c and the ways they
determine if the project is monochrome
In x_print.c function on line 220 (ish): draw_page__print_operation
is_color = !eda_config_get_boolean (cfg, CFG_GROUP_PRINTING,
CFG_KEY_PRINTING_MONOCHROME, NULL);
In x_print.c function on line 338 (ish): x_print_export_pdf
is_color= w_current->toplevel->image_color
In x_print.c function on line 273 (ish): x_print_export_pdf_page
is_color = !eda_config_get_boolean (cfg, CFG_GROUP_PRINTING,
CFG_KEY_PRINTING_MONOCHROME, NULL);
Okay, so that brings up a question I would like to make a patch to fix
this printing issue. However, I cannot find the file and related
functions which are called from the the menu View->Dark/Light/BW where
the color scheme is set. Does anyone have any pointers?
--
Jason White
--
Jason White
Vladimir Zhbanov
2014-08-04 10:09:58 UTC
Permalink
On Sat, Apr 12, 2014 at 02:11:10PM -0400, Jason White wrote:
...
Post by Jason White
I pasted (output-color "disabled") into my local gafrc file using the
gSchem 1.9.1 release. It does day it loaded the RC file however it
does not effect print operation.
The 1.9 series versions have a new config system.
See http://wiki.geda-project.org/geda:gaf_utility and gaf(1) for
details.

In your case you can just do:
gaf config --user gschem.printing monochrome true

...
Post by Jason White
First hadling of color vs mono printing is not consistent between the
three functions below. As far as I can tell you cannot actually invoke
x_print_export_pdf and x_print_export_pdf_page from the gui as I tried
exporting PDFs and PDF pages and only draw_page__print_operation was
called.
You can export pdf using either gschem print dialog or 'gaf export'
command. These are different ways and they use different settings. In
the first case, the 'gschem.printing' settings will be used; and you can
find the required settings for the second case if you'll read the above
pages.

...
Post by Jason White
Okay, so that brings up a question I would like to make a patch to fix
this printing issue. However, I cannot find the file and related
functions which are called from the the menu View->Dark/Light/BW where
the color scheme is set. Does anyone have any pointers?
gschem has different color maps for viewing and printing. See
http://wiki.geda-project.org/geda:gschem_ug:config
You can also make your own printing color map which will suit your
needs. If you want, you can use this way to make B&W colormap and even
make some elements (e.g. square end cues of unconnected nets) invisible
when printing.

Loading...