Package: wkhtmltopdf
Version: 0.12.6-2+b1
Severity: normal
Tags: upstream
X-Debbugs-Cc: debbug.wkhtmlto...@sideload.33mail.com

I’ll start by saying the documentation is rough and incomplete, some
of which is related to the bug at hand:

① The synopsis in the man page is
“wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>”. 
The description of “[OBJECT]” is imprecise and tedious to read because
BNF is not used. If it said: OBJECT := URL | table of contents
that would be more clear.

② The proxy option is not completely described anywhere. The man page
only has: “-p, --proxy <proxy>” with no discription of what the
arguments refer to or what syntax is accepted. If the user figures out
to do “wkhtmltopdf --readme”, some examples are given like a scheme of
socks5://, but socks4a:// is rejected with a strange error. Users
should not have to guess what is accepted.

③ The --header-left option is undocumented in both the man page and
the readme. I had to go online to learn about it here:

https://wkhtmltopdf.org/usage/wkhtmltopdf.txt

When that doc says --header-*, it’s unclear what the asterisk can
be. Examples mention left and right, but what about center?  And in
the end, it actually has no effect. There is no error message (which
suggests that my version supports the option), yet the output has no
header. The full command was:

  $ wkhtmltopdf --proxy socks5://127.0.0.1:9050\
                --header-left '[webpage]'\
                --background --images --disable-javascript\
                --enable-local-file-access\
                "$url_of_tor_hostile_website" output.pdf

That command routes the request over Tor to a tor hostile website. The
use-case was to document the tor hostility (the 403 error). It does
produce the same 403 forbidden render that Firefox produces. But it’s
missing the header. Perhaps the header would work if the website had
been more inclusive. But in any case the header should be produced
nonetheless.


-- System Information:
Debian Release: 12.7
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 
'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-28-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wkhtmltopdf depends on:
ii  libc6                2.36-9+deb12u8
ii  libgcc-s1            12.2.0-14
ii  libqt5core5a         5.15.8+dfsg-11+deb12u2
ii  libqt5gui5           5.15.8+dfsg-11+deb12u2
ii  libqt5network5       5.15.8+dfsg-11+deb12u2
ii  libqt5printsupport5  5.15.8+dfsg-11+deb12u2
ii  libqt5svg5           5.15.8-3
ii  libqt5webkit5        5.212.0~alpha4-30
ii  libqt5widgets5       5.15.8+dfsg-11+deb12u2
ii  libstdc++6           12.2.0-14

Versions of packages wkhtmltopdf recommends:
ii  xserver-xorg [xserver]  1:7.7+23
ii  xvfb [xserver]          2:21.1.7-3+deb12u7

wkhtmltopdf suggests no packages.

-- no debconf information

Reply via email to