Comments (5)
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.
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.
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.
@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.
@lypborges Thanks a lot pointing me there. It's addressed in current master. You're absolutely right.
from elixir-pdf-generator.
Related Issues (20)
- Code exemple for merge PDFS
- Doubts about maintainence
- (FunctionClauseError) no function clause matching in System.cmd/3 (Linux server) HOT 9
- PDFtk cannot be installed using Homebrew as mentioned in the Readme HOT 2
- Application pdf_generator exited: PdfGenerator.start(:normal, []) returned an error: shutdown: failed to start child: PdfGenerator.PathAgent HOT 2
- docs seem wrong for using chrome
- Compile on Win10
- Blank PDF being generated HOT 2
- shell_options not working as intended?
- Issue on wkhtmltopdf 0.12.6 HOT 4
- Issue with rendering images on heroku
- issue when deploying in production
- mix deps.compile not working HOT 2
- Generator_failed error HOT 4
- Heroku: (ErlangError) Erlang error: :enoent HOT 1
- Ability to create a PDF in chunks to stream it HOT 1
- How to use Tailwind CSS with elixir-pdf-generator in a Phoenix app HOT 7
- Provide compatibility with weasyprint HOT 1
- Any planned releases to officially support `prefer_local_executable` option?
- Erlang error, "invalid port name" 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 elixir-pdf-generator.