GithubHelp home page GithubHelp logo

danielwestendorf / breezy-pdf-lite Goto Github PK

View Code? Open in Web Editor NEW
392.0 392.0 22.0 858 KB

HTML/CSS/JS in, PDF out, via Chrome

Home Page: https://breezypdf.com

License: GNU Lesser General Public License v3.0

JavaScript 98.59% Dockerfile 1.31% Procfile 0.10%
headless-chrome pdf-generation pdf-rendering

breezy-pdf-lite's People

Contributors

danielwestendorf avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar mikemand avatar pomartel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breezy-pdf-lite's Issues

Suggestions for speeding up generation?

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?

Corrupted PDFs

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.

screen shot 2018-07-27 at 12 44 08 pm

screen shot 2018-07-27 at 12 44 13 pm

"TypeError: Cannot read property 'toString' of undefined" on docker run

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

header and footer templates not working

Hi, I'm having an issue with the header and footer print options:

  • the footer templates seems to be rendering as the header and vice versa.
  • the footer wont display page numbers and the header can't display anything!

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.