obsidian-better-pdf-plugin icon indicating copy to clipboard operation
obsidian-better-pdf-plugin copied to clipboard

Error with several embeds on one page

Open Sinled opened this issue 2 years ago • 3 comments

It seems there are some problems with rendering

plugin:better-pdf-plugin:1788 Uncaught (in promise) Error: Invalid canvas size
    at DOMCanvasFactory.create (plugin:better-pdf-plugin:1788:13)
    at CachedCanvases.getCanvas (plugin:better-pdf-plugin:5252:40)
    at CanvasGraphics.beginDrawing (plugin:better-pdf-plugin:5959:53)
    at InternalRenderTask.initializeGraphics (plugin:better-pdf-plugin:4277:14)
    at eval (plugin:better-pdf-plugin:2734:26)

Whey you have several blocks pointing to the same pdf file on one page

Sinled avatar Sep 04 '22 12:09 Sinled

Please provide me some sample code

MSzturc avatar Sep 04 '22 14:09 MSzturc

Something like this, in one obsidian note

## Some Page

```pdf
{
  "url": [[File.pdf]],
  "range": [123, 126],
  "fit": true,
  "scale": 2
}
```

## Another Page

```pdf
{
  "url": [[File.pdf]],
  "range": [126, 127],
  "fit": true,
  "scale": 2
}
```

Sometimes it renders one of the blocks, sometimes - none

Sinled avatar Sep 05 '22 12:09 Sinled

I have the same issue, with multiple code blocks on the same page usually only the first one loads (or none). The blocks that do not render can be fixed by placing the cursor inside them and moving it out again, but doing that every single time gets tedious.

giusgad avatar Oct 25 '22 18:10 giusgad