MaxMelcher / AzureDevOps.WikiPDFExport

Export Azure DevOps Wiki to PDF
MIT License
187 stars 62 forks source link

Display work item link using AzDevops API #75

Closed AltarBeastiful closed 2 years ago

AltarBeastiful commented 2 years ago

I'm well advanced in fixing #72, but I'm stuck on rendering differences between wkhtmltopdf and chrome/firefox. I guess it"s because they still use QT 4.

This is the html generated displayed in chrome : image And this is how it's printed in the pdf : image

The border is all around the element and text color is blue for some reason. State color could be ignored, as Azure Devops already ignores it when printing a single page to PDF.

Also, we should maybe create a PAT to your devops organization to allow testing of this feature in CI.

MaxMelcher commented 2 years ago

I'll check once I am back from vacation next week.

Rendering/styling is a pain, I would love to switch to something better - but most of the options are commercial.

MaxMelcher commented 2 years ago

I'll check once I am back from vacation next week.

Rendering/styling is a pain, I would love to switch to something better - but most of the options are commercial.

AltarBeastiful commented 2 years ago

Checking wkhtmltopdf site you can see it's not likely to improve: https://wkhtmltopdf.org/status.html

I think moving to puppeteer for pdf printing is the best course of action. In the meantime, we could just delay this PR or merge with minor css fixes. Might be smarter to invest time in switching to puppeteer than trying to work around wkhtmltopdf.

Enjoy the vacation !

MaxMelcher commented 2 years ago

Puppeteer is already added, would simplify the three external cases also (mermaid, latex, code highlighter) - and reduce the binary size. Potentially would work in Linux, too.

Thanks for the pointer - I totally agree this would be a better path and will result in a v4 :) You wanna start?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Rémi Benoit @.> Sent: Tuesday, July 20, 2021 2:41:14 PM To: MaxMelcher/AzureDevOps.WikiPDFExport @.> Cc: Max Melcher @.>; Comment @.> Subject: Re: [MaxMelcher/AzureDevOps.WikiPDFExport] Display work item link using AzDevops API (#75)

Checking wkhtmltopdf site you can see it's not likely to improve: https://wkhtmltopdf.org/status.html

I think moving to puppeteer for pdf printing is the best course of action. In the meantime, we could just delay this PR or merge with minor css fixes. Might be smarter to invest time in switching to puppeteer than trying to work around wkhtmltopdf.

Enjoy the vacation !

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/MaxMelcher/AzureDevOps.WikiPDFExport/pull/75#issuecomment-883360643, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH3LN3FWHXIHLGQLLNGCWTTYVVGVANCNFSM5AVOC7PQ.

MaxMelcher commented 2 years ago

I released a draft version: https://github.com/MaxMelcher/AzureDevOps.WikiPDFExport/releases/tag/4.0.0-alpha

AltarBeastiful commented 2 years ago

Nice work on puppeteer !

In the meantime, I almost fixed the rendering issues I had :

Still have a problem with using border-radius to round corners of the left colored border. I commented it as it looks better without it. I also opened an issue at wkhtmltopdf/wkhtmltopdf#5068

It looks almost good apart from the squared border ! image

MaxMelcher commented 2 years ago

If I add a PAT to the launch.json it gets immediately discovered by azure devops and revoked within 72hours. Security :)