-
Notifications
You must be signed in to change notification settings - Fork 499
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
Invoking asciidoctor-pdf in Ruby #866
Comments
You should be able to use Asciidoctor PDF via the require 'asciidoctor-pdf'
Asciidoctor.convert_file 'input.adoc', backend: 'pdf', safe: :safe The only requirements are that:
Is that not working for you? |
Sorry Dan I should have come by and closed this issue. I did first implemen a CLI invocation of asciidoctor-pdf. Whatever testing I was doing was getting me stuck, and it matched the experience of someone else I was talking to at the time, that somehow invoking the asciidoctor-pdf gem was inadequate. I knew that couldn't be true (and that you can't get to ever issue post here), so I tried again recently and now I'm properly calling asciidoctor-pdf as a gem. I'm sorry I didn't come back here and update this post. I forgot I posted it! |
No problem @briandominick. I'm very happy to hear you got it working! I'm curious about one thing, though. What does |
Ah, if only I had you reviewing all of my PRs @mojavelinux! Or anyone, for that matter, but definitely you would be great, welcome anytime ;-) That looks vestigial from some attempt at something. |
;) If you need input, always feel free to @ me. |
I've got a gem that calls
Asciidoctor.convert_file
and always setsrequire: "pdf"
, so whenbackend: pdf
it churns out a nice doc. This has worked pretty great, but after struggling to suppress the cover page on a PDF document I'm rendering, I was unable to make it work, even using the technique described in Issue #95. So I tested by directly building withasciidoctor-pdf
on the CLI, and it works like a charm.So should I be trying to get
Asciidoctor.convert_file
to behave like theasciidoctor-pdf
command? Maybe I'm missing a setting? Is there a way to call the Asciidoctor PDF from my Ruby script? Or do I have to switch to an explicit command-line invocation?The text was updated successfully, but these errors were encountered: