Re: PDF's from asciidoctor-pdf ruby gem ?

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/PDF-s-from-asciidoctor-pdf-ruby-gem-tp2715p2888.html

As Robert pointed out, you need to require the library explicitly when using the API. The required option is only processed by the cli (asciidoctor command), not in the API itself. You get an error because asciidoctor-pdf was never required.

See https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/cli/options.rb#L214

Cheers,

-Dan

On Tue, Mar 31, 2015 at 9:05 AM, Robert.Panzer [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Just tried with
asciidoctor 1.5.2
asciidoctor-pdf 1.5.0.alpha.6
on JRuby 1.7.13 on Win7 and the following script worked fine for me:

require 'asciidoctor'
require 'asciidoctor-pdf'
Asciidoctor.convert_file 'test.ad', :backend => 'pdf'

Could you check if that works for you as well?

Best regards,
Robert


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/PDF-s-from-asciidoctor-pdf-ruby-gem-tp2715p2883.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--