Altinn / altinn-pdf

Altinn platform microservice for generating PDFs
0 stars 1 forks source link

Evaluate Playwright as alternative to Puppeteer #56

Closed bdb-dd closed 3 weeks ago

bdb-dd commented 1 year ago

Description

Microsoft managed to recruit several of the original Puppeteer contributors when forming the Playwright team and in so doing, position Playwright as the de facto successor. Sporting a nearly identical API, Playwright goes further by adding additional functionality for browser based testing. Other key benefits include a C# native API.

More information available here: https://www.browserless.io/blog/2022/08/19/playwright-vs-puppeteer/

Examples: https://www.meziantou.net/generate-pdf-files-using-an-html-template-and-playwright.htm

Intro to Playwright for .NET https://playwright.dev/dotnet/docs/intro

Analysis work done by others: https://github.com/executablebooks/jupyter-book/issues/1820 https://github.com/executablebooks/jupyter-book/pull/1664

In scope

Look into a dotnet version of playwright and whether it a PDF generator could be set up as an Azure function vs docker container

Out of scope

No response

Additional Information

No response

Analysis

No response

Conclusion

No response

HenningNormann commented 1 month ago

@olebhansen Playwright is tested locally in https://github.com/Altinn/altinn-storage/pull/463 - ContentOnDemandController.GetFormdataAsPdf. Some issues are:

olebhansen commented 3 weeks ago

the Playwright-track/investigation is on hold. PDF improvements as such are still welcomed.