Printing from eeschema and pcbnew always blank on Ubuntu 12.04

Bug #1089027 reported by Mark Burton
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Hi,

I am using the BZR version of kicad (currently at 3844 but it has been broken for as long as I can remember) and printing either to a printer or a file just produces empty pages. The files contain some postscript header stuff but never any actual drawing data.

This is very annoying as I always like to print out my pcb designs to check the footprints and other mechanical details.

The preview window does show the pcb layers that have been selected so that much is working OK.

OS is Ubuntu 12.04.1, machine is i386 laptop with an Intel graphic card. The problem is the same when I am using a vnc X server
so I don't think it's related to the X server in use.

Cheers,

Mark

Tags: printing
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Do you get the proper output in the print preview window? If so, then something is likely broken between KiCad and the printer. I just fixed this in r3826 and it works fine on the testing version of Debian GNU/Linux with wxWidgets 2.8.12 and Windows 7 using wxWidgets 2.9.4. Please open any KiCad application and select Help->Copy Version Information then copy the contents of the clipboard to this bug report. Also include the print settings that you are using. I know there are still a few remaining rough edges when using custom scale factors.

Revision history for this message
Mark Burton (burtoogle) wrote :

Hi Wayne,

Thanks for the quick response.

Yes, the preview window looks as expected (BTW, the preview window ignores the WM close window button, is that a tiny bug?)

The print settings I am using are normally: accurate scale 1, black and white, A4 paper, landscape. I have tried all sorts of combinations of print options and nothing appears to make the output appear.

I am building kicad with no other options apart from specifying the stable version.

Application: Pcbnew
Version: (2012-12-10 BZR 3844)-stable
Build: wxWidgets 2.8.12 (no debug,Unicode,compiler with C++ ABI 1002,GCC 4.6.3,wx containers,compatible with 2.6)
Platform: Linux 3.2.0-33-generic-pae i686, 32 bit, Little endian, wxGTK
Boost version: 1.49.0
Options: USE_PCBNEW_NANOMETRES=ON
         KICAD_GOST=OFF
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         USE_BOOST_POLYGON_LIBRARY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF

I am attaching the PostScript output that was generated when I tried to print (to file) a single layer of a small pcb.

Revision history for this message
Mark Burton (burtoogle) wrote :

How do I turn on the wxLogTrace() output that is in printout_controller.cpp? I can't find any obvious means of doing that.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1089027] Re: Printing from eeschema and pcbnew always blank on Ubuntu 12.04

On 12/11/2012 6:06 PM, Mark Burton wrote:
> How do I turn on the wxLogTrace() output that is in
> printout_controller.cpp? I can't find any obvious means of doing that.
>
I confirmed your print problem on my system. I guess I forgot to
actually do a hard copy and only tested the preview. I'm getting feeble
minded in my old age. I will take another look at it on Linux as soon
as I get some time. To see the printing trace output, open a terminal
and type:

export WXTRACE=KicadPrinting

Launch a debug version of Pcbnew from the command line. Do not run
Pcbnew from KiCad or it will crash because the debug output is not
redirected to stdout.

Revision history for this message
Mark Burton (burtoogle) wrote :

Hi Wayne,

Good news, I have solved the problem.

I needed to install libgnomeprint which I did not have before because I use KDE. Sorry if that is in the kicad docs, if so, I missed it.

Now, when you print you get a different print dialog.

One thing though, the quality of the text in the eeschema printout leaves much to be desired, looks like a font issue.

Anyway, many thanks for your help.

Cheers,

Mark

Revision history for this message
Mark Burton (burtoogle) wrote :

I attach a PDF file printed from eeschema (using libgnomeprint) which shows the font quality issue. Actual printed output looks similar. Perhaps I need to install some other library/fonts to get better quality output?

Revision history for this message
Mark Burton (burtoogle) wrote :

Sorry, another issue is that the eeschema print dialog appears to grab the focus such that when the libgnomeprint dialog appears if you press the preview button in that, the preview window appears but doesn't get the focus (no buttons work) . Closing the kicad print dialog then allows the libgnomeprint preview window buttons to be functional.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 12/12/2012 4:29 AM, Mark Burton wrote:
> I attach a PDF file printed from eeschema (using libgnomeprint) which
> shows the font quality issue. Actual printed output looks similar.
> Perhaps I need to install some other library/fonts to get better quality
> output?
>
> ** Attachment added: "PDF printed from eeschema using libgnomeprint showing font quality"
> https://bugs.launchpad.net/kicad/+bug/1089027/+attachment/3458098/+files/output.pdf
>
As far as I know, fonts aren't really fonts in the traditional sense in
KiCad. They are defined internally and drawn with segments. I never
could figure out why they look so poor when printing on Linux. They
print reasonably well on Windows. Given that their drawn the same way
on both platforms as opposed to using the native font rendering I would
expect the fonts to appear the same.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 12/12/2012 4:17 AM, Mark Burton wrote:
> Hi Wayne,
>
> Good news, I have solved the problem.
>
> I needed to install libgnomeprint which I did not have before because I
> use KDE. Sorry if that is in the kicad docs, if so, I missed it.
>
> Now, when you print you get a different print dialog.
>
> One thing though, the quality of the text in the eeschema printout
> leaves much to be desired, looks like a font issue.
>
> Anyway, many thanks for your help.
>
> Cheers,
>
> Mark
>
Mark,

Thanks for doing the leg work on this. I did some testing and found
that printing directly from the Pcbnew print dialog it seems to work
correctly. It's only when printing from the print preview window that I
get blank pages. I'm not sure if libgnomeprint is installed on my
system but I don't think it is because my Linux install is post Gnome 3.
  Apparently the wxWidgets packager doesn't know that libgnomeprint is a
dependency or at least a recommendation. It would be nice if you would
get some kind of warning about it. I'm not sure if I should change the
status of this bug report since on the surface it appears to be an issue
with printing on Linux rather than an issue with KiCad.

Wayne

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 12/12/2012 4:35 AM, Mark Burton wrote:
> Sorry, another issue is that the eeschema print dialog appears to grab
> the focus such that when the libgnomeprint dialog appears if you press
> the preview button in that, the preview window appears but doesn't get
> the focus (no buttons work) . Closing the kicad print dialog then allows
> the libgnomeprint preview window buttons to be functional.
>
I'm not sure there is a sane solution for this other than possibly
dismissing the Pcbnew print dialog when you open the print preview
window. I don't know if this behavior would be acceptable or not. I'll
take a look at how it is handled on other applications versus what we
are doing in KiCad and see if I can come up with a solution.

Revision history for this message
Mark Burton (burtoogle) wrote :

Hi Wayne,

Thanks for your responses.

I'm happy for the moment because I can now print from pcbnew which was my main gripe.

The dialog focus issue is not a show stopper as long as people are aware of the problem. Likewise, the fact that the kicad print preview window frame close button not functioning.

If I get some spare time I shall see if I can understand why the print quality of the eeschema text is so poor.

I note that if you plot from eeschema to, say, PDF, the text quality is good.

Thanks again for your help.

Cheers,

Mark

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 12/12/2012 10:13 AM, Mark Burton wrote:
> Hi Wayne,
>
> Thanks for your responses.
>
> I'm happy for the moment because I can now print from pcbnew which was
> my main gripe.
>
> The dialog focus issue is not a show stopper as long as people are aware
> of the problem. Likewise, the fact that the kicad print preview window
> frame close button not functioning.
>
> If I get some spare time I shall see if I can understand why the print
> quality of the eeschema text is so poor.
>
> I note that if you plot from eeschema to, say, PDF, the text quality is
> good.
>
> Thanks again for your help.
>
> Cheers,
>
> Mark
>
Mark,

Your welcome. I also came across some interesting information that may
shed some more light on the current printing situation on Linux. From
the wxWidgets 2.8.12 documentation:

http://docs.wxwidgets.org/stable/wx_unixprinting.html#unixprinting

and see the note from the wxPrintPreview documentation in wxWidgets 2.9.4:

http://docs.wxwidgets.org/trunk/classwx_print_preview.html

It looks like the print quality situation may improve when wxWidgets 3
is released and makes it's way into your favorite distro but the
wxPrintPreview issue looks like it will continue for the foreseeable
future unless someone steps up and writes a native GTK+ print preview
class. This is why cross platform development is hard. Sigh!

Best Regards,

Wayne

Revision history for this message
Clyde R. Shappee (clydes) wrote :

In version BZR4022 plotting a schematic to postscript in B/W renders a white, blank page. In color, I get a solid red background and missing components.

In version BZR3256 it appears to work correctly in either case.

Both of these happen under Ubuntu 12.04LTS.

Revision history for this message
KK (krzyklo) wrote :

Hello

I am also affected by this issue. It seems, that for MB adding libgnomeprint allowed to force KiCad to print. I installed libgnomeprint2.2-0 , and still getting blank pages when trying to print from EEschema.

I tried to investigate what happens in background by enabling debugging by export WXTRACE=KicadPrinting, and starting eeschema from konsole, but I didn't get anything obvious... output attached below.

I would appreciate an advice from someone, who managed to force KiCad to print in (K)Ubuntu 12.04 LTS, or any clues how to pinpoint the root cause of this issue on my system..

My version of KiCad:
Application: Eeschema
Version: (2013-jul-07)-stable
Build: wxWidgets 2.8.12 (no debug,Unicode,compiler with C++ ABI 1002,GCC 4.6.3,wx containers,compatible with 2.6)
Platform: Linux 3.5.0-41-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.53.0
Options: USE_PCBNEW_NANOMETRES=ON
         KICAD_GOST=OFF
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF

Konsole output when printing blank page attached as txt file.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Printing on wxWidgets works only since wxWidgets 3.0.
This is a wxWidgets bug, not a Kicad bug
Use wxWidgets 3.0 and the current stable sources from bzr to build a working Kicad version.

Revision history for this message
Clyde R. Shappee (clydes) wrote : Re: [Bug 1089027] Re: Printing from eeschema and pcbnew always blank onUbuntu 12.04

Why do previous versions work on the same machine?

The problems I am seeing are with A sized sheets. I have not done the
science experiments on others, but I think B size is ok.

With version 2012-01-19 plot to postscript and then converting to PDF will
make usable output, but the right hand side is cut off. Printing from the
plotted postscript works the same way.

Going back a ways, version 2011-07-08 has the same bugs with postscript,
but print to file and converting that postscript output to .pdf is fine.

Please advise.

If you still think this is a wxWidgets problem, some help on doing the
build would be appreciated.

Clyde

> Printing on wxWidgets works only since wxWidgets 3.0.
> This is a wxWidgets bug, not a Kicad bug
> Use wxWidgets 3.0 and the current stable sources from bzr to build a
> working Kicad version.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1089027
>
> Title:
> Printing from eeschema and pcbnew always blank on Ubuntu 12.04
>
> Status in KiCad EDA Software Suite:
> New
>
> Bug description:
> Hi,
>
> I am using the BZR version of kicad (currently at 3844 but it has been
> broken for as long as I can remember) and printing either to a printer
> or a file just produces empty pages. The files contain some postscript
> header stuff but never any actual drawing data.
>
> This is very annoying as I always like to print out my pcb designs to
> check the footprints and other mechanical details.
>
> The preview window does show the pcb layers that have been selected so
> that much is working OK.
>
> OS is Ubuntu 12.04.1, machine is i386 laptop with an Intel graphic card.
> The problem is the same when I am using a vnc X server
> so I don't think it's related to the X server in use.
>
> Cheers,
>
> Mark
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1089027/+subscriptions
>

Revision history for this message
Clyde R. Shappee (clydes) wrote :

It is also not clear that there is a version of wxWidgets 3.0 for Ubuntu
12.04.

From the wxWidgets site

(http://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu)

Note that as of August 2012 there are no packages for Ubuntu 11.10
(Oneiric) or 12.04 (Precise)

> Printing on wxWidgets works only since wxWidgets 3.0.
> This is a wxWidgets bug, not a Kicad bug
> Use wxWidgets 3.0 and the current stable sources from bzr to build a
> working Kicad version.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1089027
>
> Title:
> Printing from eeschema and pcbnew always blank on Ubuntu 12.04
>
> Status in KiCad EDA Software Suite:
> New
>
> Bug description:
> Hi,
>
> I am using the BZR version of kicad (currently at 3844 but it has been
> broken for as long as I can remember) and printing either to a printer
> or a file just produces empty pages. The files contain some postscript
> header stuff but never any actual drawing data.
>
> This is very annoying as I always like to print out my pcb designs to
> check the footprints and other mechanical details.
>
> The preview window does show the pcb layers that have been selected so
> that much is working OK.
>
> OS is Ubuntu 12.04.1, machine is i386 laptop with an Intel graphic card.
> The problem is the same when I am using a vnc X server
> so I don't think it's related to the X server in use.
>
> Cheers,
>
> Mark
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1089027/+subscriptions
>

Revision history for this message
Kenneth Martin (marjin) wrote :

For info:
OS: Ubuntu 13.04 32-bit
KiCad: Build: (21014-01-10 BZR 4027)-stable
Print Status: can see in preview, when printing from either preview or directly eeschema, to either a file or to the printer, the page is blank. Installed libgnomeprint2.2-0, but this made no difference.

Revision history for this message
Günther Vlaschits (guenther-vlaschits) wrote :

I think it's the fault of the document viewer "evince". I changed to "ocular" and can now preview my postscript files without problems.

Best Regards

Revision history for this message
Günther Vlaschits (guenther-vlaschits) wrote :

Sorry for misspelling: I meant "okular"!

Revision history for this message
Clyde R. Shappee (clydes) wrote :

I recently built from source BZR 4661 and it did not have the problem. BZR 4022 and okular still made blank pages.

The perennial problem of not properly printing to Postscript to an A sized sheet still exists in BZR 4661 under Linux. Will this ever get fixed???

Thanks for at least exposing me to okular.

Clyde

Revision history for this message
KK (krzyklo) wrote :

Clyde R.Shappee and Jean-Pierre Charras, thanks for suggestions, and help.

Problem solved by installing WxWidgets 3.0 and newest KiCad BZR4661 (Kubuntu 12.04)

1. Installation of WxWidgets 3.0 from source using this instructions http://codelite.org/LiteEditor/WxWidgets30Binaries#toc2 BZR4661
2. Installation of KiCad using (http://www.kicad-pcb.org/display/DEV/Building+KiCad+on+Linux).
3. perhaps irrelevant, but I added in the process also packet, as it was mentioned in suggested, and wasn't installed by build-dep: libgnomeprintui2.2-0

**Word of caution, PDF's generated by KiCad loads ~10s, so please show a little patience and do not close PDF immediatelly, when you will see blank page in Okular ;-)**

Side note, on BZR4660 with WxWidgets 2.8 (system default) I got distorted fonts, as other people above.

Martin Errenst (imp-d)
tags: added: printing
Revision history for this message
Nick Østergaard (nickoe) wrote :

Seems to be fixed by using wx3.0, marking as fixed.

Changed in kicad:
status: New → Fix Committed
Revision history for this message
Brian J Hoskins (subscriptions-w) wrote :

I am using wx3.0.2, but it's not fixed for me. Here are the details from my 'about' box:

Application: kicad
Version: 0.201503130816+5508~22~ubuntu14.04.1-product Release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.2,wx containers,compatible with 2.8)
Platform: Linux 3.13.0-46-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON
         KICAD_USE_WEBKIT=OFF

When I try to print I just get blank pages.

Jon Neal (reportingsjr)
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.