-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Issue: Unable to Export SQLPage .sql Page Content to PDF Using Playwright
Description
I am trying to export a SQLPage .sql page as a PDF using a button link in SQLPage. The PDF file is being generated successfully using the Playwright package, but the contents rendered by the .sql file are not appearing in the generated PDF.
Instead of exporting the rendered SQLPage content, the generated PDF is either blank or missing the expected page content.
Environment
- SQLPage
- Playwright (Node.js)
- SQLite database
- Local server:
http://localhost:9228
Current Implementation
I am triggering the Playwright command from a SQLPage button using the following query:
SELECT sqlpage.exec('npx', 'playwright','test');However, this command does not execute correctly within SQLPage. The PDF file still gets generated, but the content from the .sql page is not captured.
Expected Behavior
When clicking the SQLPage button:
- Playwright should open the SQLPage route.
- The
.sqlpage should fully render. - Playwright should generate a PDF containing the rendered SQLPage content.
- The user should be able to download the generated PDF.
Actual Behavior
- The PDF file is generated.
- The rendered content from the SQLPage
.sqlfile is not included. - The command
SELECT sqlpage.exec('npx', 'playwright','test');does not work correctly.
Goal
I need to download a rendered SQLPage .sql page as a PDF using the Playwright package triggered from a SQLPage button.
Questions
- What is the correct way to execute Playwright from SQLPage using
sqlpage.exec()? - How can I ensure the SQLPage
.sqlpage content is fully rendered before Playwright generates the PDF? - Is there a recommended method for exporting SQLPage pages as PDFs using Playwright?
Any guidance or working example would be greatly appreciated.