Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

TOC is not generated #3953

Closed
mpazdnikova opened this issue Jun 14, 2018 · 35 comments
Closed

TOC is not generated #3953

mpazdnikova opened this issue Jun 14, 2018 · 35 comments
Labels
Milestone

Comments

@mpazdnikova
Copy link

mpazdnikova commented Jun 14, 2018

Hello,

I've encountered an issue with TOC generation on a new 0.12.5 version.
Table of content is not generated at all when specifying toc parameter (with custom .xsl document or without it).
The simplest way to reproduce: wkhtmltopdf toc "result.html" "result.pdf"
And the result.html is just:

<!DOCTYPE html>
<html lang="en">
<body>
  <div>
    <h1>Level 1</h1>
    <h2>Level 2</h2>
  </div>
</body>
</html>

Everything worked with 0.12.5 RC I've downloaded like a couple of weeks ago.

One more thing: my initial document has footer with page numbers so the cover page is number 1 and the next page has number 3. It seems that table of contents is generated but is not drawn right.

My OS is Windows 10 version 1709.

Thanks in advance for your help.

@ashkulz
Copy link
Member

ashkulz commented Jun 14, 2018

What is the content of my.xsl?

@mpazdnikova
Copy link
Author

Oops, it seems my.xsl was really missing so please ignore the second part of my message about the error, I'm removing it from the message. No errors now, it's just not generated.

@ashkulz
Copy link
Member

ashkulz commented Jun 14, 2018

Can you attach the PDF with 0.12.5 final and RC with the HTML and command-line mentioned above?

@mpazdnikova
Copy link
Author

Sure!
result_RC.pdf
result_final.pdf

@ashkulz
Copy link
Member

ashkulz commented Jun 14, 2018

Okay, can you tell me the exact RC -- was it 0.12.5-0.20180529.138.rc~37e9f91 or 0.12.5-0.20180604.140.rc~6f77c46? I suspect a regression due to changes in #2711

@mpazdnikova
Copy link
Author

According to the installer name it was 0.12.5-0.20180529.138.rc...
That's pity. I've decided to move to a newer version partially because of that fix.

@ashkulz
Copy link
Member

ashkulz commented Jun 15, 2018

Am traveling right now, will look into this after Monday...

@ashkulz ashkulz added this to the 0.12.6 milestone Jun 15, 2018
@ashkulz ashkulz added the Verified The issue is verified. label Jun 15, 2018
@hakimio
Copy link

hakimio commented Jun 16, 2018

@ashkulz
This seems like a major issue. Any idea when this might be fixed?

@ashkulz
Copy link
Member

ashkulz commented Jun 16, 2018

Mid next week.

ashkulz added a commit that referenced this issue Jun 18, 2018
This was a regression introduced in 6f77c46,
as the QWebPrinter instance for the TOC and other special pages
did not get initialized and hence were skipped from the output.

fixes #3953
@ashkulz
Copy link
Member

ashkulz commented Jun 19, 2018

Can you check results of PR #3962 available from https://builds.wkhtmltopdf.org/0.12.6-dev/ and let me know if it works?

@hakimio
Copy link

hakimio commented Jun 19, 2018

@ashkulz Yes, it seems to fix the issue.

@ashkulz
Copy link
Member

ashkulz commented Jun 19, 2018

Great, I'll try to get the final release out by first week of July or earlier.

@metasean
Copy link

@ashkulz - Out of curiosity is there an ETA for when this fix will be in an available MacOS Cocoa build? (i.e. it looks like Windows and Linux users can just grab an appropriate alpha build, but there isn't an alpha build for MacOS)

@ashkulz
Copy link
Member

ashkulz commented Jul 30, 2018

There is an alpha build for macOS on the link posted above.

@metasean
Copy link

@ashkulz - Thank you! (I had been looking at https://wkhtmltopdf.org/downloads.html instead of your https://builds.wkhtmltopdf.org/0.12.6-dev/ 🤦‍♂️)

@lwchkg
Copy link

lwchkg commented Sep 5, 2018

If 0.12.6 will not be released shortly, I think you should advise people to download 0.12.4 instead of 0.12.5 in the website.

@obrejla
Copy link

obrejla commented Sep 21, 2018

Hello @ashkulz,
do you plan to release 0.12.6 with this fix soon? Because this bug is absolutely critical and I don't think that users will want to use older 0.12.4. Thanks a lot!

@luketarplin
Copy link

I would also like to see a 0.12.6 release to fix what is a critical regression for us. Also downgrading to 0.12.4 is not an option for us due to SSL v3 issues with that version.

@hakimio
Copy link

hakimio commented Nov 5, 2018

@luketarplin For now you can try the dev build linked above.

@luketarplin
Copy link

@hakimio Yes I know thanks, I was hoping that if a build of 0.12.6 was released I could get away without having to build from source myself as it seems an involved process when compared to just pulling the built package... I guess for now I will have no choice but to do that though.

@hakimio
Copy link

hakimio commented Nov 9, 2018

@luketarplin Not sure you understand my comment. I was saying that you can just download pre-built binary package linked above and just use that for now. No need to build anything yourself.

@luketarplin
Copy link

@hakimio Ah sorry I had missed that, I'm already part of the way through a source build :( I'll try the dev binary next. Thanks

@smartman
Copy link

0.12.6-dev last build is half a year ago. Any plans to release it? It does not feel comfortable having dev versions in production system because TOC is not generated.

@hakimio
Copy link

hakimio commented Jan 31, 2019

@smartman this project doesn't seem to be supported anymore. Might be a good time to move to something like Puppeteer or Chrome Headless.

@gabbyfebriana-sc
Copy link

Hi @ashkulz just wondering if the 0.12.6 will be released anytime soon? We're really looking forward to use the TOC feature in a stable version. Thanks!

@ashkulz
Copy link
Member

ashkulz commented Mar 26, 2019

I'm hoping to have a rc build out this weekend and release it soon after that.

@toineKeistoer
Copy link

@ashkulz, any news on the new release?

@leonelgoncalves
Copy link

So if I understand correctly the TOC we'll need to find another way of generating the TOC?

@hakimio
Copy link

hakimio commented Apr 28, 2019

@leonelgoncalves No, just use 0.12.6-dev from https://builds.wkhtmltopdf.org/0.12.6-dev/

@sandergroen
Copy link

We are six months later and there is still no new version released. I know it is hard to release sooner because everyone is busy.
Using a dev build is not a proper solution because it is not stable yet and since there is no stable release there is no wrapper of version 0.12.6 for Ruby which I use in my projects.
Is there a some workaround for this issue to make get the TOC to work in version 0.12.5.0?

@hakimio
Copy link

hakimio commented Sep 4, 2019

No, if you have to use stable version, either use older 0.12.4 release or migrate to Puppeteer or WWW::Mechanize::Chrome.

@sandergroen
Copy link

sandergroen commented Sep 4, 2019

@hakimio, Puppeteer is not an option since it has no support for cover pages and table of contents see puppeteer/puppeteer#1778. I'm not sure about WWW::Mechanize::Chrome I i haven't tried that yet. The older version 0.12.4 has other issues that were fixed with 0.12.5.

@zearg
Copy link

zearg commented Sep 23, 2019

@ashkulz Any news on potential release date of 0.12.6 ?

@ashkulz
Copy link
Member

ashkulz commented Jun 6, 2020

A release candidate for the 0.12.6 release is now available for download, which should contain changes which possibly address this issue.

Would appreciate downloading the package and reporting back if any issues are encountered during testing. Assuming all goes well, I plan to release 0.12.6 on the 2-year anniversary of the previous release i.e. June 11, 2020.

@Jc-L
Copy link

Jc-L commented Jun 7, 2020

0.12.6rc1 fixes the missing TOC issue (while testing windows 64bits builds 0.12.4, 0.12.5, 0.12.6rc1, only 0.12.5 had the bug).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests