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
.sql page 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
.sql file 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
.sql page 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.
Issue: Unable to Export SQLPage
.sqlPage Content to PDF Using PlaywrightDescription
I am trying to export a SQLPage
.sqlpage 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.sqlfile 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
http://localhost:9228Current Implementation
I am triggering the Playwright command from a SQLPage button using the following query:
However, this command does not execute correctly within SQLPage. The PDF file still gets generated, but the content from the
.sqlpage is not captured.Expected Behavior
When clicking the SQLPage button:
.sqlpage should fully render.Actual Behavior
.sqlfile is not included.SELECT sqlpage.exec('npx', 'playwright','test');does not work correctly.Goal
I need to download a rendered SQLPage
.sqlpage as a PDF using the Playwright package triggered from a SQLPage button.Questions
sqlpage.exec()?.sqlpage content is fully rendered before Playwright generates the PDF?Any guidance or working example would be greatly appreciated.