Replies: 1 comment
-
|
Bring down the options to barebones: still generates a PDF file whose dimensions are 612 x 792 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[Sorry for the length, but one successful method execution leads to many issues]
The following method:
is yielding many unexpected results and a few additional queries that the ReadMe does not appear to cover.
1 - the output document has a resolution of 612x792, which is at 96 dpi 8.5 x 11 in . It appears width and length are set to default values, irrespective of pdf_options.
.. 1b - I have no idea if this has to do with
format: nil,instruction, nor whatformat2 - filename remains unaltered as the action_name (which I assume is a consequence of being in a
respond_to do |format|block. However...3 - ferrum provides a way to save the PDF
:save_path. However, changing to:disposition: :attachment,does not change the process... 3b - ammending the render block
also has no effect on the process (pdf filename == action_name, saved in downloads folder)
4 - The file renders, apparently with Chrome, but without any apparent hooks. My
.zshrcfile is below. Uncommenting theconfig.headless = falseline in theferrum_pdf.rbinitializer does in practice launch the Chrome browser (reluctantly installed in Apple's desiredApplicationsdirectory (I prefer a different filing structure). Thus, somehow a gem is picking up system default values and running with it.5 - If a change is made to the method, or an error occurs, the following error
is generated and no further renderings are run. Thus, I suspect the
FerrumPdf.browser = nilline is misplaced. To have a failsafe mechanism to securely shut down the process, would anafter_actionbe in order?6 - [file under splitting hairs] the mix of standards (metric, imperial) can be confusing, especially when throwing in pixels in the mix. Interestingly, when it comes to roll paper it appears metric is the standard. Maybe this would be a parameter to set up front (px, mm, in) and have subsequent values simply go with that... "(in inches, defaults to 1cm)" is jarring
7 -
page_ranges: nilset to nil. does this mean 'all' too? In the case of roll paper, I also triedpage_ranges: "1"which returned the exact same rendered file. I assume this assumption is correct..zshrc
initializer
other methods useful for reproducing
Beta Was this translation helpful? Give feedback.
All reactions