Comments (11)
Try setting this to "Fast"
Line 9 in cb4131d
from pdfjsannotations.
Thanks for your advice.
It's nothing change size. When I change the scale to 1 (scale: 1), It's smaller but my pdf file smaller than paper (as padding).
from pdfjsannotations.
Scaling is similar to zoom function, but pageImageCompression
sets the compression level of images of each page.
from pdfjsannotations.
I tried to change pageImageCompression: "FAST", // FAST, MEDIUM, SLOW(Helps to control the new PDF file size)
but It still big size.
from pdfjsannotations.
Try this solution
from pdfjsannotations.
Now pdf files save as an image. (Image inside pdf file). Can we make save it as normal pdf. (I mean as selectable text format. Not images in pdf).?
from pdfjsannotations.
@kalana85 It's possible but requires little bit of time to go through the documentations and stuff. I've started to work on that and haven't had time to work on that for last few months. You can find it in the dev branch. Last time I worked on that I was stuck in something related to the fonts.
from pdfjsannotations.
@ kalana85这是可能的,但需要一点时间来浏览文档和内容。我已经开始做这件事,但在过去几个月里一直没有时间做这件事。您可以在 dev 分支中找到它。上次我工作时遇到了与字体相关的问题。
If it is difficult, could you save annotation data in a single file? Then we can add annotation to pdf by other backend(such as python).
from pdfjsannotations.
The issue still persists even after disabling retinascaling in pdfannotate.js
The file gets 4 times bigger and the quality is lost.
.
.
Let me know if there are any other solution for this issue?
thanks
from pdfjsannotations.
did anyone find the solution?
from pdfjsannotations.
Yes.. The solution here worked for me.
After disabling the Retinascaling, Assigning Imagecompression to 'FAST', I restricted the page size to A4 while saving the pdf.
Please refer below code..
PDFAnnotate.prototype.savePdf = function (fileName) {
debugger;
var inst = this;
//var format = inst.format || 'a4';
var format = 'a4'; //<------------ Restricted the page size to A4 here by addling this line in pdfannotate.js
var orientation = inst.orientation || 'portrait';
if (!inst.fabricObjects.length) return;
debugger;
var doc = new jspdf.jsPDF({ format, orientation });
if (typeof fileName === 'undefined') {
fileName = ${new Date().getTime()}.pdf
;
PDFAnnotate.prototype.savePdf = function (fileName) {
debugger;
var inst = this;
//var format = inst.format || 'a4';
var format = 'a4'; //<------------ Restricted the page size to A4 here by addling this line in pdfannotate.js
var orientation = inst.orientation || 'portrait';
if (!inst.fabricObjects.length) return;
debugger;
var doc = new jspdf.jsPDF({ format, orientation });
if (typeof fileName === 'undefined') {
fileName = ${new Date().getTime()}.pdf
;
}
from pdfjsannotations.
Related Issues (20)
- Set specific page number to view or scroll
- displaying 2 pages instead of 1
- Enable annotation layer (text and link)
- 2 Pages View like a book
- load or save pdf slow HOT 1
- Saved PDF text is blurry HOT 1
- loadFromJSON loses backgroundImage HOT 1
- Memory canvas use exceeds the maximum limit (254mb) HOT 1
- loading image from sample_output breaks background HOT 3
- Arrow | Pencil Tool Glitch HOT 1
- Can't Save PDF HOT 1
- get the coordinates of x,y ?
- TEXT LAYER HOT 3
- add zoom in / zoom out buttons
- Add predefinited image to canvas
- return saved image as base64
- Password protected pdf with password how to open Please Tell Me.
- Getting Blur PDF after saving Annotation HOT 1
- on a tablet I scroll to the canvas and can't scroll below? HOT 2
- PDF file does not open HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfjsannotations.