GithubHelp home page GithubHelp logo

Comments (5)

dgoldie avatar dgoldie commented on July 17, 2024

Ok, this fails because in this function is only looks for the pdftk_path,
which is nil in my case because I didn't install it. I thought it was optional :-)
The docs imply that wkhtmltopdf is the default.

Which Porcelain exec function is best practice with wkhtmltopdf?
btw: I can't find pdftk to install on brew.

thanks,
-doug.

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

Hi @dgoldie - Thanks a lot for your report. Sure, pdftk should be optional. I am not on a Mac so I have no idea why it isn't available via your favorite package manager. But there are sources and binaries available here: https://www.pdflabs.com/tools/pdftk-server/

I will make sure that pdftk is realy optional.

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

On Porcelain: both variant with or without goon do work. Since the author of Porcelain suggests using goon, I simply installed it.

from elixir-pdf-generator.

lypborges avatar lypborges commented on July 17, 2024

@dgoldie
I had the same error on MAC when I try the demo.
Then I realize we should run the command like this { :ok, filename } = PdfGenerator.generate html, page_size: "A5"without the open_password option.

@gutschilla, tks for this work. Maybe it's better to remove this option from the sample command on README.md

$ iex -S mix

html = "<html><body><p>Hi there!</p></body></html>"
# be aware, this may take a while...
{ :ok, filename }    = PdfGenerator.generate html, page_size: "A5" 
{ :ok, pdf_content } = File.read filename 

# or, if you prefail methods that rais on error:
filename             = PdfGenerator.generate! html

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

@lypborges Thanks a lot pointing me there. It's addressed in current master. You're absolutely right.

from elixir-pdf-generator.

Related Issues (20)

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.