Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
GNU General Public License v3.0
34.67k stars 2.58k forks source link

Image to PDF Page Size Issue #523

Open lawfulsoftware opened 7 months ago

lawfulsoftware commented 7 months ago

Since the watermark can be deleted even if flattened, I am converting the watermarked PDF to an image and then back to PDF. The problem is that I cannot control the page size. The source document is 8.5x11 (Letter).

Fill Page stretches the source document into A4. Maintain Aspect Ratios crops part of the page and adds white bars at the top in order to fit the source document into A4. Fit Page to Image maintains the aspect ratio of a letter page however the output is 35.42 inches by 45.82 inches. I receive the same result if I drag the PNG files into Foxit. The PNG files were created using StirlingPDF to Image using the default of 300 dpi.

For all three options, it would be ideal to be able to specify the dimensions of the PDF output. The usual choices will be either Letter or A4 however other sizes, and even custom sizes, might be desirable for some use cases.

As a further feature request, it would be nice to specify global defaults since, in North America, metric paper sizes, although much better, are very hard to find and are very rarely used.

I am running the alpha Docker container with the following digest: sha256:5327c72ff21727812e3841ab3592fc999022d7c2307b00be4dc767234bed55b0

sbplat commented 6 months ago

V2 will have the option to customize the page size of the PDF.

lawfulsoftware commented 6 months ago

Thank you @sbplat

How far are we from v2?

sbplat commented 6 months ago

No problem! V2 is currently under development and has a decently long way to go. You can view the development in the v2/v2-wip branch and in the project roadmap.