fpanaccia / Wkhtmltopdf.NetCore.Example-deprecated

Implementation of Wkhtmltopdf.NetCore
81 stars 33 forks source link

Footer issue and documentation on using 'default params' #22

Open stumiller opened 2 years ago

stumiller commented 2 years ago

I have some legal documents that I'm having to recreate in PDF from a .Net 5 (core) MVC application (using wkhtmltopdf.netcore 3.0.2). Obviously, I'm using your tool and for the most part, it's worked great. However, when it comes to footers, my legal docs have special conditions for footers. Like some pages not having paging and others resetting the starting page when a new section is encounters. With that being said, how do you use the "url" and special parameters that you've given us? How does using the "section" parameter work? I can't get it too. Section is always blank.

https://localhost:44342/footer.html? page=1&section=&sitepage=1&title=&subsection=&username=Veaer&url=google.com&frompage=1&subsubsection=&age=20&isodate=2022-02- 14&topage=20&doctitle=&sitepages=20&webpage=-&time=3:10:34%20PM&date=2/14/2022

I'm behind on a project due to this footer issue and we might have to bail on using this tool. Any help would be awesome! Thanks

stumiller commented 2 years ago

One thing I just noticed and I technically fixed in my original comment is the url. The "section" part of the url is coming out wrong. I'm just using your original code and pulling it out.

var url = window.location.href.replace(/#$/, ""); // Remove last # if exist document.getElementById("url").innerHTML = url;

https://localhost:44342/footer.html? page=2§ion=&sitepage=2&title=&subsection=&username=Veaer&url=google.com&frompage=1&subsubsection=&age=20&isodate=2022-02- 14&topage=20&doctitle=&sitepages=20&webpage=-&time=3:24:23%20PM&date=2/14/2022