GithubHelp home page GithubHelp logo

Comments (7)

niknetniko avatar niknetniko commented on July 17, 2024 2

@gutschilla It was indeed configured in my config.exs file, if I remove the prefix from the config file, it works. Thank you for taking the time to look into this, I really appreciate it!

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024 1

Also @niknetniko , are you sure that you do not specify a :command_prefix in your config.exs? May I kindly ask for your mix.exs and yourconfig/config.exs and your environment-specific config (usually config/dev.exs)

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

Hi @niknetniko , thanks a lot for reporting. Generally speaking, xvfb should be an option, not the norm. Which version of PdfGenerator are you using?

from elixir-pdf-generator.

niknetniko avatar niknetniko commented on July 17, 2024

@gutschilla I'm using version 0.6.0.

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

This is weird. Running on Linux, OTP22, Elixir 19.4, wkhtmltopdf 0.12.4 yields

PdfGenerator.generate("<html><body>yo", page_size: "A5", command_prefix: nil)                            
15:40:28.130 [debug] {"/home/mart/.asdf/shims/wkhtmltopdf", ["--page-size", "A5", "/tmp/Xjz3QNdv.html", "/tmp/Xjz3QNdv.pdf"]}

As we both have wkhtmltopdf on PATH, the minor version differences in wkhtmltopdf and Elixir shouldn't matter. Neither should the OS.

Could you do me a favour and try

git clone https://github.com/gutschilla/elixir-pdf-generator.git
cd elixir-pdf-generator
iex -S mix

and in your IEX shell

PdfGenerator.generate("<html><body>yo", page_size: "A5", command_prefix: nil)

and while we're at it in your (Power)shell

mix test

This reminds me that I should set up a test running on Wondows.

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

Looking at

options[:command_prefix] || Application.get_env(:pdf_generator, :command_prefix)
the prefix really only kicks in when there's a configuration set accordingly or an option. The latter is untrue.

So, what's the output of

Application.get_env(:pdf_generator, :command_prefix)

from elixir-pdf-generator.

gutschilla avatar gutschilla commented on July 17, 2024

@niknetniko Glad it works now!

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.