Open Farrukhw opened 3 weeks ago
I tested the export in my own Obsidian, and it works fine. This issue is most likely due to a conflict with other plugins. Could you press ctrl+shift+i
to open the console and check for any error messages? Additionally, you can enable debug mode to further inspect if there are any errors in the rendering preview modal.
Thanks for the guidance.
Looks like, it has some problem with the Meta data of the .md file. And I'm using only tags
in the Meta data. Here are the tags
meta data and the error log:
---
tags:
- mean
- average
- median
- central
- center
- mod
- mode
- centeral_tendency
---
plugin:obsidian-metatable:2456 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'style')
at MetatablePlugin.frontmatterProcessor (plugin:obsidian-metatable:2456:12)
at t.render (app.js:1:1296676)
at renderMarkdown (plugin:better-export-pdf:20396:43)
at async ExportConfigModal.renderFiles (plugin:better-export-pdf:20551:20)
at async ExportConfigModal.appendWebview (plugin:better-export-pdf:20636:7)
at async eval (plugin:better-export-pdf:20699:7)
frontmatterProcessor @ plugin:obsidian-metatable:2456
t.render @ app.js:1
renderMarkdown @ plugin:better-export-pdf:20396
await in renderMarkdown (async)
window.createEl @ enhance.js:1
Node.createEl @ enhance.js:1
Node.createDiv @ enhance.js:1
onOpen @ plugin:better-export-pdf:20693
e.open @ app.js:1
eval @ plugin:better-export-pdf:21080
e.handleEvent @ app.js:1
click @ app.js:1
apply @ C:\Users\MyUserName\AppData\Local\Obsidian\resources\app.asar\node_modules\@electron\remote\dist\src\renderer\callbacks-registry.js:54
(anonymous) @ C:\Users\MyUserName\AppData\Local\Obsidian\resources\app.asar\node_modules\@electron\remote\dist\src\renderer\remote.js:353
(anonymous) @ C:\Users\MyUserName\AppData\Local\Obsidian\resources\app.asar\node_modules\@electron\remote\dist\src\renderer\remote.js:335
emit @ node:events:517
onMessage @ node:electron/js2c/renderer_init:2
After removing the tags
meta data, it started displaying the Preview and printing to pdf.
The file which is being exported to PDF without any issues, also has this Meta data:
---
tags:
- sigma
- deviation
- standard
- deviation
- variance
- dispersion
---
So where is the difference???
obsidian-metatable
, as it is referenced in the log.The issue seems to be here: https://github.com/arnau/obsidian-metatable/blob/df6b59af4b57e2219ef6c5e8e5bd956356da116e/src/plugin.ts#L88-L89 This plugin has been archived, so there's no way to submit a PR, You can fix and compile it yourself. Additionally, I noticed that the official export feature does not directly throw an error. It's unclear how the official plugin handles exceptions from third-party plugins. If I find out, there might be a better solution.
Hi, On one document, although it says,
and exporting the pdf awesomely.
dom not ready
, however, it is still able to give me a preview:However, on the other similar document, it is continuously saying "dom not ready" and unable to show any preview and can't Export:![image](https://github.com/l1xnan/obsidian-better-export-pdf/assets/4318266/a9ce6d36-d4a6-46b0-a307-2d733915c151)
Please find the .md files with Prefixes "Exporting..." and "Not Exporting..." to test and verify on your side.
Not Exporting, Mean, Median, Mod. The measure of Central Tendency.md Exporting, Variance and Standard Deviations - The Measures of Dispersion.md