Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "vue-pdf", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "vue.js pdf viewer", | ||
@@ -5,0 +5,0 @@ "main": "src/pdf.vue", |
@@ -124,2 +124,47 @@ # vue-pdf | ||
##### Example - get text content | ||
``` | ||
<template> | ||
<div> | ||
<button | ||
@click="logContent" | ||
> | ||
log content | ||
</button> | ||
ref="myPdfComponent" | ||
src="https://cdn.mozilla.net/pdfjs/tracemonkey.pdf" | ||
></pdf> | ||
</div> | ||
</template> | ||
<script> | ||
import pdf from 'vue-pdf' | ||
export default { | ||
components: { | ||
}, | ||
methods: { | ||
logContent() { | ||
this.$refs.myPdfComponent.pdf.forEachPage(function(page) { | ||
return page.getTextContent() | ||
.then(function(content) { | ||
var text = content.items.map(item => item.str); | ||
console.log(text); | ||
}) | ||
}); | ||
} | ||
} | ||
} | ||
</script> | ||
``` | ||
## Example - complete | ||
@@ -183,20 +228,3 @@ ``` | ||
## To do | ||
- [ ] Simplified non-webpack integration | ||
- [x] Added more advanced examples | ||
- [x] Add `@progress` event | ||
- [x] Add `:rotate` prop | ||
- [x] Handle PDF.js errors | ||
- [ ] Give access to the text content of the page | ||
- [ ] Make `<resize-sensor>` optional (implies adding a `:scale` prop) | ||
- [x] Handle resize-sensor event throttle | ||
- [x] Print the current page | ||
- [x] Print the whole document | ||
- [ ] Buy more coffee | ||
## Credits | ||
[<img src="https://www.franck-freiburger.com/FF.png" width="16"> Franck Freiburger](https://www.franck-freiburger.com) | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21268
229