[Bug][Canvas][PDF] It's not possible to properly select text from PDF files that are added to a Canvas. It's impossible to create deep links from such files as well. There's also a weird behavior when I interact with the scrollbars

Steps to reproduce

I - Trying to select the text.

  1. Save a PDF file in your vault;
  2. Open a Canvas file;
  3. Drag the PDF file to the Canvas;
  4. Double-click the card that displays the PDF file in order to activate it;
  5. Single-click any part of the text and move the mouse in order to select it. You won’t be able to select the text and the card will move as if you were trying to drag it.
  6. Double-click any part of the text and it will be selected.

II - Trying to create deep-links

  1. Execute step 6 above;
  2. Right-click in order to show the context menu;
  3. Notice that there’s no option to create links.

III - Moving the scroll-bars

  1. Increase the zoom until the width of the PDF is greater than the width of the card;
  2. Single-click any scroll-bar and notice that the document will also be scrolled in the direction you’re not trying to move.

Did you follow the troubleshooting guide? [Yes]

Expected result

I - I should be able to select any text when I click and move the cursor over it.
II - I should be able to create deep links;
III - The PDF should move only in the direction of the scroll-bar I’m interacting with.

Actual result

I - When I click over the text I want to select and move the cursor it moves the card instead of select the text;
II - Even if I select the text by double-clicking over it, there’s no option to create deep-links;
III - When I click the horizontal scroll-bar, the vertical position of the PDF chages. When I click the vertical scroll-bar, the horizontal position of the PDF changes.


Obsidian version: v1.3.7
Installer version: v1.1.16
Operating system: Windows 10 Home Single Language 10.0.22621
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on


Additional information

I just noticed that this problem also happens when the PDF file is open in a tab instead of inside the Canvas as well.

I can’t reproduce. Download and reinstall obsidian, post a screen recording of this happening in the sandbox vault.

I had the same problem even in the sandbox vault, but realized that it has to do with the OCR of the PDF, specifically I think that this happens when you create PDF documents from Word or other text editors directly.

I fixed this by using OCRmyPDF documentation — ocrmypdf 16.0.5.dev4+g2005f62 documentation to redo the OCR of the PDF and now it works perfectly.

ocrmypdf inputfile.pdf output.file --redo-ocr

Hope this helps anyone having this problem.