Nimblesite / Nimblesite/typeDiagram

PDF export fails

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug showstopper
Dominant language
TypeScript
Stars
63
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Summary

PDF export currently fails. Seems to be related to VS Code runtime does not exposing webview.printToPDF.

Whatever the case may be, we need to fix the export.

Evidence

The extension displays this error notification:

TypeDiagram: PDF export failed - Error: [PDF-PRINT] webview.printToPDF is not available in this VS Code runtime. Requires the Electron-based desktop VS Code.

Source: TypeDiagram

Steps to reproduce

  1. Open TypeDiagram in a VS Code runtime where webview.printToPDF is unavailable.
  2. Run the TypeDiagram export to PDF command.

Expected behavior

PDF export succeeds

Actual behavior

The export command fails and shows the error above.

Notes

This appears to be a runtime capability issue. The extension should feature-detect PDF support. If for some reason the user's version of vscode doesn't support this, display an error message to the user what they need to do to support PDF export. Critically, we need to be able to get this working for local development and pipeline tests at least

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TypeDiagram export to PDF command in a VS Code runtime where webview.printToPDF is unavailable, then trace the export path and its runtime capability check. Done means PDF export works in supported local and pipeline environments, while unsupported runtimes show a clear message explaining the requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop-dev, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.