Comments (17)
Hmmm. Are you sure you're on the most recent zlib version (installed via npm)? It is working for me and the source code for zlib says "deflate" not "Deflate". Can you try uninstalling and reinstalling the zlib module with npm?
from pdfkit.
I've just noticed, that I get some warnings in node-zlib.cc while installing pdfkit
npm uninstall pdfkit ... npm info uninstall [email protected] complete npm ok
npm uninstall zlib .. npm info uninstall [email protected] complete npm ok npm install pdfkit npm info it worked if it ends with ok npm info using [email protected] npm info using [email protected] npm info range zlib@>=1.0.2 npm info preinstall [email protected] npm info preinstall [email protected] Nothing to clean (project not configured) Setting srcdir to : /usr/local/lib/node/.npm/zlib/1.0.5/package Setting blddir to : /usr/local/lib/node/.npm/zlib/1.0.5/package/build Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for node path : not found Checking for node prefix : ok /usr/local Checking for library z : yes 'configure' finished successfully (0.869s) Waf: Entering directory `/usr/local/lib/node/.npm/zlib/1.0.5/package/build' [1/2] cxx: src/node-zlib.cc -> build/Release/src/node-zlib_1.o ../src/node-zlib.cc: In function ‘v8::Handle ZLib_deflate(const v8::Arguments&)’: ../src/node-zlib.cc:82: warning: left-hand operand of comma has no effect ../src/node-zlib.cc: In function ‘v8::Handle ZLib_inflate(const v8::Arguments&)’: ../src/node-zlib.cc:83: warning: left-hand operand of comma has no effect [2/2] cxx_link: build/Release/src/node-zlib_1.o -> build/Release/zlib_bindings.node Waf: Leaving directory `/usr/local/lib/node/.npm/zlib/1.0.5/package/build' 'build' finished successfully (0.784s) npm info install [email protected] npm info postinstall [email protected] npm info preactivate [email protected] npm info activate [email protected] npm info postactivate [email protected] npm info install [email protected] npm info postinstall [email protected] npm info preactivate [email protected] npm info activate [email protected] npm info postactivate [email protected] npm info build Success: [email protected] npm info build Success: [email protected] npm ok
from pdfkit.
Well, the problem was caused by node version v0.5.8, where zlib is included in API.
from pdfkit.
Oh, interesting. I hadn't noticed that. Man that really sucks that they use a different API. Not really sure what I should do here...
from pdfkit.
I've put the question to the node authors. I'll get back to you on this one. For now, it seems v0.5.x is broken. If you can, use v0.4.x for now. Thanks!
from pdfkit.
Okay, it won't be problem to use your library in projects on heroku, which requires Node.js 0.4.7. For other projects I'll wait for v0.5.x compatible version. Thanks for assistance!
from pdfkit.
This should be fixed. Please update to pdfkit version 0.1.6 with npm and let me know if you have any more issues. Thanks!
from pdfkit.
I have an issue installing pdfkit on windows w/ Node 0.6.1. Looking at the flate package tells me the problem. It's doing a native compile looks like. Any reason you are not just using the zlip that is now built into Node .6+ ? Does it need to be synchronous?
from pdfkit.
Yeah for backward compatibility with Node 0.4.x... Hmmm, well that sucks. Not sure what to do now.
from pdfkit.
Aw right, that makes sense. Ugh need a branch for .4 then?
from pdfkit.
im getting this error with v0.6.2 of node... any help?
from pdfkit.
Got an error on node 0.6.5:
Error: Cannot find module './zlib_bindings'
at Function._resolveFilename (module.js:334:11)
at Function._load (module.js:279:25)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object.<anonymous> (/home/ixti/projects/ndoc2pdf/node_modules/pdfkit/node_modules/flate/lib/zlib.js:1:80)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
from pdfkit.
Also getting this error on node 0.6.8
at Function._resolveFilename (module.js:334:11)
at Function._load (module.js:279:25)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object.<anonymous> (/Users/rix501/Documents/Websites/node/housing/node_modules/pdfkit/node_modules/flate/lib/zlib.js:1:80)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
from pdfkit.
This issue has been merged into #48. Please resume discussion there. :)
from pdfkit.
This isn't fixed dude, zlib
is now part of node
core, why are you using flate
still? Is this no longer maintained?
from pdfkit.
As I said before, the discussion of this issue is now taking place at #48. I know it isn't working. The switch to the built in zlib
module will require a major rewrite.
from pdfkit.
I actually did that: alFReD-NSH@d994c7b
Changed some of the API to async. But not everything is working(fonts or images) and I haven't documented the API change.
from pdfkit.
Related Issues (20)
- Bullet number on version 0.15.0 not work HOT 2
- PDFKit does not create a new page on iOS Safari HOT 8
- Links on SVGs
- Is it normal for strings to be rendered slightly differently three times than once?
- Generate PDF using HTML? HOT 1
- rollup: output.interop no longer allows value `false`
- Y position of document not updated after adding image HOT 4
- Incorrect ordering of text when RTL (arabic) text mixed with LTR (english) HOT 1
- Prevent Text Overflow
- Support for other javascript runtimes (deno, cloudflare worker, bun)
- Please use lru to cache font layout to fix memory leak HOT 1
- `pageAdded` event not called for first page with `autoFirstPage: true`
- Pattern fills HOT 1
- pdfkit generates PDFs with technical errors and incorrect PDF version
- My Css code not work properly when i convert html to pdf by pdfkit HOT 1
- File Annotations without Icons
- Argument of type 'WriteStream' is not assignable to parameter of type 'WritableStream'.
- My Portfolio using HTML and CSS
- My Portfolio using HTML and CSS
- Enabling encryption prevents destination links from working. HOT 1
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 pdfkit.