Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White border added when image spans spread #1083

Closed
AussieScorpio opened this issue Apr 12, 2024 · 10 comments
Closed

White border added when image spans spread #1083

AussieScorpio opened this issue Apr 12, 2024 · 10 comments
Labels
not our bug A bug that impacts PDF Arranger but is not in our code. This is probably a bug that we can't fix.

Comments

@AussieScorpio
Copy link

Describe the bug

My output is from Scribus. My desired final output is for web with facing pages. Scribus does not output a PDF with facing pages as a single spread, hence the need for PDF Arranger. If I have a document with an image that spans two pages of a spread. When I merge those two pages in PDF Arranger, a vertical white line appears down the right side of the left page of the spread. This line appears to be 1px wide and goes straight through the image on the spread. The line is visible in PDF Arranger depending on the zoom level, so it's not something that's introduced at export time.

To Reproduce

Open a PDF with single pages that are intended to be facing pages and where an image spans the two pages of a spread.
Merge the two pages to form a single spread with the image spanning the spread.
Optionally export the result just to prove the line is not to show the page extent while using PDF Arranger.

Expected behavior

The image should appear seemless across the spread.

Input files

I've been able to reproduce this across multiple projects.

Screenshots

Screenshot from 2024-04-12 13-58-01

System and Versions

PDF Arranger 1.10.1 installed on Ubuntu 22.04 from distro.
It uses libqpdf 11.2.0, pikepdf 7.2.0, GTK 3.24.38 and Python 3.10.12.

@kbengs
Copy link
Member

kbengs commented Apr 12, 2024

Do you have a PDF which we could test?

@AussieScorpio
Copy link
Author

Do you have a PDF which we could test?

example-001.pdf
example.pdf

Certainly; example.pdf is the input to PDF Arranger. example-001.pdf is the output I'm getting from PDF Arranger after merging the two pages that include the image (ie; pages 2 & 3).

@kbengs
Copy link
Member

kbengs commented Apr 16, 2024

Thanks. There might be slight math/rounding errors in the placement calculations, but they should be really tiny. Going from float to decimal could maybe improve that somewhat. But mostly I think it is a rendering issue (with viewers which render with poppler?) For example Brave browser, which does not use poppler, doesn't seem the render the line.

@AussieScorpio
Copy link
Author

So how can I produce a PDF that doesn't do this? I've never had any issues with InDesign. If PDF Arranger is not capable of producing a seemless merging of pages to spreads, then it's not going to be fit for purpose for us.

@dreua
Copy link
Member

dreua commented Apr 18, 2024

@AussieScorpio You are not a paying customer here and we do not get anything out of you using the software we build as a hobby in our spare time, provided to you free of charge "as is" and without any warranty. With that in mind you may want to reread and rephrase or completely hide your last comment. (This comment can be hidden in turn.)

@dreua
Copy link
Member

dreua commented Apr 18, 2024

I think it could be an aliasing and/or rounding glitch on our side or on the viewers.

Gapless

  • Firefox on Linux
  • Firefox on Android
  • Okular on Android
  • Xpdf viewer on Linux
  • Mupdf on Linux

With gap at least on some zoom levels

  • Evince (Gnomes PDF viewer) on Linux: Only on some zoom levels
  • Okular (same as evince, also based on poppler)

Importing the PDF in Libreoffice Draw or Gimp shows a different issue: The second page has the same dimensions as the first i.e. it is too small and the image is cut (gimp) or you have two instances of the same full size uncropped image extending out of the page (draw). The latter is probably an issue or missing feature of Draw.

If a glitch-free experience is paramount for your purpose I suggest you craft your PDFs in a way that doesn't include cutting the images and putting them back together.

@AussieScorpio
Copy link
Author

@AussieScorpio You are not a paying customer here and we do not get anything out of you using the software we build as a hobby in our spare time, provided to you free of charge "as is" and without any warranty. With that in mind you may want to reread and rephrase or completely hide your last comment. (This comment can be hidden in turn.)

Don't be so sensitive. And keep in mind that just because there isn't a license payment, doesn't make software "free". There has been a significant investment in time on our side to replace our workflow with open-source solutions (Scribus/PDF Aranger). Attempting to get a straight answer on whether PDF Arranger is capable of creating seamless spreads is an entirely reasonable attempt to avoid expending time and energy on something that will not give us a result. If you want others to respect your time, you should be willing to respect the time of others. I've given a pretty detailed explanation of the issue and provided a minimal example to allow the issue to be reproduced. This was done in good faith in order to help improve PDF Arranger, not just for our benefit, but the benefit of all.

@AussieScorpio
Copy link
Author

I think it could be an aliasing and/or rounding glitch on our side or on the viewers.

Gapless

  • Firefox on Linux
  • Firefox on Android
  • Okular on Android
  • Xpdf viewer on Linux
  • Mupdf on Linux

With gap at least on some zoom levels

  • Evince (Gnomes PDF viewer) on Linux: Only on some zoom levels
  • Okular (same as evince, also based on poppler)

Importing the PDF in Libreoffice Draw or Gimp shows a different issue: The second page has the same dimensions as the first i.e. it is too small and the image is cut (gimp) or you have two instances of the same full size uncropped image extending out of the page (draw). The latter is probably an issue or missing feature of Draw.

If a glitch-free experience is paramount for your purpose I suggest you craft your PDFs in a way that doesn't include cutting the images and putting them back together.

Thanks for the feedback. Our use case is online rather than print, so we can expect our customers to be using a range of PDF viewers. We're experimenting with generating our documents in HTML which gives us a high degree of control of how it looks in a browser. We will still need to be able to generate PDFs for some users, but perhaps we can use HTML to PDF on a spread by spread basis which takes the merging of pages to spreads out of the equation, and all we need to do is bring the individual spreads into a single document..

@kbengs
Copy link
Member

kbengs commented Apr 20, 2024

Some more info:
Gapless:

  • Acrobat reader (Windows)
  • SumartaPDF (Windows)
  • Microsoft Edge (Windows)
  • Firefox (Windows)
  • Brave browser (Linux)
  • Foxit Reader (Windows)
  • Okular ("Enable graphics antialias" = Off) (Linux)
  • Gimp (anti-alias = off) (Linux)

With gaps:

  • Okular ("Enable graphics antialias" = On) (Linux)
  • Gimp (anti-alias = on) (Linux)
  • Evince

pdf stitcher also produces a pdf with the same results as above.

I haven't found anything in pdfarranger sourcecode which make me think it is a bug/feature in poppler.

Some related bug reports on poppler:
https://gitlab.freedesktop.org/poppler/poppler/-/issues/1451
https://gitlab.freedesktop.org/poppler/poppler/-/issues/262
https://gitlab.freedesktop.org/poppler/poppler/-/issues/590

@dreua
Copy link
Member

dreua commented May 22, 2024

I'd say this is not our bug, thanks for the in depth investigation @kbengs !

@dreua dreua closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@dreua dreua added the not our bug A bug that impacts PDF Arranger but is not in our code. This is probably a bug that we can't fix. label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not our bug A bug that impacts PDF Arranger but is not in our code. This is probably a bug that we can't fix.
Projects
None yet
Development

No branches or pull requests

3 participants