Print Preview shows black background

Bug #1819933 reported by Seth Hillbrand
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Jon Evans

Bug Description

1) Open eeschema
2) Select "Print"
3) Click "Preview"

Rather than showing the background of the page as white (or the schematic background color), the background is black as seen in the attached image.

Application: kicad
Version: (5.1.0-11-g23086deccd), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: Clang 7.0.1 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

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

@Seth, are you still having this issue? I'm not seeing this on windows so it may be a linux specific issue.

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

I saw that only using wxWidgets compiled with GTK3.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Yes. As JP notes, appears to be limited to GTK3

tags: added: gtk3 printing
Revision history for this message
Jim Groves (jgroves9) wrote :

I'm having the same issue - another datapoint:

Application: kicad
Version: 5.1.0-060a0da~80~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.18.0-17-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Changed in kicad:
milestone: 5.1.1 → 5.1.2
Changed in kicad:
milestone: 5.1.2 → 5.1.3
Revision history for this message
Ian McInerney (imcinerney) wrote :

I see this as well (Ubuntu 18.04, wxWidgets 3.0.4 with GTK+ 3.22). While the KiCad preview window has a black background, the color scheme in the actual printout and the system preview window is correct (e.g. not black background).

It appears that the wxPrintPreview object is not guaranteed to have reliable operation on non-Windows systems, they have even noted that in the documentation page: https://docs.wxwidgets.org/3.1/classwx_print_preview.html. Perhaps something lower in the wxPrintPreview object call (outside KiCad) is causing this behavior on Linux?

Revision history for this message
Ian McInerney (imcinerney) wrote :
tags: added: eeschema
Revision history for this message
Ian McInerney (imcinerney) wrote :

A search of the wxWidgets issues reveals this one: https://trac.wxwidgets.org/ticket/18371. They report seeing black across the entire page in the print preview in the sample program. So this appears to be upstream from kicad.

Revision history for this message
Jon Evans (craftyjon) wrote :

Fixed in 720b26d11e4431978e9070b98d0198679a2ccb3b

Changed in kicad:
assignee: nobody → Jon Evans (craftyjon)
status: New → Fix Committed
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.