marak / pdf.js Goto Github PK
View Code? Open in Web Editor NEWProject Deprecated
License: Other
Project Deprecated
License: Other
Settings:
Browser version:
Chrome - Version 65.0.3325.162 (Official Build) (64-bit)
Steps to reproduce the issue :
Expected Result
The PDF stays in currently viewed page.
Actual Result
PDF moves back to the last search result page
Is pdf.js able to open existing PDF files to use as a starting point?
Using latest pdf.js - the one with drawLine...
With node.js v0.4.12, which might have something to do with it, the demo produces 2 blank pages; no text or graphics. Select All, copy, paste into a text doc pastes nothing. testFile57.pdf in the repo and download displays properly, select/copy/paste pastes the text into a text editor. Ubuntu Natty 11.04.
I note that in the repo/download file, the node version is v0.3.0-pre.
There are differences between the files:
testFile57:
%PDF-1.3
<>
BT /F1 16.00 Tf ET
BT 56.69 785.20 Td (hello, I am PDF.) Tj ET
BT 56.69 756.85 Td (i was created using node.js version: v0.3.0-pre) Tj ET
BT 56.69 728.50 Td (i can also be created from the browser) Tj ET
endstream
endobj
testFile44 (mine):
%PDF-1.3
<>
BT undefined 16.00 Tf ET
BT /F0 16.00 Tf ET
BT 56.69 785.20 Td (hello, I am PDF.) Tj ET
BT /F0 16.00 Tf ET
BT 56.69 756.85 Td (i was created using node.js version: v0.4.12) Tj ET
BT /F0 16.00 Tf ET
BT 56.69 728.50 Td (i can also be created from the browser) Tj ET
endstream
endobj
Similar block a bit later on - also has 'undefined'.
Update: I was able to get it to work:
// 16 is the font size
pageFontSize = fontSize;
pageFont = font;
//DLC-->>>>>delete out('BT ' + fonts[font] + ' ' + parseInt(fontSize) + '.00 Tf ET');
//fonts[] is undefined at this point when called by _addPage();
}
Alternately, rename setFont: function... to var _setFont = function... and move the function up where _addPage() is. Then create
setFont: function(f){
_setFont(f);
},
in its place. Then, where _addPage() is called to automatically create the first page, FIRST call
_setFont(1);
This change removes the need for node-demo.js to have an initializing call to setFont.
Hiya,
As a starting point for embracing an new project I always run the code trough JSLINT (http://jslint.com)
Well, It did not look pretty ;)
Will someone work with me to get this done? It is a good start to increase the maintainability off the project.
For now I don't have time for this, I will just quickly insert new-line handling, and some stuff to make it easier to set the position based on earlier outputs.
regards
Sander
How can I add special chars like (β) to the document?
I can't access http://www.maraksquires.com/pdf.js/ since it asks for password.
cheers.
When adding text with some UTF8 characters it won't display them correctly.
E.g. ö becomes ö
Could you please post some plans for what kinds of features you think you will implement? We have some forms and table-based reports generated by prawn that we would like to be able to render entirely on the client side with js. Thanks!
Please archive the repository in the settings.
We really need a way to transform DOM elements, or straight HTML text into Post Script.
Forcing the user to create a PDF using only Post Script notation is cruel.
Browser could not load http://maraksquires.com/pdf.js/ (404)
Any idea how much effort that would require and if / when you might have support?
The name "pdf.js" conflicts with Mozilla's PDF reader pdf.js, another GitHub project (and more popular than Marak/pdf.js).
I would suggest you change the name so that others can find you easier.
Perhaps "makepdf.js"?
I would like to send add a long text with text function but the problem is whenever text is too long to be fitted in screen it is trimmed. Any idea how to add text with wrapping option?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.