pdfsam icon indicating copy to clipboard operation
pdfsam copied to clipboard

Make sure Hi-DPI is supported on every OS

Open torakiki opened this issue 6 years ago • 6 comments

https://stackoverflow.com/questions/26182460/javafx-8-hidpi-support/26184471#26184471

torakiki avatar Apr 02 '19 09:04 torakiki

I was just about to buy a pdfsam license for my work computer, but I discovered this issue which is a stopper for me since I have a 4k screen. I hope the developers can do something about it soon.

parrenin avatar Sep 07 '20 09:09 parrenin

I forgot to say that I am on Debian 11 linux bullseye.

parrenin avatar Sep 07 '20 09:09 parrenin

For Basic you can just download it and try it to see if there's any issue with your monitor. For Visual pretty much the same, you can try it free for 14 days.

torakiki avatar Sep 07 '20 09:09 torakiki

I tried basic but everything is too small on the screen.

parrenin avatar Sep 07 '20 09:09 parrenin

Workaround for (probably most) Linux distributions: call pdfsam-basic with GDK_SCALE variable set to a reasonable amount, e.g.

GDK_SCALE=2 /opt/pdfsam-basic/bin/pdfsam-basic

Stolen from: https://superuser.com/questions/988379/how-do-i-run-java-apps-upscaled-on-a-high-dpi-display

You can also just edit the script at /opt/pdfsam-basic/bin/pdfsam-basic and insert the variable change just before the call to the java binary, e.g.

export GDK_SCALE=2
exec "$JAVACMD" -jar "$JAR_ARG" $JAVA_OPTS -Xmx512M \
  -Dapp.name="pdfsam-basic" \
  -Dapp.pid="$$" \
  -Dapp.home="$BASEDIR" \
  -Dbasedir="$BASEDIR" \
  -Dprism.lcdtext=false \
  org.pdfsam.basic.App \
  "$@"

Or tell the .desktop file (or just edit the menu entry) to add the variable to the command line, e.g. for Ubuntu/Min derivatives:

env GDK_SCALE=2 /opt/pdfsam-basic/bin/pdfsam-basic %F

The splash screen is still in dwarf-size mode, but the main Application is usable. I would assume that this is not a permanent fix, though, as setting the scale factor to a fixed value will not work for non HiDPI screens then.

21347 avatar Dec 01 '20 09:12 21347

@21347: Thank you for the workaround, that will do it for my use case.

parrenin avatar Dec 08 '20 09:12 parrenin

We added an HowTo and a setting for the font size in version 5, this should cover pretty much all the needs

torakiki avatar Jan 25 '23 13:01 torakiki