Comments (2)
I'm using Docker to run my app. By adding the xvfb dependency it now generates the PDF, but with no style since I don't yet have chromium installed (it works just using WKHTMLTOPDF, just not with chrome-headless).
I've changed my mix.exs to have {:pdf_generator, "~> 0.6.2", github: "gutschilla/elixir-pdf-generator", compile: "make chrome"},
but now I get the following error:
document_service_web | Unchecked dependencies for environment dev:
document_service_web | * pdf_generator (https://github.com/gutschilla/elixir-pdf-generator.git)
document_service_web | could not find an app file at "_build/dev/lib/pdf_generator/ebin/pdf_generator.app". This may happen if the dependency was not yet compiled or the dependency indeed has no app file (then you can pass app: false as option)
document_service_web | ** (Mix) Can't continue due to errors on dependencies
document_service_web | make: Nothing to be done for 'chrome'
Also tried removing the compile: "make chrome"
and added prefer_system_executable: true
after installing it globally and get another error:
** (ArgumentError) argument error
:erlang.byte_size({:generator_failed, "internal/modules/cjs/loader.js:796\n throw err;\n ^\n\nError: Cannot find module '/home/document_service/app/_build/dev/lib/pdf_generator/priv/node_modules/chrome-headless-render-pdf/dist/cli/chrome-headless-render-pdf.js'\n at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)\n at Function.Module._load (internal/modules/cjs/loader.js:686:27)\n at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)\n at internal/main/run_main_module.js:17:11 {\n code: 'MODULE_NOT_FOUND',\n requireStack: []\n}\n"})
(pdf_generator 0.6.2) lib/pdf_generator.ex:316: PdfGenerator.generate_binary!/2
iex:28: Pdfer.generate/3
from elixir-pdf-generator.
@pedrocaseiro How did you solve this?
I am getting the same result.
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
- 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.