default dpi means that it is rendered at 100%, i.e. 1 PDF unit = 1
screen unit. This is too small for a modern screen, and too small for a
printer. Like I wrote, a cheap label printer has more.
The unit is defined in the PDF specification ("user space unit is 1⁄72
inch").
There is no need to try anything.
PDFBox calculates the scale when printing. You could find the scale that
is used by setting a breakpoint on this line in PDFPrintable and look
for the scale:
renderer.renderPageToGraphics(pageIndex, graphics2D, (float) scale,
(float) scale, RenderDestination.PRINT);
If you use printing with a specific dpi then you can try specific
values, but then it will be rendered to an image first.
Your initial complaint was about PDFDebugger (which goes away at 150%)
and a PDF printer (which doesn't happen on windows, and besides your PDF
is already a PDF so it isn't needed), not about actual printing.
Tilman
On 18.10.2023 22:03, Tres Finocchiaro wrote:
This bug with this file happens only at an unrealistic dpi.
Is this something that I can change using PDFBOX APIs? I don't mind a
code workaround as I'm using quite a few others for edge-cases such as
this.
I find it odd that you keep mentioning "unrealistic dpi" though. Can
you help point me to where this DPI is defined or fetched?
I did a quick search and most articles I'm finding say that 72 is the
default DPI, is that not true?
https://stackoverflow.com/a/14230982/3196753
https://stackoverflow.com/a/55700705/3196753
https://stackoverflow.com/a/63025632/3196753
- tres.finocchi...@gmail.com