Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MSzturc/obsidian-better-pdf-plugin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.4.0
Choose a base ref
...
head repository: MSzturc/obsidian-better-pdf-plugin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 5 commits
  • 2 files changed
  • 3 contributors

Commits on Jun 21, 2022

  1. Update README.md

    MSzturc authored Jun 21, 2022
    Copy the full SHA
    578d52d View commit details

Commits on Jun 29, 2022

  1. Copy the full SHA
    970e677 View commit details

Commits on Nov 8, 2022

  1. Fix typo in readme

    see title
    mProjectsCode authored Nov 8, 2022
    Copy the full SHA
    5f3f2f8 View commit details
  2. Merge pull request #37 from mProjectsCode/patch-1

    Fix typo in readme
    MSzturc authored Nov 8, 2022
    Copy the full SHA
    860be22 View commit details
  3. Merge pull request #32 from batman-nair/master

    Add a fallback for client width calc
    MSzturc authored Nov 8, 2022
    Copy the full SHA
    4c2db40 View commit details
Showing with 6 additions and 2 deletions.
  1. +5 −1 README.md
  2. +1 −1 main.ts
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ Goal of this Plugin in to implement a native PDF handling workflow in Obsidian

![Sample](https://github.com/MSzturc/obsidian-better-pdf-plugin/raw/master/sample/BetterPDF.gif)

### Synthax
### Syntax

|parameter|required|example|
|--|--|--|
@@ -27,3 +27,7 @@ Goal of this Plugin in to implement a native PDF handling workflow in Obsidian
|fit|optional (default = true)| **true** or **false**
|rotation|optional (default = 0)| **90** for 90deg or **-90** -90deg or **180**
|rect|optional (default = \[0,0,0,0\])| offsetX, offsetY, sizeY, sizeX in Pixel


### Integration
- [JavaScript for Adobe Acrobat Pro and AppleScript for Skim for creating automatically the necessary Better PDF Plugin snippet](https://github.com/johnsidi/scripts-for-Obsidian-Better-PDF-Plugin)
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ export default class BetterPDFPlugin extends Plugin {
const context = canvas.getContext("2d");

const baseViewportWidth = page.getViewport({scale: 1.0}).width;
const baseScale = canvas.clientWidth / baseViewportWidth;
const baseScale = canvas.clientWidth ? canvas.clientWidth / baseViewportWidth : 1;

const viewport = page.getViewport({
scale: baseScale * parameters.scale,