Laidout / laidout

Laidout, desktop publishing software
GNU General Public License v3.0
80 stars 8 forks source link

exporting to pdf doesn't show overflow #29

Closed Falano closed 1 year ago

Falano commented 1 year ago

Hi! Thanks for developing laidout, it's very useful. I used it to print a couple small booklets at home, it went great. I now have another project, which uses double page pictures: each file I have actually takes two pages. I imported it to laidout (btw a "import multiple files but only put them in the project once every X pages" would be nice for longer projects of this type), and the Papers view shows what I expect. But when I export to pdf, it only shows the left part of the picture, with the right side always being blank, like some kind of page clipping were on (except page clipping doesn't react like that in Papers view either). I assume it's because the picture is technically held on the left page and only overflows on the right one. See attached picture with laidout on the left (the result I want) and the exported pdf on the right (the result I get).

I'm using laidout appimage 0.097.1 on Ubuntu 22.04.1 (when I start laidout, it tells me it could not load the gegInodes.so plugin)

Screenshot from 2023-05-17 10-42-01

tomlechner commented 1 year ago

Great that you are using Laidout!

For importing every X, I sort of coded that already but didn't document it. Testing it just now, it's slightly buggy. The gist is that in "Exactly this many" if you write 1/2 it will drop an image then skip 2 pages. The buggy part is that 1/1 doesn't drop 1 and skip 1. I think I meant for 1/n to be one image every n pages... I need to fix that! Really that whole dialog needs to be redone, it is a mess.

For the page bleed thing, I thought I had it so any images that bleed over in the "Page" view should be clipped and drawn appropriately in the exported "Papers" view. Apparently bugged! I'll look into it.

Is it just pdf that's like that? If you export to, say, SVG or image is it also wrong?

tomlechner commented 1 year ago

Also it would appear my travis CI builder is broken. I know there is more recent than October 2021!

Not sure why the geglnodes.so is not loading, it loads for me using the appimage, as long as there's no other geglnodes.so in known search paths.

From a terminal, could you run this command and post the result? (replace the appimage with the right name)

./Laidout-ae6b35e-x86_64.AppImage 2> temp.txt
grep 'dlerror\|geglnodes' temp.txt
tomlechner commented 1 year ago

Fixed the import every nth, so "m/n" in "Exactly this many" means import m images on every nth page (but always put some on the "start page").

Still working on the other stuff.

Falano commented 1 year ago

Hi! for the geglnodes, it told me this: loading plugin /tmp/.mount_Laidou9xl8CN/usr/share/laidout/0.097.1/plugins/geglnodes.so... dl opened... dlerror: addwindow: style: ffffffffc0260c08

(I'm not sure what it does, I mentioned it on the off-chance it was linked to the double page export issue)

other export formats: I think I did not have that before (I'm not sure), but now changing export formats is buggy. I think what happens is:

Image (and svg) exports double pages fine, but pdf still only exports half. When I tried, Image via ghostscript failed (when I click export, it thinks a bit, then laidout crashes; last line of temp.txt says "Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...") When it crashes due to changing the export format, last line of temp.txt is "Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"..." too.

I tested the new 1/n, it works great so far!

tomlechner commented 1 year ago

I think I got most of the Export Dialog crashing fixed. I'd recommend deleting your autolaidoutrc file.

Partially fixed (I hope) pdf object bleed for Papers layout. In testing, it looks like when exporting Singles, the pdf has the wrong page size.

geglnodes.so erroring is unrelated to the other issues. dl opened... dlerror: addwindow: style: ffffffffc0260c08 means a debugging message somewhere is outputting garbage characters to the console shortly after the "dlerror:" part, which may or may not be related to the actual dl opening.. So, still unsure why the geglnodes.so is not loading.. does it load for the non-appimage version?

Falano commented 1 year ago

Export dialog and pdf export with double page pictures: Great, thanks! It works on my end. Wrong page size in singles mode: It's not just pdf, it does that also with the Images export format when I use double page pictures (I haven't tested the others but I assume it's the same). Geglnodes: With the non-appimage version, I have no geglnodes error, it loads fine.

tomlechner commented 1 year ago

Located the problem, going to have to think about how best to fix it.. some bad 15 year old assumptions coming back to haunt me! It affects all non-Single impositions by applying a wrong default paper group to non-PaperLayout exports.

As a work around, you can use the Paper Group tool to create a paper group with a half paper size, place that over the page, then export. It will use that custom paper group instead of the default paper group, which for booklets defaults incorrectly to the whole paper, not just single pages.

tomlechner commented 1 year ago

Hopefully fixed wrong page size on export. It affected every export filter. Closing, and feel free to let me know of other issues, bugs, features you come across!