Print bug with differently sized subsheets [fix requires wxWidgets 3.1.1]

Bug #1464773 reported by Chris Pavlina
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KiCad
New
Unknown

Bug Description

An interesting thing happens if you print with certain combinations of differently sized subsheets - but not all combinations. Try this:

Make a schematic with a root sheet and two subsheets.
Set the root schematic and the *second* subsheet (in the order of the hierarchical list) to USLetter.
Set the *first* subsheet to A4.
Print.

The third page will be blank.

It seems to me that the error occurs when you start with a smaller page, move to a larger page, and then go back to a smaller page, but I haven't tried enough combinations to know for sure. This doesn't happen on Plot, only Print (though it does happen if you print to PDF, so no need to waste paper).

Application: kicad
Version: (after 2015-may-25 BZR unknown)-product debug build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.2.1,wx containers,compatible with 2.8)
Platform: Linux 4.0.4-2-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.58.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

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

Looks like a strange behavior of wxWidgets print system.
It happens also on Windows.

Changed in kicad:
status: New → Confirmed
summary: - Linux print bug with differently sized subsheets
+ Print bug with differently sized subsheets
Revision history for this message
jean-pierre charras (jp-charras) wrote : Re: Print bug with differently sized subsheets

I committed a workaround in revision 5747.

I leave this report open, because the issue is not fixed (I am thinking this is a wxWidgets issue).
At least, with this workaround, the printing does not print a blank page.

Revision history for this message
PatrickMULOT (pm-r) wrote :

I have a similar bug. I have a project containing a sheet and four sub-sheets. when I want to print all sheets in a PDF file, I have the main sheet, the first two sub-sheets, an empty page, and it lacks the fourth sub-sheet (fifth page).
By cons, if I select a single page in the preview, this page will not print.

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

Without the kicad version, a bug report is not very useful.
This bug is more than one year old.

Revision history for this message
Eldar Khayrullin (eldar) wrote :

Same bug.

Application: kicad
Version: no-vcs-found-9c2ebf3~58~ubuntu16.10.1, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.50.1 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.33 librtmp/2.3
Platform: Linux 4.8.0-44-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.61.0
Curl: 7.50.1
KiCad - Compiler: GCC 6.2.0 with C++ ABI 1010
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  KICAD_SCRIPTING_ACTION_MENU=ON
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=ON

Revision history for this message
Eldar Khayrullin (eldar) wrote :

I have project with the main sheet format A2 and two subsheets A1 and A3

Revision history for this message
Dan Weatherill (dan-weatherill) wrote :

I'm not able to reproduce this on current master.
What happens for me is that all three pages have content, but they are all set to US Letter. The A4 page has A4 sized content but printed on a US Letter size page

Revision history for this message
Jeff Young (jeyjey) wrote :
Revision history for this message
Jeff Young (jeyjey) wrote :

I believe we can use a DC transform matrix to fix both these issues. Sadly it's only available on MSW until wxWidgets 3.1.1.

Note that the issue in #7 is by-design. If you tell the printer to print on US Letter paper, then we have to scale A4 content to fit.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 441c2c240fd68e1c6f84acf28e4d8c05d5e2e613
https://git.launchpad.net/kicad/patch/?id=441c2c240fd68e1c6f84acf28e4d8c05d5e2e613

Changed in kicad:
status: Confirmed → Fix Committed
assignee: nobody → Jeff Young (jeyjey)
Jeff Young (jeyjey)
Changed in kicad:
status: Fix Committed → Triaged
assignee: Jeff Young (jeyjey) → nobody
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote : Re: [Bug 1464773] Re: Print bug with differently sized subsheets

On 09/08/19 12:26, Jeff Young wrote:

> Note that the issue in #7 is by-design. If you tell the printer to
> print on US Letter paper, then we have to scale A4 content to fit.
>

Scaling the content is good, but also should be rotated in the case you
have some sheets in landscape and some other in portrait mode in the
same schematic.

Now if you have two sheets, one portrait, one landscape, both A4, one is
printed correctly and the other is not rotated but scaled (so the drawn
area ends up being an A5 portrait drawn on an A4 landscape or vice-versa).

Using "plot" to create a pdf does not have the issue.

-Tested on tagged version 5.1.4.
-Also tested on commit 17d015ed5d662ca06b446fda0f84524f8e92006b.

P.S.: I did not test today's commits so if this has been fixed yet...
just drop ths message.

Cheers,
Dino.

Revision history for this message
Jeff Young (jeyjey) wrote : Re: Print bug with differently sized subsheets

@Dino, the rotation thing has been "fixed", but requires us to move to a more recent version of wxWidgets everywhere except MSW. (I think, anyway. I've no MSW to test it on.)

Jeff Young (jeyjey)
summary: - Print bug with differently sized subsheets
+ Print bug with differently sized subsheets [fix requires wxWidgets
+ 3.1.1]
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Jeff, I think this is broken on Windows with wxWidgets 3.0.4 as well. I did some testing and the scaling different sheet sizes and the portrait rotation do not appear to be correct. I've attached images of the print preview of the issues.

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

@Jeff, I think this is broken on Windows with wxWidgets 3.0.4 as well. I did some testing and the scaling different sheet sizes and the portrait rotation do not appear to be correct. I've attached images of the print preview of the issues.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :
Jeff Young (jeyjey)
Changed in kicad:
importance: Medium → Low
tags: added: wxwidgets
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1831

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Low → Unknown
status: Expired → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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