danielwestendorf / breezy-pdf-lite Goto Github PK
View Code? Open in Web Editor NEWHTML/CSS/JS in, PDF out, via Chrome
Home Page: https://breezypdf.com
License: GNU Lesser General Public License v3.0
HTML/CSS/JS in, PDF out, via Chrome
Home Page: https://breezypdf.com
License: GNU Lesser General Public License v3.0
Vote!
Hi, I'm having an issue with the header and footer print options:
My template tags:
<meta name="breezy-pdf-headerTemplate" content="<div class='header'><table><tr><td class='date'></td><td><span class='title'></span></td><td><span class='pageNumber'></span>/<span class='totalPages'></span></td></tr></table></div>">
<meta name="breezy-pdf-footerTemplate" content="<div class='footer'><table><tr><td class='date'></td><td><span class='title'></span></td><td><span class='pageNumber'></span>/<span class='totalPages'></span></td></tr></table></div>">
Any ideas - I thought I'd followed the docs here...
Allow <meta name="breezy-pdf-remove" content="$CSS_SELECTOR">
tags to specify content that should automatically be striped from the HTML string prior to render.
Vote!
Hello, after getting Breezy set up on my server (CentOS 7 from https://webfaction.com), I was able to successfully run the command from the readme:
$ curl -X POST -H 'Authorization: Bearer {myTokenHere}' \
> http://localhost:5001/render/html \
> -d "`curl https://raw.githubusercontent.com/danielwestendorf/breezy-pdf-lite/master/sample.html`" \
> -o example.pdf
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33192 100 33192 0 0 42859 0 --:--:-- --:--:-- --:--:-- 42883
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33272 100 81 100 33191 921 368k --:--:-- --:--:-- --:--:-- 368k
After downloading the file from my server to open, it looks like the PDF is corrupt.
Vote!
Vote!
Vote!
I wanted to run server on my local machine using docker as described in README.md but it fails.
When I use tag v0.0.4
it builds fine though.
$ sudo docker run -it -p 5002:5002 -e "DEBUG=breezy-pdf-lite:*" -e "PORT=5002" -e "PRIVATE_TOKEN=YOURSUPERSECRETTOKEN" danielwestendorf/breezy-pdf-lite:latest
Starting Google Chrome
(node:6) ExperimentalWarning: The fs.promises API is experimental
TypeError: Cannot read property 'toString' of undefined
at Launcher.<anonymous> (/usr/src/app/node_modules/chrome-launcher/dist/chrome-launcher.js:189:64)
at Generator.next (<anonymous>)
at /usr/src/app/node_modules/chrome-launcher/dist/chrome-launcher.js:12:71
at new Promise (<anonymous>)
at __awaiter (/usr/src/app/node_modules/chrome-launcher/dist/chrome-launcher.js:8:12)
at spawnPromise (/usr/src/app/node_modules/chrome-launcher/dist/chrome-launcher.js:174:41)
at Launcher.<anonymous> (/usr/src/app/node_modules/chrome-launcher/dist/chrome-launcher.js:192:16)
at Generator.next (<anonymous>)
at /usr/src/app/node_modules/chrome-launcher/dist/chrome-launcher.js:12:71
at new Promise (<anonymous>)
Exiting
Vote!
This is a great project, super simple and straight-to-the-point, thank you!
I'm testing rendering times and it seems that no matter how fast the machine I run it on, small PDFs tend to take no less than 5 seconds to generate which seems like quite a while. I'm running it in Docker with no environment flags except for the token so debug overhead shouldn't be there.
Any suggestions on how to bring down the time to generate a PDF?
When the filename of the PDF is passed via meta tag it may, or may not, have the .pdf
extension. Sensibly detect this and only add a .pdf
extension if it doesn't currently exist.
Vote!
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.