EEschema Print to PDF. Schematic too far right on sheet

When printing schematics to PDF, the graphic is placed too far to the right on the sheet.
A4, Landscape.

The top and bottom borders are fine, but the left border is too wide, and the right border is extremely narrow.

I’ve not found a setting to modify the page margins anywhere. Any other suggestions?

Thank You.

So you’re saying the whole frame, including the title block is displaced? Works fine here so it may be something in your situation. not something inherent in Kicad. What about other applications, e.g. OpenOffice, etc? Post details of your software version, OS, etc. Can you also upload a PDF generated on your system so we can view?

All other applications work correctly, I tested it before posting here (LibreOffice, drawing/photo programs etc.)
KiCAD is 5.1.6, OS is Lubuntu 20.04LTS.
I attach an example PDF.

Sync_prog_Nbit_counter_RC.pdf (114.6 KB)

Hmm, it does look displaced in the viewer. A couple of things, is it also displaced in the preview in the eeschema print dialog? Has it worked before with a different version of Kicad and/or Lubuntu?

Can confirm, solution was given to me by Rene in this post which is to plot to PDF instead of print to PDF. Even though earlier version of KiCad in post just tried in 5.1.6 and still same offset. Linux 20.04.
Just checked and in my schematics drawn in Portrait mode both Print and Plot yield the correct result. Just shows in Landscape mode.

Just tried that: in the print to PDF file preview it looks perfect. Only the final file is off.

As to previous versions: can’t say, I’m new to Lubuntu and KiCAD (~1 year).

Looks like print to PDF function in eeschema hasn’t got the hang of correct output when going through the system’s PDF generator. In the case of print, the producer is Cairographics, and for plot the producer is eeschema. The other difference seen in the properties panel is that the print output shows a custom size somewhat different from A4, whereas the plot output shows the correct A4 size.

I guess using plot is the workaround.

Could you elaborate, please? I only see A4 (210 x 297) no matter where I look.

Workaround? My list of those is slowly becoming unmanageable :frowning:

Here’s a screenshot of the properties panel when viewing the output of print to PDF with okular.


The crazy thing is that it sometimes changes if I change the orientation, and sometimes it comes right. It looks like eeschema is not passing on some dimensions, perhaps via the intermediate format (Postscript?). This is just a surmise though. Other apps can generate correct output via the system print dialogue so eeschema is failing to do something.

Then again evince seems to get the dimensions right so maybe okular is not getting all the info it needs.

BTW, I’m just a user like you so there’s probably a bug report over this that you can give a thumbs up to.

I think that I remember a bug fix on 5.1.6 to do with a printing offset

No, Cairo is not used for the printing in Eeschema, only in Pcbnew. This problem would be fixed by using Cairo for printing though, but that is a large change that probably won’t happen in this dev cycle.

There is a bug, but it isn’t fixed: and the previous attempt at fixing it actually broke things even more.

So how come the PDF file has the attribute produced by Cairo? See screenshot of the Properties panel above.

Edit: I think you overinterpreted what I wrote. What I wrote was that the producer of the output file was Cairo, not that eeschema uses Cairo. In fact I’m guessing that it’s because eeschema generates another intermediate format which is then converted to PDF by the system’s Cairo, that the problem arises and the fix would be to cut out the extra conversion as you say.

I Thank You All.

At least I’m not crazy and it really seems to be a bug.
I can live with it, the complete schematic is still on the page, it’s more of an aesthetic problem.

Based on kenyapcomau’s screenshot of the properties panel, I suspect that someone entered the wrong paper size just before going to lunch. As KiCAD unfortunately has the bad habit of hard coding this kind of data, there’s probably not a lot one can do.

I’ll use the PDF Print function for intermediate prints, and Plot for final artwork.

Ah no. I don’t take long liquid lunches. :stuck_out_tongue: It was entered as A4. Even yours showed a custom size now and then. My surmise is that okular did not find something in the PDF, maybe bounding box, but had to fall back to measuring it from the entities on the page. Evince somehow managed to get it right, perhaps it rounded it to the nearest official size. But evince took an awfully long time to render the page, so who knows what it was doing. I could decode the PDF streams (it’s compressed) to see what the PDF looks like, but there are more interesting things to spend time on.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.