l1xnan / obsidian-better-export-pdf

Obsidian PDF export enhancement plugin
MIT License
311 stars 18 forks source link

Custom Page Sizes "Permanently" Break Export #205

Open zauberparacelsus opened 4 months ago

zauberparacelsus commented 4 months ago

I am finding that after using any custom size at all with Better PDF Export, all future export attempts fail with the following error output in the console:

[23460:0510/135836.143918:ERROR:browser_main_loop.cc(276)] GLib-GObject: ../glib/gobject/gsignal.c:2777: instance '0x7d4042482e0' has no handler with id '53427'
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: Invalid print parameters: paper height is zero or negative
    at _.printToPDF (node:electron/js2c/browser_init:2:72248)
    at node:electron/js2c/browser_init:2:91059
    at node:electron/js2c/browser_init:2:90251
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:77976)
    at WebContents.emit (node:events:517:28)

Once this starts, this occurs regardless of what custom sizes I use. The only solution I've found when this happens it to manually delete the configuration file.

l1xnan commented 4 months ago

Could you share the configuration file that's causing the issue?

zauberparacelsus commented 4 months ago

Here it is. And I went to go and find a repro for the issue. If you change the Page Size to custom and enter anything at all into the Height field, and then later blank the field (ie: it has nothing entered, not even zero), then all subsequent export attempts will fail.

Previously I had exports failing even for non-custom page sizes, but that is not happening this time around?

data.json

soaska commented 4 months ago

Hi everyone. Updated plugin yesterday and broke it.. I have my last working version here