Print from schematic editor is not centered on paper

When I print from the schematic editor, the schematic is not centered on the paper.

Is someone else able to reproduce this?
I’m curious to see both if it reproduces on other OS:es (Mac, Windows) and other flavours of Linux as well as others running fedora.

I have just created a new project, opened the schematic editor and printed the empty drawing sheet. You can try the same and/or use this archived test project:

KiCad_test_20230826_print_centering_on_page.zip (12.8 KB)

Print preview looks ok:

But the result when I actually print is offset to the right on the paper:

output.pdf (11.9 KB)

I get the same when I print to an actual printer too, not just when printing to pdf.

Version info for the above results:

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.99.0-1.20230826git22256c9.fc38, release build

Libraries:
wxWidgets 3.2.2
FreeType 2.13.0
HarfBuzz 7.1.0
FontConfig 2.14.2
libcurl/8.0.1 OpenSSL/3.0.9 zlib/1.2.13 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh/0.10.5/openssl/zlib nghttp2/1.52.0

Platform: Fedora Linux 38 (KDE Plasma), 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Aug 26 2023 17:18:29
wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 8.0.1
ngspice: 41
Compiler: GCC 13.2.1 with C++ ABI 1018

Build settings:

Could it be this issue,Schematic Not Centered in Printed Document (lp:#1832997) (#1907) · Issues · KiCad / KiCad Source Code / kicad · GitLab
Open for 4 years now

It is somewhat similar but in my case no USLetter size is involved in any step, everything is A4 and it still ends up offset to the right by roughly the same amount.

How was that “output.pdf” made? Did you do that by scanning a printed piece of paper back into your PC?

Overall, I do not have much appreciation for the default sheets. They waste quite a lot of the available printing area’s because of the wide margins around the sheet. Maybe this made sense 30 years ago, when stuff printed on paper was “offical documentation” and the edges of paper tend to wear more, get perforated for storage in ordners and such.

But in these modern times, it’s mostly to have a quick extra reference for when your monitor is too small, or to do a schematic review while sitting in the sun, then maybe make some notes on the paper, and dispose of it a day later.

As a workaround, you can design a custom sheet format, and then just shift the border a bit. Apparently quite a lot of people dispose of the border all together and delete or simplify the title block. I did this myself a few times but KiCad likes to resort to it’s own defaults too readily and after a while I gave up.

I did Print icon → Print (button) → choose print to file → Print (button) to produce output.pdf.

The workaround you describe implies that the whole design has to be shifted a certain amount left.

By the way, the board editor does not have this issue; there the drawing sheet ends up centered on the paper.

This is an issue persisting since years, I know it from 5.1, 6.0 and 7.0 and it has nothing to do with sheet sizes. It’s been reported several times.
No one really cares about it, but suggest a workaround by using plot to .pdf instead (which works correctly).

1 Like

Do you know if it is specific to linux or if it is the same on mac and windows?

It seems a little surprising that nobody cares; after all it works in the board editor, which shows that there exists a way to make printing work in KiCad. It just hasn’t been implemented in the schematic editor…

Kicad v7.07, Mac OSX Monterey

No problem with PDF
PCB via Print (at 1:1 setting and Fit-to-page) and via Plot
Schematic via Print and via Plot

1 Like

Thanks for testing, @BlackCoffee !

That would indicate that it differs among OS:es. I get the same offset in the schematic editor of 7.0.7 and 7.99 on fedora linux / KDE Plasma, but not from the board editor…

So I also did a print to pdf of both a schematic and a pcb file.
The PCB looks ok, but the schematic is indeed also shifted to the right side for me, and I can confirm this is not as it should be.
Here I opened the created pdf in xreader:

However, when I do the print to pdf again, and then instead do the print preview, then the image is not shifted.

So something is happening between generating the preview, and printing to a pdf.

I never took much notice of printing myself. The plot to pdf is also superior because it generates a pdf file with searchable text.
Apparently @ML9104 has some more experience with this, and apparently it’s reported before. Maybe he is willing to find some references or a gitlab issue you can upvote.

Tested in:

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.0.7-7.0.7~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.10.1
	HarfBuzz 6.0.0
	FontConfig 2.13.1
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Aug 13 2023 23:14:53
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.88.1
	ngspice: 38
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_SPICE=ON

2 Likes

Blimey ! I’ve just accepted this to be not worthy of anyone’s time :grinning: I don’t think I have ever had a print from the schematic editor that wasn’t missing the right hand side. I always thought it was a setup thing and never bothered about it as the info is all there.
:mouse:

1 Like

Thanks for testing, @paulvdh !
You seem to have the exact same behaviour as I (preview correct, print output offset) on a different distribution of Linux and different window manager.

Sorry, I never pursued this further. I noticed it first in 5.1 and tested it later in 6.0 and 7.0 with the same result. It’s been mentioned on this forum a few times and also on eevblog IIRC.
I found the plot to pdf superior and only use that, also because it preserves colours. Print is only B/W on my system (Lubuntu 20.04 on all KiCAD versions).

Can’t open your schematic because I don’t have 7.99. But I haven’t had this issue with printing on openSUSE KiCad 7.0.6 and previous versions.

Print goes through the OS specific rendering chain. I did notice your PDF level is version 1.7 produced by Cairo 1.17.8 whereas mine is version 1.5 produced by Cairo 1.16.

Here is a 7.0.7 version for you, @retiredfeline :slight_smile:
KiCad_test_20230826_7.0.7_print.zip (10.0 KB)

I did add a comment to the issue linked to by davidsrsb. It’s probably the same even though a different paper format is used (but strange he does not see it for A4).
But adding the difference between the Schematic and PCB may be a worthwhile clue for the developers in figuring out the cause.

1 Like

Just printed from @hmk file

Here’s the result:
output.pdf (10.0 KB)

Fully reproduceable.

Your project does indeed print with the wrong margins on my system.

I created a new project and used 3 paper sizes: A3, A4, and A5. The A4 version exhibits the same symptoms as yours, but the other two are fine. Maybe someone can make sense of this observation.

output-a3.pdf (8.1 KB)
output-a4.pdf (7.5 KB)
output-a5.pdf (6.8 KB)

I didn’t actually print on paper, just viewed the display shown by okular of the PDF.

1 Like

Very interesting observation that it is different depending on paper size!

For me the A4 prints the same (with offset) on pdf and paper.

Which implies that the problem lies somewhere between KiCAD and the printer driver (PDF print is also a driver).