Unable to export as PDF on Windows 11 Pro

Bug report

Unable to export as PDF.

When clicked on Export As PDF.., no file appears.

When clicked on Print.. and print as PDF, the file is created but with 0 bytes and cannot be opened.

Reproduced from both my home PC and my office PC.

Console Log

E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:1142 Unrecognized feature: 'web-share'.
setValueForAttribute @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:1142
setProp @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:14724
setInitialProperties @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:15032
completeWork @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:8558
completeUnitOfWork @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:12826
performUnitOfWork @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:12709
workLoopSync @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:12584
renderRootSync @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:12565
performWorkOnRoot @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:12078
performWorkOnRootViaSchedulerTask @ E:\Software\InkDrop\resources\app.asar\node_modules\react-dom\cjs\react-dom-client.production.js:13568
performWorkUntilDeadline @ E:\Software\InkDrop\resources\app.asar\node_modules\scheduler\cjs\scheduler.production.js:151
processImmediate @ node:internal/timers:574
em.ink.md/youtube.html?v=6piU7GHUlVE&id=youtube-0.18434169538997358:44 Allow attribute will take precedence over 'allowfullscreen'.

Environment

  • Platform: Windows 11 Pro
  • Platform version: 25H2
  • App Version: 6.3.0

How to reproduce

Scenario 1: Export as PDF

  1. Open the note.
  2. Click Export As PDF…
  3. Check whether a PDF file is created.

Actual result: No PDF file is created.

Scenario 2: Print to PDF

  1. Open the note.
  2. Click Print…
  3. Select Print to PDF and save the file.
  4. Attempt to open the saved PDF.

Actual result: The PDF file is created with a size of 0 bytes and cannot be opened.

Hi @KiNG_N ,

Thanks for reporting. Looks like it’s a Windows-dependent issue. Will fix it

Looks like it happens if a note includes an embedded YouTube video. It doesn’t depend on Windows. Can you export as pdf for another note without a YouTube video?

Thanks for addressing this.

I just tried again, and I can both export or print a note as a PDF if it doesn’t contain a YouTube video.

Got it. So, iframes are causing it. It seems to be a bug in Electron because there is no error regarding it :thinking:

v6.3.1 now exports a note with embedded iframes. However, it doesn’t render them correctly since iframes load their content asynchronously and it’s impossible to know when it is finished. So, a recommended way is export a note as HTML, then convert it in a browser. Thanks again for the report!