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: FranckFreiburger/vue-pdf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 23fb8e203523916464f7313bb3c18a74bae8c2a1
Choose a base ref
...
head repository: FranckFreiburger/vue-pdf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f576e8f9514fa8efbdec50d59ebd612412a4a799
Choose a head ref
  • 14 commits
  • 5 files changed
  • 8 contributors

Commits on Aug 6, 2019

  1. - bump deps

    FranckFreiburger committed Aug 6, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    tberreis Thomas Berreis
    Copy the full SHA
    595b516 View commit details

Commits on Aug 9, 2019

  1. - enhance operations synchronization (see pendingOperation Promise)

    - update pdfjs API usage
    - fix annotationLayer scale
    - enhance canvas style management
    FranckFreiburger committed Aug 9, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ce65ecb View commit details

Commits on Aug 30, 2019

  1. Unverified

    No user is associated with the committer email.
    Copy the full SHA
    0a54eae View commit details

Commits on Feb 21, 2020

  1. 4.0.8

    FranckFreiburger committed Feb 21, 2020
    Copy the full SHA
    10454a5 View commit details
  2. Copy the full SHA
    04813e7 View commit details

Commits on Mar 25, 2020

  1. Bump minimist from 1.2.0 to 1.2.5 (#201)

    Bumps [minimist](https://github.com/substack/minimist) from 1.2.0 to 1.2.5.
    - [Release notes](https://github.com/substack/minimist/releases)
    - [Commits](https://github.com/substack/minimist/compare/1.2.0...1.2.5)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 25, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bb4ae78 View commit details

Commits on Apr 29, 2020

  1. typo (#212)

    thanks
    Josef-Friedrich authored Apr 29, 2020
    Copy the full SHA
    81d4aa6 View commit details

Commits on Jun 3, 2020

  1. - bump deps

    FranckFreiburger committed Jun 3, 2020
    Copy the full SHA
    01e2178 View commit details
  2. Copy the full SHA
    700f0f6 View commit details
  3. - move babel-plugin-syntax-dynamic-import, loader-utils, raw-loader a…

    …nd worker-loader as peerDependencies
    
      }
    FranckFreiburger committed Jun 3, 2020
    Copy the full SHA
    7ecc293 View commit details
  4. Big bug! Auto rotate wrong! Solved~ (#215)

    Big bug!
    The rotate variable will be overload when the loop running in the renderPage function.
    
    Please test it carefully, use 0 degree PDF, 90 degree PDF, 180 degree PDF, 270 degree PDF respectively!
    songispm authored Jun 3, 2020
    Copy the full SHA
    f1f26aa View commit details
  5. fix ie11 syntax error (#208)

    Co-authored-by: languanghao <languanhao@gmail.com>
    Co-authored-by: Franck Freiburger <FranckFreiburger@users.noreply.github.com>
    3 people authored Jun 3, 2020
    Copy the full SHA
    d16ab40 View commit details
  6. Copy the full SHA
    5695180 View commit details
  7. 4.0.9

    FranckFreiburger committed Jun 3, 2020
    Copy the full SHA
    f576e8f View commit details
Showing with 189 additions and 140 deletions.
  1. +9 −9 README.md
  2. +84 −62 package-lock.json
  3. +8 −5 package.json
  4. +4 −4 src/componentFactory.js
  5. +84 −60 src/pdfjsWrapper.js
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,12 +2,12 @@
vue.js pdf viewer

## Install
```
```bash
npm install --save vue-pdf
```

## Example - basic
```
```vue
<template>
<pdf src="./static/relativity.pdf"></pdf>
</template>
@@ -75,7 +75,7 @@ Triggered when an internal link is clicked
### Public methods

#### print(dpi, pageList) * _experimental_ *
* `dpi`: the print rezolution of the document (try 100).
* `dpi`: the print resolution of the document (try 100).
* `pageList`: the list (array) of pages to print.

### Public static methods
@@ -91,7 +91,7 @@ Triggered when an internal link is clicked
## Examples

##### Example - current page / page count
```
```vue
<template>
<div>
{{currentPage}} / {{pageCount}}
@@ -124,7 +124,7 @@ export default {


##### Example - display multiple pages of the same pdf document
```
```vue
<template>
<div>
<pdf
@@ -167,7 +167,7 @@ export default {


##### Example - print all pages
```
```vue
<template>
<button @click="$refs.myPdfComponent.print()">print</button>
<pdf ref="myPdfComponent" src="https://cdn.mozilla.net/pdfjs/tracemonkey.pdf"></pdf>
@@ -176,7 +176,7 @@ export default {


##### Example - print multiple pages
```
```vue
<template>
<button @click="$refs.myPdfComponent.print(100, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])">print</button>
<pdf ref="myPdfComponent" src="https://cdn.mozilla.net/pdfjs/tracemonkey.pdf"></pdf>
@@ -185,7 +185,7 @@ export default {


##### Example - get text content
```
```vue
<template>
<div>
<button
@@ -229,7 +229,7 @@ export default {


##### Example - complete
```
```vue
<template>
<div>
<input type="checkbox" v-model="show">
146 changes: 84 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-pdf",
"version": "4.0.7",
"version": "4.0.9",
"description": "vue.js pdf viewer",
"main": "src/vuePdfNoSss.vue",
"scripts": {},
@@ -20,10 +20,13 @@
},
"homepage": "https://github.com/FranckFreiburger/vue-pdf#readme",
"dependencies": {
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"loader-utils": "^1.2.3",
"pdfjs-dist": "2.0.943",
"raw-loader": "^0.5.1",
"pdfjs-dist": "^2.4.456",
"vue-resize-sensor": "^2.0.0"
},
"peerDependencies": {
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"loader-utils": "^1.4.0",
"raw-loader": "^4.0.1",
"worker-loader": "^2.0.0"
}
}
8 changes: 4 additions & 4 deletions src/componentFactory.js
Original file line number Diff line number Diff line change
@@ -10,17 +10,17 @@ export default function(pdfjsWrapper) {
render: function(h) {
return h('span', {
attrs: {
style: 'position: relative; display: inline-block'
style: 'position: relative; display: block'
}
}, [
h('canvas', {
attrs: {
style: 'display: inline-block; width: 100%; vertical-align: top',
style: 'display: inline-block; width: 100%; height: 100%; vertical-align: top',
},
ref:'canvas'
}),
h('span', {
style: 'display: inline-block; width: 100%',
style: 'display: inline-block; width: 100%; height: 100%',
class: 'annotationLayer',
ref:'annotationLayer'
}),
@@ -75,7 +75,7 @@ export default function(pdfjsWrapper) {
if ( resolutionScale < 0.85 || resolutionScale > 1.15 )
this.pdf.renderPage(this.rotate);

this.$refs.annotationLayer.style.transform = 'scale('+resolutionScale+')';
// this.$refs.annotationLayer.style.transform = 'scale('+resolutionScale+')';
},
print: function(dpi, pageList) {

Loading