obsidian-contextual-typography icon indicating copy to clipboard operation
obsidian-contextual-typography copied to clipboard

Missing text in pdf export

Open MartinKorz opened this issue 3 years ago • 5 comments

I do not know how this unexpected behaviour is created, but when I activate contextual typography I find that exported pdf files regularly miss seemingly random paragraphs of the document's plain text.

Deactivating the plugin and restarting Obsidian leads to complete pdf text again.

I am not sure whether the problem is actually created by contextual typography as I have quite a number of plugins activated. It might also be that there is some incompatibility to other plugins.

MartinKorz avatar May 10 '22 14:05 MartinKorz

I also encountered the same problem. If the document has a large number of images, the export function is almost unavailable. contextual typography is a great plugin, I can't live without it, but I also need to use the function of exporting PDF, please fix this bug, thanks.

chenmaoran avatar Jul 25 '22 08:07 chenmaoran

@MartinKorz @chenmaoran I haven't been able to reproduce this in my tests. Does this happen with obsidian's default theme? Also, does it happen in a sandbox vault (click on help, then open sandbox vault)?

mgmeyers avatar Jul 25 '22 16:07 mgmeyers

@mgmeyers I created a new Vault with only the contextual typography plugin and corresponding CSS for your reference. In addition, the compressed package also contains the exported stamp widePDF file.

Download link:https://www.dropbox.com/t/FwjWqI2bVHKfcZyS

chenmaoran avatar Jul 26 '22 02:07 chenmaoran

I've just encountered the same issue. No need for specific CSS styling. Only the plugin is needed to lose text in the sandbox vault. I've attached the file I wanted to export.

Expose Promotion.md

tim-hilde avatar Aug 09 '22 10:08 tim-hilde

Thanks for taking a look at this!

I could replicate the example of tim-hilde. A minimal example might be:

# Section 1
This is the first paragraph of the first section. I'll add a second sentence to make it a bit longer. But as this is supposed to be a minimal example, the text shouldn't be too long either.

![thisimagedoesnotexist](nonexistantimage.png)

In this case, the paragraph is lost in the export. After deactivating contextual typography and restarting the vault, the pdf export does include the paragraph as expected.

At least in the tests that I did, the text loss:

  • occurs also if the image does exist
  • does not occur if the image is inserted as a wiki link with ![[nonexistantimage.png]]

Possibly it is markdown-syntax image inclusion which triggers the loss of text?

MartinKorz avatar Aug 11 '22 13:08 MartinKorz

Still hope the author can fix this soon. Thank you!

chenmaoran avatar Nov 17 '22 04:11 chenmaoran

Hey all. Finally figured out what this issue was. This should be fixed now. Let me know if you still run into issues.

mgmeyers avatar May 07 '23 02:05 mgmeyers

My test pdfs look good now, thank you!

MartinKorz avatar May 11 '23 09:05 MartinKorz