Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass custom executable options #63

Open
kernow opened this issue Aug 18, 2018 · 2 comments
Open

Pass custom executable options #63

kernow opened this issue Aug 18, 2018 · 2 comments

Comments

@kernow
Copy link

kernow commented Aug 18, 2018

Is there a way to pass in custom executable options? I've not been able to see anywhere these can be set from reading the source code. For instance I want to be able to set the --no-network option when running in the test environment to prevent pdf generation from loading external images.

Prince supports lots of executable options, if there is currently no way to set them it would be good to have a way to be able to do this. I'm open to suggestions on the best way to implement and then I can submit a PR.

mustmodify added a commit to mustmodify/princely that referenced this issue Oct 18, 2019
@joshawnard
Copy link

joshawnard commented Aug 4, 2020

I need to pass in --disallow-copy but am unable to do so because the executable options does not accept an argument to merge in other options for Prince, which are aplenty.

def executable_options
options = []
options << "--input=html"
options << "--server" if @server_flag
options << "--log=#{log_file}"
options << "--media=#{media}" if media
options << "--javascript" if @javascript_flag
options << @style_sheets
options
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@kernow @joshawnard and others