Skip to content

How to pass prince_options #1

Closed
bhavinjavia opened this Issue May 14, 2011 · 1 comment

2 participants

@bhavinjavia

Hi,

I am evaluating DocRaptor and this gem for our PDF generation needs.

Is it possible to send print_options with this gem ?

e.g. I am trying to use HTTP Basic Auth to let DocRaptor access the document_url. My sample request looks like -

File.open("docraptor_sample.pdf", "w+") do |f| 
  f.write DocRaptor.create(default_options.merge(
  { :document_url => "<url of html document on my server>",
    :prince_options =>  { :http_user => '<username>', :http_password => '<password>' },
    :name             => "docraptor_sample.pdf",
    :document_type    => "pdf"
  }))
end

This fails to authenticate DocRaptors request to document_url with http basic auth.

The Document log on docraptor.com shows this -

Prince Options

```--- !map:HashWithIndifferentAccess
http_user:
http_password:
baseurl:

This doesn't look right. Should it be serializing prince_options to yaml ?

I have confirmed http basic auth is setup correctly via curl.

Please let me know if I am missing something.

Thanks
@janxious
Expected Behavior member

I believe this has since been fixed. I am closing due to the age of this ticket and because I was unable to reproduce it using an http auth example site we have for testing.

@janxious janxious closed this Sep 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.