You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
As soon as --header-html and/or --footer-html is used together with --window-status, no data is returned, the command never stops.
Found the problem/solution by studying the sourcecode...
The html of --header-html and/or --footer-html also has to set the window.status to the same value as main page, e.g. with <script>window.status = 'myrandomstring';</script>. Then --window-status feature works as expected.
The problem can be seen in file multipageloader.cc in void ResourceObject::loadFinished(), it is connected to all resources in pdfconverter.cc, including header and footer (hfLoader) and compares (windowStatus != settings.windowStatus) for all resources, btw. also for toc --xsl-style-sheet if used.
Would suggest to use the current ResourceObject::loadFinished() for pageLoader and a different one without waitWindowStatus() check for measuringHFLoaderhfLoadertocLoader1 and tocLoader2.
This was due to e02ff7e, which
attempted to solve #1892. However, this caused a regression as no
corresponding changes were made in wkhtmltoimage.
Fixes#2142
As soon as
--header-html
and/or--footer-html
is used together with--window-status
, no data is returned, the command never stops.Found the problem/solution by studying the sourcecode...
The html of
--header-html
and/or--footer-html
also has to set thewindow.status
to the same value as main page, e.g. with<script>window.status = 'myrandomstring';</script>
. Then--window-status
feature works as expected.The problem can be seen in file
multipageloader.cc
invoid ResourceObject::loadFinished()
, it is connected to all resources inpdfconverter.cc
, including header and footer (hfLoader
) and compares(windowStatus != settings.windowStatus)
for all resources, btw. also for toc--xsl-style-sheet
if used.Would suggest to use the current
ResourceObject::loadFinished()
forpageLoader
and a different one withoutwaitWindowStatus()
check formeasuringHFLoader
hfLoader
tocLoader1
andtocLoader2
.This also solves #1725 and an old ticket https://code.google.com/p/wkhtmltopdf/issues/detail?id=938
wkhtmltopdf 0.12.1, 32-bit for Windows XP/2003 or later
The text was updated successfully, but these errors were encountered: