Giter Site home page Giter Site logo

asciidoctor / asciidoctorj-pdf Goto Github PK

View Code? Open in Web Editor NEW
34.0 9.0 17.0 513 KB

AsciidoctorJ PDF bundles the Asciidoctor PDF RubyGem (asciidoctor-pdf) so it can be loaded into the JVM using JRuby.

License: Apache License 2.0

Java 85.90% CoffeeScript 2.42% Groovy 0.89% Shell 10.80%

asciidoctorj-pdf's Introduction

AsciidoctorJ PDF: Asciidoctor

AsciidoctorJ PDF is a convenient repackaging of Asciidoctor PDF for use with AsciidoctorJ, which brings the Asciidoctor ecosystem to the JVM.

Build Status (Github Actions)

asciidoctorj-pdf's People

Contributors

abelsromero avatar ahus1 avatar mojavelinux avatar robertpanzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asciidoctorj-pdf's Issues

When using JRuby 9.x SnakeYaml needs to be on the classpath.

I had some "strange" strange failures with 1.6.0-alpha.11 and JRuby 9.0.5.0.

Typical failure was

aused by: java.lang.NoSuchMethodError: org.yaml.snakeyaml.events.DocumentStartEvent.getVersion()Lorg/yaml/snakeyaml/DumperOptions$Version;
    at org.jruby.ext.psych.PsychParser.handleDocumentStart(PsychParser.java:243)
    at org.jruby.ext.psych.PsychParser.parse(PsychParser.java:192)
    at org.jruby.ext.psych.PsychParser$INVOKER$i$parse.call(PsychParser$INVOKER$i$parse.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrTwo.call(JavaMethod.java:1081)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:729)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273)
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:

The problem is resolved when SnakeYaml v1.13 is placed on the classpath.

I am not really sure how this should be resolved at a build level atm, but it is worthwhile raising as an issue so that it can be considred for testing purposes.

asciidoctorj-pdf is very slow compared to conversion using fop

First of all, thanks for the great work on asciidoctor(j)(-pdf)!

We are using asciidoctor-pdf to convert our documents, but are not really satisfied with the performance.
E.g. converting a 24 Page PDF (2 PNG, 2 SVG, 15 small xmls highlighed via rouge, some tables):

  • asciidoctorj -> docbook -> fop -> pdf takes around 3 seconds
  • asciidoctorj-pdf takes 15-20 seconds (The same document with cruby asciidoctor-pdf takes around 5 seconds to convert)

Is there anyway to improve the performance?

Support stem

Asciidoctorj stem support is blocked by jruby lack of native support for mathematical gem.
I suspect using jlatexmath can be an option (and asciimath java binding?) implementing asciidoctor-asciimath in plain java.

side note: if there is any way to use asciidoctor-mathematical without this new feature i'm happy too but I didn't find it yet ;)

Problem with internal themes when packed in OSGi bundle

I am not sure if that's the right place to file this issue as a possible solution likely requires modifying upstream asciidoctor-pdf but I decided to file it here because the problem is presumably limited to specific usecases of asciidoctorj-pdf and maybe can serve as guidance for someone stumbling across the same problem.

I am using AsciidoctorJ to develop an Eclipse plugin and I realized that version 2.3.3 throws an (ENOTDIR) Not a directory - uri:classloader:/gems/asciidoctor-pdf-2.3.3/data/themes error (where 1.6.2 was working fine) that might be related to this JRuby issue (although this is supposed to be fixed and I am using JRuby-Complete 9.3.8.0).

My workaround is to extract the themes from the jar, bundle them outside of asciidoctorj-pdf in my jar and comment out line 16 in theme_loader.rb. Like I did with prawn.icon I am fine with monkey patching but maybe there is a different way of getting the theme file list that also works in these circumstances.

#BundledThemeNames = (::Dir.children ThemesDir).map {|it| it.slice 0, it.length - 10 }

Run in OSGi

Hi guys, trying to upgrade to latest versions since 1.6.x is quite old already and not going to be maintained anymore. The problem we have is that we use this in an OSGi environment, we're loading all the 'gems' from asciidoctor and asciidoctor-pdf jars by passing the list to the Factory create method. This was/is working fine in 1.6.x version, it stops working since 2.0.x (as I've tried to go down backward trying to find a combination that could work)., the error originates from theme_loader.rb:
org.jruby.exceptions.SystemCallError: (ENOTDIR) Not a directory - uri:classloader:/gems/asciidoctor-pdf-2.3.7/data/themes at org.jruby.RubyDir.initialize(org/jruby/RubyDir.java:146) at org.jruby.RubyClass.new(org/jruby/RubyClass.java:917) at org.jruby.RubyDir.children(org/jruby/RubyDir.java:488) at org.jruby.RubyDir.children(org/jruby/RubyDir.java:483) at RUBY.<class:ThemeLoader>(uri:classloader:/gems/asciidoctor-pdf-2.3.7/lib/asciidoctor/pdf/theme_loader.rb:16) at RUBY.<module:PDF>(uri:classloader:/gems/asciidoctor-pdf-2.3.7/lib/asciidoctor/pdf/theme_loader.rb:8) at RUBY.<module:Asciidoctor>(uri:classloader:/gems/asciidoctor-pdf-2.3.7/lib/asciidoctor/pdf/theme_loader.rb:7) at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-2.3.7/lib/asciidoctor/pdf/theme_loader.rb:6) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1057) at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1084) at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-2.3.7/lib/asciidoctor/pdf.rb:15) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1057) at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1084) at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-2.3.7/lib/asciidoctor-pdf.rb:3)

Trying to debug this one when the script tries to load the themes the themes folder resolves to uri:classloader:/gems/asciidoctor-pdf-2.3.7/data/themes which looks fine imho. However this doesn't load anything under it so it looks like is not a folder, hence the exception :(

The difference being in 2.x version the theme loaded tries to get all bundled themes (BundledThemeNames = (::Dir.children ThemesDir).map {|it| it.slice 0, it.length - 10 }), and this fails - maybe a .jrubydir flag-file could solve this issue? The listClassLoaderFiles method in URIResource does look for it. Otherwise the bundle class loader can't resolve gems/asciidoctor-pdf-2.3.7/data/themes. Anything that we might need to change to make it work, is this still possible to run in an OSGi environment?

Thanks

JRuby does not support StringIO larger than 2147483647 bytes

Whenever I try to use a custom theme font for the PDF creation, regardless of the font I choose, I get an error with JRuby StringIO.

[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc (output-full-pdf) on foo-project: Execution output-full-pdf of goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc failed: org.jruby.exceptions.ArgumentError: (ArgumentError) JRuby does not support StringIO larger than 2147483647 bytes -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc (output-full-pdf) on project foo-project: Execution output-full-pdf of goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc failed: org.jruby.exceptions.ArgumentError: (ArgumentError) JRuby does not support StringIO larger than 2147483647 bytes
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution output-full-pdf of goal org.asciidoctor:asciidoctor-maven-plugin:1.6.0:process-asciidoc failed: org.jruby.exceptions.ArgumentError: (ArgumentError) JRuby does not support StringIO larger than 2147483647 bytes
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.ArgumentError: (ArgumentError) JRuby does not support StringIO larger than 2147483647 bytes
    at org.asciidoctor.internal.JRubyAsciidoctor.convertFile (JRubyAsciidoctor.java:498)
    at org.asciidoctor.internal.JRubyAsciidoctor.convertFile (JRubyAsciidoctor.java:469)
    at org.asciidoctor.maven.AsciidoctorMojo.renderFile (AsciidoctorMojo.java:469)
    at org.asciidoctor.maven.AsciidoctorMojo.execute (AsciidoctorMojo.java:253)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.jruby.exceptions.ArgumentError: (ArgumentError) JRuby does not support StringIO larger than 2147483647 bytes
    at org.jruby.ext.stringio.StringIO.pos= (org/jruby/ext/stringio/StringIO.java:777)
    at RUBY.parse_from (uri:classloader:/gems/ttfunk-1.5.1/lib/ttfunk/reader.rb:23)
    at RUBY.initialize (uri:classloader:/gems/ttfunk-1.5.1/lib/ttfunk/table.rb:20)
    at RUBY.os2 (uri:classloader:/gems/ttfunk-1.5.1/lib/ttfunk.rb:101)
    at RUBY.ascent (uri:classloader:/gems/ttfunk-1.5.1/lib/ttfunk.rb:50)
    at RUBY.initialize (uri:classloader:/gems/prawn-2.2.2/lib/prawn/font/ttf.rb:32)
    at RUBY.load (uri:classloader:/gems/prawn-2.2.2/lib/prawn/font.rb:298)
    at RUBY.find_font (uri:classloader:/gems/prawn-2.2.2/lib/prawn/font.rb:253)
    at RUBY.font (uri:classloader:/gems/prawn-2.2.2/lib/prawn/font.rb:57)
    at RUBY.font (uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.8/lib/asciidoctor/pdf/ext/prawn/extensions.rb:205)
    at RUBY.layout_title_page (uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.8/lib/asciidoctor/pdf/converter.rb:2651)
    at RUBY.convert_document (uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.8/lib/asciidoctor/pdf/converter.rb:198)
    at RUBY.convert (uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.8/lib/asciidoctor/pdf/converter.rb:141)
    at RUBY.convert (uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor/document.rb:1190)
    at RUBY.convert (uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1521)
    at RUBY.convert_file (uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1595)
    at org.jruby.RubyIO.open (org/jruby/RubyIO.java:1157)
    at RUBY.convert_file (uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1595)

Build error with asciidoctor-pdf 1.5.0.beta3

Just to keep track of it as I don't have time right now to dig deeper into it:
When building asciidoctorj-pdf 1.5.0-beta.3 both unit and integration tests fail while registering fonts:

Caused by: org.jruby.exceptions.RaiseException: (ENOENT) No such file or directory - notoserif-regular-subset.ttf not found in uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/data/fonts
	at RUBY.block in register_fonts(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:3333)
	at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1343)
	at org.jruby.RubyEnumerable.inject(org/jruby/RubyEnumerable.java:936)
	at RUBY.block in register_fonts(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:3325)
	at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1343)
	at RUBY.register_fonts(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:3324)
	at RUBY.init_pdf(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:323)
	at RUBY.convert_document(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:159)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.5.0.beta.3/lib/asciidoctor-pdf/converter.rb:134)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor/document.rb:1190)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1521)
	at RUBY.block in convert_file(uri:classloader:/gems/asciidoctor-1.5.8/lib/asciidoctor.rb:1595)
	at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1156)
	at RUBY.convert_file(uri:classloa

This file clearly is in the generated jar though.

Dependency / interaction with snakeyaml

I've been using asciidoctorj-pdf in an environment (Intellij) where different (older?) snakeyaml version is around. This lead to an exception like this:

load error: psych -- java.lang.NoSuchMethodError: org.yaml.snakeyaml.error.Mark.(Ljava/lang/String;III[II)V

After some trial and error and adding org.yaml:snakeyaml:1.23 as a dependency, it started to work.

I wonder about two things:

  • what would be the correct version or snakeyaml, and where would I get it from?
  • shouldn't asciidoctorj-pdf declare it as a dependency (or optional dependency)?

Thanks,
Alexander

SOURCE_DATE_EPOCH environment variable not taken into account

Hi,

In order to make reproducible PDF files for my tests, I'm trying to set the SOURCE_DATE_EPOCH environment variable as explained in the doc but from what I see, the generated PDF is still using the current date.

I tried using JUnit's annotation @SetEnvironmentVariable(key = "SOURCE_DATE_EPOCH", value = "1000000") or by running gradle with the environnement variable: $ SOURCE_DATE_EPOCH=1000000 ./gradlew test --tests *generatePdf, I also tried System.setProperty("SOURCE_DATE_EPOCH", "1000000");, but running mdls on the PDF shows:

kMDItemContentCreationDate             = 2020-12-03 17:52:58 +0000
kMDItemContentCreationDate_Ranking     = 2020-12-03 00:00:00 +0000
kMDItemContentModificationDate         = 2020-12-03 17:53:41 +0000
kMDItemContentModificationDate_Ranking = 2020-12-03 00:00:00 +0000
kMDItemDateAdded                       = 2020-12-03 17:52:58 +0000
kMDItemDateAdded_Ranking               = 2020-12-03 00:00:00 +0000
kMDItemFSContentChangeDate             = 2020-12-03 17:53:41 +0000
kMDItemFSCreationDate                  = 2020-12-03 17:52:58 +0000
kMDItemInterestingDate_Ranking         = 2020-12-03 00:00:00 +0000

Am I doing it wrong or is the environment variable not provided to JRuby (or something else)?

Text disappears from title page after upgrade to 2.x

When I switch from 1.6.2 to 2.0.6 my PDF title page no longer shows the document title.

Not really sure how much detail to include, but we are creating PDFs with a custom theme; here's the start of the asciidoc:

:doctype: book
:pdf-theme: acme-book
:source-highlighter: coderay
:listing-caption: Listing
ifndef::imagesdir[:imagesdir: images]
:back-cover-image: image:../themes/acme-cover-achterkant.svg[]

:author: Wile E. Coyote et al.
:lang: en
:orgname: acme
:keywords: keyword1, keyword2

= ACME Something something: With more details on the next line

That last line does show up when using 1.6.2, but disappears when we use 2.0.6.

Specifically in our theme we're using:

title-page:
  align: right
  background-image: acme-cover-voorkant.svg
  title:
    margin-top: -316
    margin-left: 70
    margin-right: -5
    font:
      family: GT-Walsheim
      color: #02B4E0
      size: 40
      style: bold
  subtitle:
    font:
      family: GT-Walsheim
      color: #000000
      size: 14
      style: bold_italic
    margin-top: 15
    margin-left: 100
    margin-right: -5
  revision:
    display: none
  authors:
    display: none

Any help or pointers appreciated, as I'm not seeing anything relevant in the logs either.

Loading PsychLibrary fails when temporary jar files do not have permissions to read pom of snakeyaml

Using asciidoctorj-pdf in a tomcat webapp (alfresco 6.2) we're running into issues when trying to generate a pdf.

The Environment is:

Server version:        Apache Tomcat/8.5.43
JVM Version:           11.0.1+13

And the dependencies we use:

		<dependency>
			<groupId>org.asciidoctor</groupId>
			<artifactId>asciidoctorj-api</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>org.asciidoctor</groupId>
			<artifactId>asciidoctorj</artifactId>
			<version>2.3.0</version>
		</dependency>
		<dependency>
			<groupId>org.asciidoctor</groupId>
			<artifactId>asciidoctorj-pdf</artifactId>
			<version>1.5.3</version>
		</dependency>

Analyzing the stacktrace it seems the SecurityManager is denying access to a pom file:

 org.jruby.exceptions.NameError: (NameError) cannot load (ext) (org.jruby.ext.psych.PsychLibrary)
	at org.jruby.ext.jruby.JRubyUtilLibrary.load_ext(org/jruby/ext/jruby/JRubyUtilLibrary.java:201)
	at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/psych.rb:7)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/yaml.rb:6)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at RUBY.<main>(uri:classloader:/gems/prawn-icon-2.5.0/lib/prawn/icon/font_data.rb:9)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1002)
	at RUBY.<main>(uri:classloader:/gems/prawn-icon-2.5.0/lib/prawn/icon.rb:11)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
	at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor/pdf/ext/prawn/extensions.rb:5)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1002)
	at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor/pdf/ext/prawn.rb:9)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1002)
	at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor/pdf/ext.rb:6)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1002)
	at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor/pdf.rb:13)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(org/jruby/RubyKernel.java:1002)
	at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor-pdf.rb:3)
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:974)
	at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:130)
	at RUBY.<main>(<script>:1)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/META-INF/maven/org.yaml/snakeyaml/pom.properties" "read")
	at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
	at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
	at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:661)
	at java.base/java.io.File.exists(File.java:815)
	at org.apache.catalina.webresources.DirResourceSet.getResource(DirResourceSet.java:105)
	at org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281)
	at org.apache.catalina.webresources.CachedResource.validateResource(CachedResource.java:87)
	at org.apache.catalina.webresources.Cache.getResource(Cache.java:87)
	at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216)
	at org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225)
	at org.apache.catalina.loader.WebappClassLoaderBase.findResource(WebappClassLoaderBase.java:930)
	at org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClassLoaderBase.java:1051)
	at java.base/java.lang.ClassLoader.getResource(ClassLoader.java:1395)
	at java.base/java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:322)
	at org.jruby.ext.psych.PsychLibrary.load(PsychLibrary.java:54)
	at org.jruby.ext.jruby.JRubyUtilLibrary.loadExtension(JRubyUtilLibrary.java:224)
	at org.jruby.ext.jruby.JRubyUtilLibrary.load_ext(JRubyUtilLibrary.java:201)
	at org.jruby.ext.jruby.JRubyUtilLibrary$INVOKER$s$1$0$load_ext.call(JRubyUtilLibrary$INVOKER$s$1$0$load_ext.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(RubyKernel$INVOKER$s$1$0$require.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:95)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:159)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:146)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(RubyKernel$INVOKER$s$1$0$require.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:95)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:159)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:146)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(RubyKernel$INVOKER$s$1$0$require.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:95)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:159)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:146)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
	at org.jruby.Ruby.loadFile(Ruby.java:2785)
	at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
	at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
	at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
	at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
	at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
	at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
	at org.jruby.RubyKernel.require(RubyKernel.java:974)
	at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(RubyKernel$INVOKER$s$1$0$require.gen)
	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
	at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:95)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:159)
	at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:146)
	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
	at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
	at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
	at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
	at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
	at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
	at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
	at org.jruby.Ruby.evalScriptlet(Ruby.java:860)
	at org.jruby.Ruby.evalScriptlet(Ruby.java:836)
	at org.asciidoctor.jruby.internal.RubyGemsPreloader.preloadLibrary(RubyGemsPreloader.java:78)
	at org.asciidoctor.jruby.internal.RubyGemsPreloader.preloadRequiredLibraries(RubyGemsPreloader.java:69)
	at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:372)
	at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:366)

The problem goes away when adding permissions in the java policy file to the temporary generated jar files jruby uses here apparently:

[root@hostname tomcat]# find .|grep jruby
./temp/jruby-1
./temp/jruby-1/jruby4257562214173774470bctls-jdk15on-1.62.jar
./temp/jruby-1/jruby2507730441833188943psych.jar
./temp/jruby-1/jruby17345433168328524530snakeyaml-1.23.jar
./temp/jruby-1/jruby1812907166974319462jopenssl.jar
./temp/jruby-1/jruby6604912783809575262bcpkix-jdk15on-1.62.jar
./temp/jruby-1/jruby16888754197153238165bcprov-jdk15on-1.62.jar

I'm not happy doing this though as I'm not sure the postfix to the jruby folder here will always be "-1" and it seems I'm unable adding wildcards at this level, the current rule (overly permissive) I'm using to get it working is:

grant codeBase "file:${catalina.base}/temp/-" {
    permission java.security.AllPermission;
};

Do you see any possible thing we can do to make this more secure? (e.g. having a specific temporary directory for those temporary jar files, or a way to not having them used at all?)

'pdf_source_code_should_be_highlighted' fail (Windows 7)

I have detected some weird behavior with the tests in 'asciidoctorj-pdf' sub-module. I suspect it may have something to do with my environment.

When running ./gradlew.sh clean test in the parent project from shell (babun) or the equivalent gradlew.nat com CMD, the test 'pdf_source_code_should_be_highlighted' with the error:

org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (RuntimeError) asciidoctor: FAILED: required gem 'rouge' is not installed. Processing aborted.
    at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:345)
    at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:434)
    at org.asciidoctor.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:554)
    at org.asciidoctor.WhenBackendIsPdf.pdf_source_code_should_be_highlighted(WhenBackendIsPdf.jav

I checked and the 1.10.1 gem is installed.

When running the test from IntelliJ, I need to run jRubyPrepare first, which is more or less OK. But then both test in WhenBackendIsPdf fail with the message.

org.jruby.exceptions.RaiseException: (LoadError) load error: psych -- java.lang.NoSuchMethodError: org.jruby.gen.org$jruby$ext$psych$PsychParser$POPULATOR.populateMethod(Lorg/jruby/internal/runtime/methods/JavaMethod;ILjava/lang/String;ZLorg/jruby/internal/runtime/methods/CallConfiguration;ZLjava/lang/Class;Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Class;)V

    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956)
    at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
    at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/yaml.rb:6)
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956)

Now, the best part, placing the tests in 'itest' sub-module makes both test work in IntelliJ (after manually executin jrubyPrepare) but running from the shell reproduced the same error as the first case (shell execution). Also, I validated the PDF and it gets correctly generated.

Any idea?

Icons are represented as [icon name] in PDF output

Hi, I am new to asciidoctor, and I am trying to generate a PDF via asciidoctorj and asciidoctorj-pdf

I need to put icons inline in the document, but so far I didn't manage to do it, it always result in a text name of icon surrounded by [ ]

I am using asciidoctor like that :

` final Asciidoctor asciidoctor = Asciidoctor.Factory.create();

    final Attributes attributes = new Attributes();

    final Options options = new Options();
    options.setInPlace(true);
    options.setBackend("pdf");
    options.setAttributes(attributes);
    options.setToFile("report.pdf");

    asciidoctor.convert(..., options);`

Nothing more, my maven dependencies is like that :

<dependency> <groupId>org.asciidoctor</groupId> <artifactId>asciidoctorj</artifactId> <version>2.4.3</version> </dependency> <dependency> <groupId>org.asciidoctor</groupId> <artifactId>asciidoctorj-pdf</artifactId> <version>1.5.4</version> </dependency>

My preambule is using :icons: font

asciidoctorj-pdf is not rendering Cylinder shape

I am using the following versions in my pom using maven:
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
<asciidoctorj.version>2.1.0</asciidoctorj.version>
<asciidoctorj.diagram.version>1.5.18</asciidoctorj.diagram.version>
<jruby.version>9.2.9.0</jruby.version>
<asciidoctorj.pdf.version>1.5.0-beta.7</asciidoctorj.pdf.version>

Here is a snipet of the code:
subgraph cluster_storage_2 {
label = "Persistent Storage";
style=filled;
fillcolor=dodgerblue2;
disk3 [shape=cylinder, label="Disk 2", color=red, style=filled, fillcolor=pink]
disk4 [shape=cylinder, label="Disk 1", color=blue, style=filled, fillcolor=lightblue]
}

StackOverflowError at uri_3a_classloader_3a_.gems.ttfunk_minus_1_dot_7_dot_0.lib.ttfunk.reader.RUBY$method$read_signed$0(uri:classloader:/gems/ttfunk-1.7.0/lib/ttfunk/reader.rb:16)

I received this StackOverflowError from my JVM backend while doing PDF conversions. The error was not specific to the inputs -- the system automatically retried and successfully generated the output for the same inputs.

I was not able to reproduce the problem either.

However, hopefully the exception will help with isolating the issue.

java.lang.StackOverflowError: null
    at uri_3a_classloader_3a_.gems.ttfunk_minus_1_dot_7_dot_0.lib.ttfunk.reader.RUBY$method$read_signed$0(uri:classloader:/gems/ttfunk-1.7.0/lib/ttfunk/reader.rb:16)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
    at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
    at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:177)
    at org.jruby.runtime.BlockBody.yield(BlockBody.java:116)
    at org.jruby.runtime.Block.yieldArray(Block.java:230)
    at org.jruby.RubyBasicObject.yieldUnder(RubyBasicObject.java:1759)
    at org.jruby.RubyBasicObject.instance_exec(RubyBasicObject.java:2677)
    at org.jruby.RubyBasicObject$INVOKER$i$0$3$instance_exec.call(RubyBasicObject$INVOKER$i$0$3$instance_exec.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
    at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
    at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:76)
    at org.jruby.runtime.Block.yieldSpecific(Block.java:157)
    at org.jruby.ir.targets.indy.YieldSite.yieldSpecific(YieldSite.java:161)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_4_dot_0.lib.prawn.font.RUBY$block$font$1(uri:classloader:/gems/prawn-2.4.0/lib/prawn/font.rb:60)
    at org.jruby.ir.targets.indy.YieldSite.yieldSpecific(YieldSite.java:157)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_4_dot_0.lib.prawn.font.RUBY$method$save_font$0(uri:classloader:/gems/prawn-2.4.0/lib/prawn/font.rb:214)
    at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:152)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:148)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:362)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:154)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:161)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_4_dot_0.lib.prawn.font.invokeOther16:save_font(uri:classloader:/gems/prawn-2.4.0/lib/prawn/font.rb:58)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_4_dot_0.lib.prawn.font.RUBY$method$font$0(uri:classloader:/gems/prawn-2.4.0/lib/prawn/font.rb:58)
    at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112)
    at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:1338)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_pdf_minus_2_dot_3_dot_4.lib.asciidoctor.pdf.ext.prawn.extensions.invokeSuper6:-dynamic-super_target-(uri:classloader:/gems/asciidoctor-pdf-2.3.4/lib/asciidoctor/pdf/ext/prawn/extensions.rb:329)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_pdf_minus_2_dot_3_dot_4.lib.asciidoctor.pdf.ext.prawn.extensions.RUBY$method$font$0(uri:classloader:/gems/asciidoctor-pdf-2.3.4/lib/asciidoctor/pdf/ext/prawn/extensions.rb:329)
    at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:139)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:112)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:383)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:185)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:192)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:337)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.RubyClass.finvokeWithRefinements(RubyClass.java:530)
    at org.jruby.RubyBasicObject.send(RubyBasicObject.java:1715)
    at org.jruby.RubyKernel.send(RubyKernel.java:2235)
    at org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrTwoOrNBlock.call(JavaMethod.java:444)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:142)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
    at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
    at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:177)
    at org.jruby.runtime.BlockBody.yield(BlockBody.java:116)
    at org.jruby.runtime.Block.yieldNonArray(Block.java:224)
    at org.jruby.RubyArray.collectArray(RubyArray.java:2633)
    at org.jruby.RubyArray.map(RubyArray.java:2667)
    at org.jruby.RubyArray$INVOKER$i$0$0$map.call(RubyArray$INVOKER$i$0$0$map.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
    at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1229)
    at org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:131)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.RubyClass.finvokeWithRefinements(RubyClass.java:530)
    at org.jruby.RubyBasicObject.send(RubyBasicObject.java:1715)
    at org.jruby.RubyKernel.send(RubyKernel.java:2235)
    at org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrTwoOrNBlock.call(JavaMethod.java:444)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
    at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
    at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:177)
    at org.jruby.runtime.BlockBody.yield(BlockBody.java:116)
    at org.jruby.runtime.Block.yieldNonArray(Block.java:224)
    at org.jruby.RubyArray.collectArray(RubyArray.java:2633)
    at org.jruby.RubyArray.map(RubyArray.java:2667)
    at org.jruby.RubyArray$INVOKER$i$0$0$map.call(RubyArray$INVOKER$i$0$0$map.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:560)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
    at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1229)
    at org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:131)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:372)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:175)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
    at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
    at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:76)
    at org.jruby.runtime.Block.yieldSpecific(Block.java:157)
    at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:498)
    at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:76)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:176)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:94)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:546)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
    at org.jruby.RubyClass.finvokeWithRefinements(RubyClass.java:530)
    at org.jruby.RubyBasicObject.send(RubyBasicObject.java:1715)
    at org.jruby.RubyKernel.send(RubyKernel.java:2235)
    at org.jruby.RubyKernel$INVOKER$s$send.call(RubyKernel$INVOKER$s$send.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrTwoOrNBlock.call(JavaMethod.java:444)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:226)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:351)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:144)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:345)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
    at org.jruby.RubyClass.finvoke(RubyClass.java:784)
    at org.jruby.runtime.Helpers.invoke(Helpers.java:661)
    at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:370)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:311)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:336)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:331)
    at my.package.MyPdfGenerator.generatePdf(MyPdfGenerator.kt:133)

Built-in Fonts Aren't Used

It appears that built-in fonts aren't used when specifying a custom theme. Not sure whether this is an issue with the Maven plugin or with asciidoctorj-pdf or somewhere else. From my reading of the theming guide (https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#fonts) it seems to me if I'm not overriding the built in font catalog & not specifying a pdffontdir, the bundled fonts ought to be used. However, this doesn't seem to work. For example the Maven plugin example (https://github.com/asciidoctor/asciidoctor-maven-examples/tree/master/asciidoctor-pdf-with-theme-example) has this problem though I didn't realize it initially until I modified the sample document and started getting "The following text could not be fully converted to the Windows-1252 character set" warnings.

syntax error, unexpected kDO_BLOCK Float.prepend (Module.new do

Since 1.5.0-alpha.15 seems to have problems when I use AsciiDoc within tables, I just tried to use a newer version.
With all versions > 1.5.0-alpha.16 I get the following exception:

Caused by: org.jruby.exceptions.RaiseException: (SyntaxError) /home/rdmueller/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.17/89b2c69805e40ead99b580c38a292aebea19c849/
asciidoctorj-pdf-1.5.0-alpha.17.jar!/gems/asciidoctor-pdf-1.5.0.alpha.17/lib/asciidoctor-pdf/core_ext/numeric.rb:2: syntax error, unexpected kDO_BLOCK
Float.prepend (Module.new do
^
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)

I know that this error is based at the asciidoctor-pdf (not the jruby wrapper) project, but I guess it could be related to the jRuby version used in the wrapper - that's why I report it here.

https://github.com/asciidoctor/asciidoctor-pdf/blob/master/lib/asciidoctor/pdf/ext/core/numeric.rb

used with

     org.asciidoctor:asciidoctor-gradle-plugin:1.5.8

Update rubygems-proxy to official URL

This issue is filed because you have code referencing a deprecated RubyGems-to-Maven proxy server: rubygems-proxy.torquebox.org. The JRuby team has decided to officially support this proxy at a new official address: mavengems.jruby.org.

Please update your links, as the torquebox.org hostname will eventually be shut down.

Thank you from the JRuby and Torquebox teams!

Found references:

https://github.com/asciidoctor/asciidoctorj-pdf/blob/48cfac83b3269ec725f04ae910ecdcd391def072/asciidoctor-pdf-gem-installer.pom

%breakable option on sections seems not to work as I expected it

Hi,
one big problem in asciidoctor-pdf was that section titles may be separated from the first block of the section.

I thought, that a feature regarding this problem was implemented in 2.0.x, but I did not work as expected.

The documentation tells me to put [%breakable] in the line before the title and I expected that the title and the following block got on the next page.

But as you see in the attached screenshot, the block is split over two pages.
grafik

Here is the relevant code block.

Hier wird bis zur jeweiligen Maximalzahl aufgefรผllt und bei Erreichen einer Maximalzahl wieder analog Schritt 6 die Suchmenge aufgerรคumt.

[%breakable]
==== Schritt 11: XXXXXXX

Sollte XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX 0 ist.

Auf XXXXXXX.

Am I doing something wrong or is this feature not implemented in asciidoctorj-pdf?

Thanks for your help!!!

Update to asciidoctor-pdf 1.5.0 beta

Hi, when will asciidoctorj-pdf be updated to use asciidoctor-pdf 1.5.0-beta.1? This time, I am pretty confident that I did not misspell it and I also did not find it on maven.org . :-)

PDF conversion fails on Windows with gradle when using version alpha.16

Hello,

I've encountered an issue when trying to convert asciidoctor files to PDF on Windows in gradle project. As you can see in the SlideshowFX AppVeyor results, the asciidoctor task is failing.

If I downgrade to version alpha.15 then the task completes successfully.

Running the command gradlew clean build --info --stacktrace using version alpha.16 produces the following stack:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':asciidoctor'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.GradleException: Error running Asciidoctor
        at org.asciidoctor.gradle.AsciidoctorTask.processDocumentsAndResources(AsciidoctorTask.groovy:663)
        at org.asciidoctor.gradle.AsciidoctorTask.processAsciidocSources(AsciidoctorTask.groovy:596)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        ... 27 more
Caused by: org.jruby.exceptions.RaiseException: (SystemCallError) Unknown error (SystemCallError) 123 - FindFirstFile
        at RUBY.symlink?(uri:classloader:/jruby/kernel/file.rb:141)
        at RUBY.<module:Prawn>(uri:classloader:/gems/prawn-2.2.2/lib/prawn.rb:11)
        at RUBY.<main>(uri:classloader:/gems/prawn-2.2.2/lib/prawn.rb:9)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:961)
        at RUBY.(root)(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:961)
        at RUBY.(root)(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:3)
        at RUBY.<main>(uri:classloader:/jruby/kernel/kernel.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:961)
        at RUBY.require_relative(uri:classloader:/jruby/kernel/kernel.rb:13)
        at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf.rb:3)

The problem can be reproduced by running the same command on the development branch of SlideshowFX.

Have you already encountered this issue ?

Many thanks.

AsciidoctorJ does not detect asciidoctorj-pdf correctly

Here is my gradle.build script:

group 'doc'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'org.jruby', name: 'jruby-complete', version: '9.1.16.0'
    compile group: 'org.asciidoctor', name: 'asciidoctorj', version: '1.5.6'
    compile group: 'org.asciidoctor', name: 'asciidoctorj-pdf', version: '1.5.0-alpha.16'
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

Whenever I run convertDirectory, and have the backend set to html, it works. However, when I set backend to pdf, I get this:

Jul 30, 2018 11:37:11 AM org.asciidoctor.internal.JRubyAsciidoctor renderFile
SEVERE: (NotImplementedError) asciidoctor: FAILED: missing converter for backend 'pdf'. Processing aborted.
Exception in thread "main" org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (NotImplementedError) asciidoctor: FAILED: missing converter for backend 'pdf'. Processing aborted.
	at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:347)
	at org.asciidoctor.internal.JRubyAsciidoctor.renderAllFiles(JRubyAsciidoctor.java:405)
	at org.asciidoctor.internal.JRubyAsciidoctor.renderDirectory(JRubyAsciidoctor.java:396)
	at org.asciidoctor.internal.JRubyAsciidoctor.convertDirectory(JRubyAsciidoctor.java:566)
	at Main.main(Main.java:72)
Caused by: org.jruby.exceptions.RaiseException: (NotImplementedError) asciidoctor: FAILED: missing converter for backend 'pdf'. Processing aborted.
	at RUBY.update_backend_attributes(uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:953)
	at RUBY.initialize(uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:414)
	at RUBY.load(uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1341)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1457)
	at RUBY.block in convert_file(uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
	at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1171)
	at RUBY.convert_file(uri:classloader:/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
	at RUBY.convertFile(<script>:75)

Anyone have any ideas on what this could be? It looks like asciidoctorJ isnt finding asciidoctorJ-pdf, but I dont know why.

asciidoctorj-pdf does not respect `preserveDirectories`

The asciidoctorj-option preserveDirectories is ignored by asciidoctorj-pdf.
I have a document with images that I want to convert to HTML and PDF with the following pom-snippet:

 <plugin>
    <groupId>org.asciidoctor</groupId>
    <artifactId>asciidoctor-maven-plugin</artifactId>
    <version>1.5.6</version>
    <dependencies>
      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj-pdf</artifactId>
        <version>1.5.0-alpha.16</version>
      </dependency>
    </dependencies>
    <configuration>
      <sourceDirectory>${basedir}/src/doc/</sourceDirectory>
      <backend>xhtml5</backend>
      <sourceHighlighter>prettify</sourceHighlighter>
      <preserveDirectories>true</preserveDirectories>
      <attributes>
        <sectnums>true</sectnums>
        <toc>left</toc>
        <toclevels>3</toclevels>
        <imagesdir>.</imagesdir>
        <icons>font</icons>
      </attributes>
    </configuration>
    <executions>
      <execution>
        <id>manual-html</id>
        <phase>generate-resources</phase>
        <goals>
          <goal>process-asciidoc</goal>
        </goals>
      </execution>
      <execution>
        <id>manual-pdf</id>
        <phase>generate-resources</phase>
        <goals>
          <goal>process-asciidoc</goal>
        </goals>
        <configuration>
          <backend>pdf</backend>
          <sourceHighlighter>coderay</sourceHighlighter>
        </configuration>
      </execution>
    </executions>
  </plugin>

The document has the following structure:

 src/doc/                                                                                                                                                          
โ””โ”€โ”€ my-manual
    โ”œโ”€โ”€ my-manual.adoc
    โ””โ”€โ”€ screenshots
        โ”œโ”€โ”€ screenshot1.png
        โ”œโ”€โ”€ screenshot2.png
        โ”œโ”€โ”€ screenshot3.png

When generating the PDF asciidoctorj-pdf tries to load the images from src/doc/screenshots even though I specified the preserveDirectories option that correctly behaves when generating the HTML output.

Update to Asciidoctor-pdf 1.15.0.alpha.17

Hi there.
First off, thank you for your work with this wrapper for asciidoctor-pdf.
There was a new release of asciidoctor-pdf a few weeks ago to version 1.15.0.alpha.17. Will you create a new release for this and push it to maven central etc.?

Thanks!

Problems with custom inline macro extension

I'm currently working on a custom Java extension that is able to draw a frame around an existing image.
For that an inline macro is used to perform the following steps:

  • get the location of the original image
  • transform it
  • save it back to disk
  • finally include the transformed image (instead the original one) in the parsing process.

The code/idea for how to integrate "new" image blocks when using an inline macro is taken from here and here

Unfortunately the procedure seems to work somehow for the HTML backend (with some warnings) but not for the PDF backend.

I've provided a sample project that only does the inline macro processing and tries to include an image: https://gitlab.com/0xff-lroe/asciidoctor-pdf-issues.
The example project uses Maven and the mentioned Asciidoctor Java extension.

The extension provided here does nothing but trying to integrate an image.

When running the build (like here) you can see that when using the HTML backend the processing works but some warnings appear:

[INFO] asciidoctor: INFO: expected substitution value for custom inline macro to
be of type Inline; got String: passthrough:screenshots/redeemer-portal-01-login.png[width=80%,align="center"]

Running the build (like here) using the PDF backend then the processing fails. The message given back by asciidoctor-pdf is:

org.jruby.exceptions.NoMethodError: (NoMethodError) undefined method `include?' for nil:NilClass
Did you mean?  include_class
	at RUBY.encode_quotes(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/sanitizer.rb:41)
	at RUBY.convert_inline_image(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:2502)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:135)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/inline.rb:32)
	at org.asciidoctor.jruby.extension.processorproxies.InlineMacroProcessorProxy.process(org/asciidoctor/jruby/extension/processorproxies/InlineMacroProcessorProxy.java:123)
	at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:131)
	at RUBY.sub_macros(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/substitutors.rb:333)
	at org.jruby.RubyString.gsub(org/jruby/RubyString.java:3126)
	at RUBY.sub_macros(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/substitutors.rb:309)
	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1809)
	at RUBY.sub_macros(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/substitutors.rb:308)
	at uri_3a_classloader_3a_.gems.asciidoctor_minus_2_dot_0_dot_15.lib.asciidoctor.substitutors.apply_subs(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/substitutors.rb:102)
	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1809)
	at RUBY.apply_subs(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/substitutors.rb:91)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/block.rb:113)
	at RUBY.convert_paragraph(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:708)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:135)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:75)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:84)
	at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2577)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:84)
	at RUBY.traverse(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:152)
	at RUBY.convert_section(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:584)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:135)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:75)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:84)
	at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2577)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:84)
	at RUBY.traverse(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:152)
	at RUBY.convert_section(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:584)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:135)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:75)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:84)
	at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2577)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/abstract_block.rb:84)
	at RUBY.content(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/document.rb:1013)
	at RUBY.traverse(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:152)
	at RUBY.convert_document(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:261)
	at RUBY.indent_section(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:594)
	at RUBY.convert_document(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:208)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-pdf-1.6.0/lib/asciidoctor/pdf/converter.rb:135)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/document.rb:944)
	at RUBY.convert(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:117)
	at RUBY.convert_file(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:189)
	at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1158)
	at RUBY.convert_file(uri:classloader:/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:189)

Using asciidoctor-pdf 1.5.4 or 1.6.0 makes no difference.

Do you have any hints for me how to overcome this issue?
Or maybe what's the correct way of including images out of inline macros?

Thanks in advance.

License issue from one dependency

Asciidoctorj-pdf library embeds ttfunk gem inside the jar/gems which is the only dependency on GPL license which makes the library impossible to be used in commercial projects. Can this gem be removed from the library?

image

update to asciidoctor 1.5.6

Rigth now build.gradle is using by default 1.5.5 but version 1.5.6 was released few months ago

asciidoctorJVersion = project.hasProperty('asciidoctorJVersion') ? project.asciidoctorJVersion : '1.5.5'

Can't use reader/writer `convert` with asciidoctorj-pdf

In my application, I'm converting docs based on streams, and not necessarily files.

Attempt to use a convert function with reader/writer API:

Writer it = new StringWriter()
doctor.convert(reader, writer, Options.builder().backend("pdf").toStream(it).build())

gets me this:

Caused by: org.jruby.exceptions.TypeError: (TypeError) cannot convert instance of class org.jruby.gen.RubyObject50 to class java.lang.String

I guess, the binary output of PDF itn's really suitable for writing into a Writer anyway, which is fair. So I've tried this:

OutputStream it = new ByteArrayOutputStream()
doctor.convert(reader, null, Options.builder().backend("pdf").toStream(it).build())

This got me:

Caused by: java.lang.NullPointerException
at org.asciidoctor.jruby.internal.IOUtils.writeFull (IOUtils.java:28)
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert (JRubyAsciidoctor.java:353)
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert (JRubyAsciidoctor.java:358)
at org.asciidoctor.Asciidoctor$convert$1.call (Unknown Source)

Which may be an AsciiDoctor issue, with conflicting instructions of the output; this also tells me that even if I gave it a dummy writer, it would have failed with the same type error.

Finally, this is the only way this agreed to work:

OutputStream it = new ByteArrayOutputStream()
doctor.convertFile(file.toFile(), Options.builder().backend("pdf").toStream(it).build())

But that requires me to have a file, which I may have to create for just a purpose of running the converter.

I understand this may really be rooted in AsciiDoctorJ code, and not in this extension, but I was wondering if something can be done about it.

extension api for pdf backend

is it possible to use extentions (for example, PostProcessor) in my own program, that uses asciidoctorj-pdf? i tried to do this (EndToEndPostProcessor is my own class):

public class DoctorRun {

    public static void main(String[] args) {
        Asciidoctor asciidoctor = create();
        asciidoctor.javaExtensionRegistry().postprocessor(new EndToEndPostProcessor(options().backend("pdf").asMap()));
        asciidoctor.convertFile(new File("D:\\\\rc-req-mb-client\\src\\main.adoc"), options().backend("pdf").get());
    }

}

and received following output (in IntelliJ IDEA):

"C:\Program Files\Java\jdk1.8.0_91\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61162,suspend=y,server=n -Djruby.aot.loadClasses=true -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_91\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\rt.jar;D:\asciidoctorprocessor\target\classes;C:\Users\itimofeev\.m2\repository\org\asciidoctor\asciidoctorj\1.5.6\asciidoctorj-1.5.6.jar;C:\Users\itimofeev\.m2\repository\org\jruby\jruby-complete\1.7.26\jruby-complete-1.7.26.jar;C:\Users\itimofeev\.m2\repository\com\beust\jcommander\1.35\jcommander-1.35.jar;C:\Users\itimofeev\.m2\repository\org\asciidoctor\asciidoctorj-pdf\1.5.0-alpha.11\asciidoctorj-pdf-1.5.0-alpha.11.jar;C:\Users\itimofeev\.m2\repository\org\jsoup\jsoup\1.8.3\jsoup-1.8.3.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.3\lib\idea_rt.jar" cz.bsc.asciidoctorprocessor.DoctorRun
Connected to the target VM, address: '127.0.0.1:61162', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:61162', transport: 'socket'
ะฐะฒะณ 24, 2017 8:16:33 PM org.asciidoctor.internal.JRubyAsciidoctor renderFile
SEVERE: (NameError) no method 'process' for arguments (org.jruby.RubyObject,org.jruby.RubyObject) on Java::CzBscAsciidoctorprocessor::EndToEndPostProcessor
  available overloads:
    (org.asciidoctor.ast.Document,java.lang.String)
    (org.asciidoctor.ast.DocumentRuby,java.lang.String)
Exception in thread "main" org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (NameError) no method 'process' for arguments (org.jruby.RubyObject,org.jruby.RubyObject) on Java::CzBscAsciidoctorprocessor::EndToEndPostProcessor
  available overloads:
    (org.asciidoctor.ast.Document,java.lang.String)
    (org.asciidoctor.ast.DocumentRuby,java.lang.String)
	at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:347)
	at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:436)
	at org.asciidoctor.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:556)
	at cz.bsc.asciidoctorprocessor.DoctorRun.main(DoctorRun.java:18)
Caused by: org.jruby.exceptions.RaiseException: (NameError) no method 'process' for arguments (org.jruby.RubyObject,org.jruby.RubyObject) on Java::CzBscAsciidoctorprocessor::EndToEndPostProcessor
  available overloads:
    (org.asciidoctor.ast.Document,java.lang.String)
    (org.asciidoctor.ast.DocumentRuby,java.lang.String)
	at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:124)
	at RUBY.convert(C:/Users/itimofeev/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1066)
	at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
	at RUBY.convert(C:/Users/itimofeev/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1065)
	at RUBY.convert(C:/Users/itimofeev/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1502)
	at RUBY.convert_file(C:/Users/itimofeev/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
	at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1201)
	at RUBY.convert_file(C:/Users/itimofeev/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
	at RUBY.convertFile(<script>:75)
	at org.jruby.gen.InterfaceImpl1333197270.convertFile(org/jruby/gen/InterfaceImpl1333197270.gen:13)

Process finished with exit code 1

How to fix it? What is wrong?

Could not create PDF

Try to creat e PDF from Java.
If I use the convert Method I get null as result. The convertFile Methode trow an Exception

Exception in thread "main" org.asciidoctor.jruby.internal.AsciidoctorCoreException: org.jruby.exceptions.TypeError: (TypeError) cannot convert instance of class org.jruby.gen.RubyObject50 to class java.lang.String
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:318)
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:281)
at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convert(JRubyAsciidoctor.java:350)
at App.main(App.java:24)
Caused by: org.jruby.exceptions.TypeError: (TypeError) cannot convert instance of class org.jruby.gen.RubyObject50 to class java.lang.String

Here my simple Sourcecode:

public static void main(String[] args) throws IOException {
Asciidoctor asciidoctor= Asciidoctor.Factory.create();
File file=new File("C:/temp/test.adoc");

    FileReader reader = new FileReader(file);
   
    StringWriter writer= new StringWriter();
    Map<String, Object> options = options()
            .inPlace(true)
            .backend("pdf")
            .asMap();
    asciidoctor.convert(reader,writer,options);



    System.out.println(writer.getBuffer());

}

Perhaps someone know the solution

Thanks.

Jens

Problem with inline extensions

I currently experience problems with asciidoctorj-pdf:1.5.0-alpha.14 and inline extensions.
It seems that this problem is related to the asciidoctorj-pdf itself and not asciidoctorj since the html rendering works.

How to reproduce:
I've cloned the asciidoc-to-pdf-example to reproduce the problem.
I included a simple inline extension ( https://github.com/rdmueller/asciidoctor-gradle-examples/blob/master/asciidoc-to-pdf-example/build.gradle#L35 ) and switched the asciidoctorj-pdf version to 1.5.0-alpha.14

gradlew clean asciidoctor

then produces the following stacktrace:

* What went wrong:
Execution failed for task ':asciidoctor'.
> (NameError) cannot load Java class org.asciidoctor.groovydsl.extensions.DelegatingInlineMacroProcessor
* Try: Run with --info or --debug option to get more log output.
  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':asciidoctor'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:45)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
    Caused by: org.jruby.exceptions.RaiseException: (NameError) cannot load Java class org.asciidoctor.groovydsl.extensions.DelegatingInlineMacroProcessor
    at org.jruby.javasupport.JavaClass.for_name(org/jruby/javasupport/JavaClass.java:286)
    at org.jruby.javasupport.JavaUtilities.get_proxy_class(org/jruby/javasupport/JavaUtilities.java:34)
    at RUBY.block in java_import(uri:classloader:/jruby/java/core_ext/object.rb:49)
    at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2486)
    at RUBY.java_import(uri:classloader:/jruby/java/core_ext/object.rb:36)
    at RUBY.(<script>:1)
    Caused by: java.lang.ClassNotFoundException: org.asciidoctor.groovydsl.extensions.DelegatingInlineMacroProcessor
    at org.jruby.javasupport.JavaSupportImpl.loadJavaClass(JavaSupportImpl.java:154)
    at org.jruby.javasupport.JavaSupportImpl.loadJavaClassVerbose(JavaSupportImpl.java:163)
    at org.jruby.javasupport.JavaClass.forNameVerbose(JavaClass.java:271)
    at org.jruby.javasupport.JavaClass.for_name(JavaClass.java:286)
    at org.jruby.javasupport.Java.get_proxy_class(Java.java:386)
    at org.jruby.javasupport.JavaUtilities.get_proxy_class(JavaUtilities.java:34)
    at org.jruby.javasupport.JavaUtilities$INVOKER$s$1$0$get_proxy_class.call(JavaUtilities$INVOKER$s$1$0$get_proxy_class.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:314)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
    at org.jruby.runtime.InterpretedIRBlockBody.commonYieldPath(InterpretedIRBlockBody.java:141)
    at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:182)
    at org.jruby.runtime.BlockBody.yield(BlockBody.java:111)
    at org.jruby.runtime.Block.yield(Block.java:167)
    at org.jruby.RubyArray.collect(RubyArray.java:2472)
    at org.jruby.RubyArray.map19(RubyArray.java:2486)
    at org.jruby.RubyArray$INVOKER$i$0$0$map19.call(RubyArray$INVOKER$i$0$0$map19.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:497)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:428)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:355)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:83)
    at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:186)
    at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:173)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:314)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:112)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:99)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:35)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.evalScriptlet(Ruby.java:479)
    at org.jruby.Ruby.evalScriptlet(Ruby.java:455)
    at org.asciidoctor.extension.JavaExtensionRegistry.javaImport(JavaExtensionRegistry.java:218)
    at org.asciidoctor.extension.JavaExtensionRegistry.inlineMacro(JavaExtensionRegistry.java:190)
    at org.asciidoctor.extension.JavaExtensionRegistry$inlineMacro.call(Unknown Source)
    at org.asciidoctor.groovydsl.AsciidoctorExtensionHandler.inlinemacro(AsciidoctorExtensionHandler.groovy:80)
    at build_u3qb0xvpubw5cuevvhbp92hq$_run_closure1$_closure2.doCall(C:\Users\ralfd\projects\jax2017\asciidoctor-gradle-examples\asciidoc-to-pdf-example\build.gradle:36)
    at build_u3qb0xvpubw5cuevvhbp92hq$_run_closure1$_closure2.doCall(C:\Users\ralfd\projects\jax2017\asciidoctor-gradle-examples\asciidoc-to-pdf-example\build.gradle)
    at org.asciidoctor.groovydsl.AsciidoctorExtensions$_registerTo_closure1.doCall(AsciidoctorExtensions.groovy:53)
    at org.asciidoctor.groovydsl.AsciidoctorExtensions.registerTo(AsciidoctorExtensions.groovy:49)
    at org.asciidoctor.groovydsl.AsciidoctorExtensions$registerTo$0.call(Unknown Source)
    at org.asciidoctor.groovydsl.GroovyExtensionRegistry.register(GroovyExtensionRegistry.groovy:28)
    at org.asciidoctor.extension.internal.ExtensionRegistryExecutor.registerAllExtensions(ExtensionRegistryExecutor.java:21)
    at org.asciidoctor.internal.JRubyAsciidoctor.registerExtensions(JRubyAsciidoctor.java:96)
    at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:63)
    at org.asciidoctor.internal.JRubyAsciidoctor.create(JRubyAsciidoctor.java:54)
    at org.asciidoctor.Asciidoctor$Factory.create(Asciidoctor.java:668)
    at org.asciidoctor.Asciidoctor$Factory$create.call(Unknown Source)
    at org.asciidoctor.gradle.AsciidoctorTask.instantiateAsciidoctor(AsciidoctorTask.groovy:633)
    at org.asciidoctor.gradle.AsciidoctorTask.processAsciidocSources(AsciidoctorTask.groovy:577)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:45)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)

The stacktrace can be avoided by commenting out the inline extension (line 35) or going back to asciidoctorj-pdf:1.5.0-alpha.11

OutOfMemoryError: Java heap space when generating PDF

I am using Asciidoc to write a book and have not had any issues so far to generate a PDF using Maven with the following versions:

        <asciidoctor-maven-plugin.version>2.0.0</asciidoctor-maven-plugin.version>
        <asciidoctorj.version>2.4.0</asciidoctorj.version>
        <asciidoctorj-pdf.version>1.5.3</asciidoctorj-pdf.version>

However, I added an extra chapter and now the build fails with:

[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
    at org.jruby.RubyString.newString (RubyString.java:498)
    at org.jruby.RubyString.newString (RubyString.java:493)
    at org.jruby.ext.zlib.JZlibInflate.flushOutput (JZlibInflate.java:109)
    at org.jruby.ext.zlib.JZlibInflate.internalFinish (JZlibInflate.java:329)
    at org.jruby.ext.zlib.ZStream.finish (ZStream.java:136)
    at org.jruby.ext.zlib.JZlibInflate.s_inflate (JZlibInflate.java:74)
    at org.jruby.ext.zlib.JZlibInflate$INVOKER$s$1$0$s_inflate.call (JZlibInflate$INVOKER$s$1$0$s_inflate.gen)
    at org.jruby.runtime.callsite.CachingCallSite.call (CachingCallSite.java:172)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_2_dot_2.lib.prawn.images.png.invokeOther61:inflate (uri:classloader:/gems/prawn-2.2.2/lib/prawn/images/png.rb:92)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_2_dot_2.lib.prawn.images.png.RUBY$method$initialize$0 (uri:classloader:/gems/prawn-2.2.2/lib/prawn/images/png.rb:92)
    at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic (DirectMethodHandle$Holder)
    at java.lang.invoke.LambdaForm$MH/0x000000080076d440.invokeExact_MT (LambdaForm$MH)
    at org.jruby.internal.runtime.methods.CompiledIRMethod.call (CompiledIRMethod.java:108)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call (MixedModeIRMethod.java:140)
    at org.jruby.runtime.callsite.CachingCallSite.call (CachingCallSite.java:182)
    at org.jruby.RubyClass.newInstance (RubyClass.java:918)
    at org.jruby.RubyClass$INVOKER$i$newInstance.call (RubyClass$INVOKER$i$newInstance.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call (JavaMethod.java:349)
    at org.jruby.runtime.callsite.CachingCallSite.call (CachingCallSite.java:172)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_2_dot_2.lib.prawn.images.invokeOther13:new (uri:classloader:/gems/prawn-2.2.2/lib/prawn/images.rb:92)
    at uri_3a_classloader_3a_.gems.prawn_minus_2_dot_2_dot_2.lib.prawn.images.RUBY$method$build_image_object$0 (uri:classloader:/gems/prawn-2.2.2/lib/prawn/images.rb:92)
    at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic (DirectMethodHandle$Holder)
    at java.lang.invoke.LambdaForm$MH/0x000000080076d440.invokeExact_MT (LambdaForm$MH)
    at org.jruby.internal.runtime.methods.CompiledIRMethod.call (CompiledIRMethod.java:108)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call (MixedModeIRMethod.java:140)
    at org.jruby.internal.runtime.methods.DynamicMethod.call (DynamicMethod.java:200)
    at org.jruby.runtime.callsite.CachingCallSite.call (CachingCallSite.java:172)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_pdf_minus_1_dot_5_dot_3.lib.asciidoctor.pdf.converter.invokeOther11:build_image_object (uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor/pdf/converter.rb:1499)
    at uri_3a_classloader_3a_.gems.asciidoctor_minus_pdf_minus_1_dot_5_dot_3.lib.asciidoctor.pdf.converter.RUBY$block$convert_image$6 (uri:classloader:/gems/asciidoctor-pdf-1.5.3/lib/asciidoctor/pdf/converter.rb:1499)
    at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic (DirectMethodHandle$Holder)
    at java.lang.invoke.LambdaForm$MH/0x0000000800769840.invoke (LambdaForm$MH)
    at java.lang.invoke.Invokers$Holder.invokeExact_MT (Invokers$Holder)

I increased the available memory for Maven by creating a .mvn/jvm.config file at the project root to increase the Java heap:

-Xmx2048m

I also tried with -Xmx3048m, but none of that helped. Removal of the last chapter makes it work again. Removing the last chapter and including the 2nd to last chapter 2 times also makes it fail. Using only the last chapter and removing all other chapters also works.

Is there anything else I can try to make it work again?

Unable to Load asciidoctor-pdf

I upgrade to Gradle 7.1 and Java 16. This brought a bunch of issues, which I could correct except one. Everything worked fine with Gradle 6.8, Java 14 and asciidoctor.convert 1.5.4.

Originally, I had errors stating that I need to pass --add-opensjava.base/sun.nio.ch=ALL-UNNAMED... to the process. I figured that out (with that issue as help). Now it says:
org.jruby.exceptions.LoadError: (LoadError) no such file to load -- asciidoctor-pdf,
causing
Error running Asciidoctor whilst attempting to process /path/to/curriculum-template.adoc using backend pdf

(I don't know if that's an issue with this plugin or with jRuby, or asciidoctorj).

Here's my gradle file (I removed some stuff that's not required):

import org.asciidoctor.gradle.jvm.AsciidoctorTask

import java.text.SimpleDateFormat

buildscript {
    allprojects {
        repositories {
            mavenCentral()
            maven {
                url "https://plugins.gradle.org/m2/"
            }
        }
    }
    dependencies {
        classpath 'org.jruby:jruby-complete:9.2.19.0'
        classpath 'org.asciidoctor:asciidoctorj:2.5.1'
        classpath "org.asciidoctor:asciidoctorj-pdf:1.6.0"
    }
}

plugins {
    id "org.asciidoctor.jvm.convert" version "3.3.2"
}


class RenderCurriculumTask extends AsciidoctorTask {
    @Inject
    RenderCurriculumTask(WorkerExecutor worker, String curriculumFileName, String versionDate, String language, boolean withRemarks) {
        super(worker)

        forkOptions {
            jvmArgs "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED"
        }

        sourceDir = new File("./docs/")
        sources {
            include "index.adoc"
            include "${curriculumFileName}.adoc"
        }

        outputDir = new File("./build/")
        outputOptions {
            separateOutputDirs = false
            backends 'pdf', 'html5'
        }
        def fileVersion = project.version.trim() + "-" + language

        attributes = [
                // some attributes we set
        ]
    }
}

task buildDocs {
    group 'Documentation'
    description 'Grouping task for generating all languages in several formats'
    dependsOn "includeLearningObjectives", "renderNoRemarksDE", "renderNoRemarksEN"
}

task renderNoRemarksDE(type: RenderCurriculumTask,
        constructorArgs: [curriculumFileName, versionDate, "DE", false]) {
    doLast {
        addSuffixToCurriculum("-de")
    }
}

task renderNoRemarksEN(type: RenderCurriculumTask,
        constructorArgs: [curriculumFileName, versionDate, "EN", false]) {
    doLast {
        addSuffixToCurriculum("-en")
    }
}

apply from: 'scripts/includeLearningObjectives.gradle'

defaultTasks "buildDocs"

Any help would be appreciated.
Thanks!

How to use theme from classpath?

I would like to use a custom theme thats located in the root of the classpath. How to do that?
I always get: SCHWERWIEGEND: could not locate or load the built-in pdf theme our-theme.yml'; reverting to default theme`

This is what I tried:

Attributes attributes = new Attributes();
attributes.setAttribute("pdf-style", "our-theme.yaml")

Options options = new Options();
options.setBackend("pdf");
options.setAttributes(attributes);

asciidoctor.convertFile(file, options)

asciidoctorj-pdf does not render images with special chars in title

When using brackets within the title of an image, the image is not getting rendered with asciidocj-pdf.

[[img.some-reference]]
image::images/image.png[title="Schaltflรคche [Filter]"]

As soon as I remove the brackets it's rendering the image just fine. Also I can escape the last bracket, which also renders fine.

[[img.some-reference]]
image::images/image.png[title="Schaltflรคche [Filter\]"]

The image is also displayed fine without escaping when using the IntelliJ preview.

versions
asciidoctor-gradle-plugin=1.5.3
asciidoctorj=1.6.0-alpha.4
asciidoctorj_pdf=1.5.0-alpha.15
AsciiDoc (IntelliJ plugin)=0.19.1

Could not generate pdf due to gems load error

My project is using:

  • Spring boot 2.1.2
  • Gradle 4.9
  • org.asciidoctor:asciidoctor-gradle-plugin:1.5.9.2
  • org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16

When I am trying to generate pdf:
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in 'require': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. Exception in thread "main" org.asciidoctor.gradle.backported.AsciidoctorRemoteExecutionException: Error running Asciidoctor whilst attempting to process /xxx/src/docs/asciidoc/index.adoc using backend pdf at org.asciidoctor.gradle.backported.AsciidoctorJavaExec$_convertFiles_closure3.doCall(AsciidoctorJavaExec.groovy:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:430) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2078) at org.asciidoctor.gradle.backported.AsciidoctorJavaExec.convertFiles(AsciidoctorJavaExec.groovy:56) at org.asciidoctor.gradle.backported.AsciidoctorJavaExec.access$0(AsciidoctorJavaExec.groovy) at org.asciidoctor.gradle.backported.AsciidoctorJavaExec$_run_closure2.doCall(AsciidoctorJavaExec.groovy:50) at org.asciidoctor.gradle.backported.AsciidoctorJavaExec$_run_closure2.call(AsciidoctorJavaExec.groovy) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2040) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2025) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2066) at org.asciidoctor.gradle.backported.AsciidoctorJavaExec.run(AsciidoctorJavaExec.groovy:48) at org.asciidoctor.gradle.backported.AsciidoctorJavaExec.main(AsciidoctorJavaExec.groovy:195)

Caused by: org.jruby.exceptions.RaiseException: (LoadError) load error: psych -- java.lang.ExceptionInInitializerError: null at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55) at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/yaml.rb:6) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.(root)(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1) at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.(root)(uri:classloader:/gems/prawn-icon-1.3.0/lib/prawn/icon/font_data.rb:9) at RUBY.<main>(uri:classloader:/jruby/kernel/kernel.rb:1) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.require_relative(uri:classloader:/jruby/kernel/kernel.rb:13) at RUBY.<main>(uri:classloader:/gems/prawn-icon-1.3.0/lib/prawn/icon.rb:10) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.(root)(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1) at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.(root)(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:3) at RUBY.<main>(uri:classloader:/jruby/kernel/kernel.rb:1) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.require_relative(uri:classloader:/jruby/kernel/kernel.rb:13) at RUBY.<main>(uri:classloader:/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext.rb:5) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956) at RUBY.(root)(uri:classloader:/jruby/kernel/kernel.rb:1) at RUBY.<main>(uri:classloader:/jruby/kernel/kernel.rb:13)

However, on the same machine, I can run this demo: https://github.com/Swagger2Markup/spring-swagger2markup-demo which is using spring 1.4.

wepb image doesn't show in PDF.

Observed vs. expected behavior

A webp image works fine until I export to a pdf and it doesn't show up. jpg works as expected.

Steps to reproduce

Put in an image say...

.Image caption
image::LIGHTYEAR.webp["Lightyear movie 4 astronauts in a vehicle with cat and Lightyear driving", 400]

Hit the PDF button, a pdf is produced but the image doesn't show up. Even tried specifying the format... [format="webp","Lightyear.... but that didn't help.

Environment

macOS current versions of everything.

Plugin Version: 0.37.12

IntelliJ Details:IntelliJ IDEA 2021.3.3 (Ultimate Edition)
Build #IU-213.7172.25, built on March 15, 2022

Runtime version: 11.0.14.1+1-b1751.46 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Registry:
debugger.watches.in.variables=false

Non-Bundled Plugins:
ski.chrzanow.foldableprojectview (1.1.2)
org.toml.lang (213.5744.224)
net.seesharpsoft.intellij.plugins.csv (2.18.2)
in.xiv.cs (0.1)
com.perl5 (2021.3.1)
com.jetbrains.plugins.ini4idea (213.5744.190)
com.jetbrains.plugins.asp (213.5744.122)
com.intellij.ideolog (203.0.27.0)
org.jetbrains.kotlin (213-1.6.10-release-961-IJ6777.52)
org.jetbrains.erlang (0.11.1129)
com.intellij.apacheConfig (213.5744.190)
com.alayouni.ansiHighlight (1.2.4)
org.asciidoctor.intellij.asciidoc (0.37.12)
mobi.hsz.idea.gitignore (4.4.0)
com.microsoft.vso.idea (1.162.0)
com.perl5.lang.mason.framework (2021.3.1)
com.perl5.lang.mason.mason2 (2021.3.1)
com.cursiveclojure.cursive (1.12.1-2021.3)
com.github.brcosta.cljstuffplugin (0.6.1)
com.intellij.plugins.html.instantEditing (213.5744.122)
com.jetbrains.php (213.7172.28)
com.jetbrains.twig (213.5744.224)
com.jetbrains.php.wordPress (213.5744.125)
com.jetbrains.php.blade (213.6461.21)
de.espend.idea.laravel (0.15.4)
Pythonid (213.7172.26)
ru.adelf.idea.dotenv (2022.1)

Kotlin: 213-1.6.10-release-961-IJ6777.52

Release version 1.5.0?

The latest version in Maven Central is still 1.5.0-alpha.16. Is there going to be an official 1.5.0 ? Also are there versions planned that will be aligned with asciidoctorj 1.6.x and 2.x.x ?

GitHub releases not in sync with maven central versions

Situation

I was a little bit curious if there is already a new version available at Github which is newer than the latest version on maven central:
https://mvnrepository.com/artifact/org.asciidoctor/asciidoctorj-pdf

On maven central I found: asciidoctorj pdf - version 1.6.2

But ... looking at https://github.com/asciidoctor/asciidoctorj-pdf/releases
the newest release is 1.6.0 ?!?

Looking at the tags, I found the 1.6.2 - so okay... - but at the first glance I was a little bit surprised

Wanted

As GitHub is the source platform, all releases should be there as well.

Proposal

I would suggest an automated release to maven central via Github actions, which automatically creates corresponding GitHub releases and does tagging. I did this in one of my projects, see
https://github.com/de-jcup/eclipse-commons/blob/master/.github/workflows/release.yml
(but this one uses maven...)

For gradle there is also a description available:

undefined method `encode' for nil:NilClass

On a linux machine, trying to generate a PDF via Maven results in the following exception:

(NoMethodError) undefined method `encode' for nil:NilClass
        at RUBY.normalize_encoding(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/font/afm.rb:18)
        at RUBY.width_of(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font_metric_cache.rb:30)
        at RUBY.width_of_string(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:276)
        at RUBY.width_of(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:143)
        at RUBY.add_fragment_to_line(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/line_wrap.rb:104)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
        at RUBY.add_fragment_to_line(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/line_wrap.rb:93)
        at RUBY.apply_font_settings_and_add_fragment_to_line(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/line_wrap.rb:78)
        at RUBY.apply_font_size(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/arranger.rb:253)
        at RUBY.apply_font_settings(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/arranger.rb:175)
        at RUBY.character_spacing(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/pdf-core-0.7.0/lib/pdf/core/text.rb:214)
        at RUBY.apply_font_settings(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/arranger.rb:166)
        at RUBY.apply_font_settings_and_add_fragment_to_line(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/line_wrap.rb:77)
        at RUBY.wrap_line(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/line_wrap.rb:47)
        at RUBY.wrap(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/wrap.rb:53)
        at RUBY.wrap(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/formatted_text/inline_image_arranger.rb:28)
        at RUBY.render(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/box.rb:226)
        at RUBY.font_size(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:101)
        at RUBY.font_size(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:253)
        at RUBY.render(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/box.rb:219)
        at RUBY.text_rendering_mode(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-templates-0.1.1/lib/prawn/text.rb:19)
        at RUBY.render(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/box.rb:214)
        at RUBY.character_spacing(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/pdf-core-0.7.0/lib/pdf/core/text.rb:214)
        at RUBY.render(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/box.rb:213)
        at RUBY.save_font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:215)
        at RUBY.render(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text/formatted/box.rb:212)
        at RUBY.fill_formatted_text_box(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text.rb:380)
        at RUBY.formatted_text(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/text.rb:217)
        at RUBY.typeset_formatted_text(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:3048)
        at RUBY.convert_listing_or_literal(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:1396)
        at RUBY.pad_box(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:473)
        at RUBY.convert_listing_or_literal(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:1393)
        at RUBY.theme_font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:2931)
        at RUBY.font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:62)
        at RUBY.save_font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:215)
        at RUBY.font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:60)
        at RUBY.font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:196)
        at RUBY.theme_font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:2930)
        at RUBY.convert_listing_or_literal(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:1358)
        at org.jruby.RubyBasicObject.instance_exec(org/jruby/RubyBasicObject.java:1623)
        at RUBY.dry_run(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:805)
        at RUBY.font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:62)
        at RUBY.save_font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:215)
        at RUBY.font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/prawn-2.2.2/lib/prawn/font.rb:60)
        at RUBY.font(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:196)
        at RUBY.dry_run(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:804)
        at RUBY.keep_together(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/prawn_ext/extensions.rb:821)
        at RUBY.convert_listing_or_literal(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:1356)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:118)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2414)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79)
        at RUBY.convert_content_for_block(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:134)
        at RUBY.convert_section(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:426)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:118)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2414)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79)
        at RUBY.convert_content_for_block(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:134)
        at RUBY.convert_section(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:426)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:118)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2414)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79)
        at RUBY.content(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1120)
        at RUBY.convert_content_for_block(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:134)
        at RUBY.convert_document(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:207)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj-pdf/1.5.0-alpha.16/asciidoctorj-pdf-1.5.0-alpha.16.jar!/gems/asciidoctor-pdf-1.5.0.alpha.16/lib/asciidoctor-pdf/converter.rb:118)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1060)
        at RUBY.convert(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1502)
        at RUBY.convert_file(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
        at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1201)
        at RUBY.convert_file(/root/.m2/repository/org/asciidoctor/asciidoctorj/1.5.6/asciidoctorj-1.5.6.jar!/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575)
        at RUBY.convertFile(<script>:75)
        at org.jruby.gen.InterfaceImpl1463819294.convertFile(org/jruby/gen/InterfaceImpl1463819294.gen:13)

For reference, mvn dependency:resolve-plugins says:

[INFO] Plugin Resolved: asciidoctor-maven-plugin-1.5.6.jar
[INFO]     Plugin Dependency Resolved: jruby-complete-1.7.26.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-filtering-3.1.1.jar
[INFO]     Plugin Dependency Resolved: plexus-interpolation-1.22.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.23.jar
[INFO]     Plugin Dependency Resolved: asciidoctorj-1.5.6.jar
[INFO]     Plugin Dependency Resolved: netty-codec-http-4.0.38.Final.jar
[INFO]     Plugin Dependency Resolved: doxia-core-1.7.jar
[INFO]     Plugin Dependency Resolved: commons-io-2.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xhtml-1.7.jar

Before that exception, I get warnings like this:

The following text could not be fully converted to the Windows-1252 character set:
| โ—ฆ

Can this be the cause? Note that the theme does not define any custom fonts (yet).

On Windows, I get similar warnings, but no exception.

The adoc files are saved as UTF-8.

Importing fails due to missing method in project

When I try to import it, or just run some task in the shell the following error appears

* Where:
Script 'C:\home\bin\.babun\cygwin\home\asalgadr\temp\asciidoctorj-pdf\gradle\publish.gradle' line: 83

* What went wrong:
A problem occurred configuring project ':asciidoctorj-pdf'.
> Could not find method isDistribution() for arguments [] on project ':asciidoctorj-pdf' of type org.gradle.api.Project.

I think the project is missing the additional build logic in asciidoctorj-distibution or the build script here needs to be fixed. I really don't understand all details.

NegativeArraySizeException after upgrading from 1.6.0 to 2.1.6 with large document

After upgrading to asciidoctorj-pdf 2.1.6 (from 1.6.0) in a project using asciidoctor-gradle-plugin, building a large document results in java.lang.NegativeArraySizeException (when using my custom theme):

Exception in thread "main" org.asciidoctor.gradle.remote.AsciidoctorRemoteExecutionException: Error running Asciidoctor whilst attempting to process D:\Development\firebird-documentation\src\docs\asciidoc\en\refdocs\fblangref40\firebird-40-language-reference.adoc using backend pdf
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_convertFiles_closure4.doCall(AsciidoctorJavaExec.groovy:91)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
        at groovy.lang.Closure.call(Closure.java:412)
        at groovy.lang.Closure.call(Closure.java:428)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2358)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2343)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2396)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.convertFiles(AsciidoctorJavaExec.groovy:82)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.access$1(AsciidoctorJavaExec.groovy)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.doCall(AsciidoctorJavaExec.groovy:73)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.call(AsciidoctorJavaExec.groovy)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2358)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2343)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2384)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.run(AsciidoctorJavaExec.groovy:68)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.main(AsciidoctorJavaExec.groovy:49)
Caused by: java.lang.NegativeArraySizeException: -1569785929
        at org.jruby.util.ByteList.ensure(ByteList.java:345)
        at org.jruby.util.io.EncodingUtils.strBufCat(EncodingUtils.java:1712)
        at org.jruby.util.io.EncodingUtils.strBufCat(EncodingUtils.java:1697)
        at org.jruby.util.io.EncodingUtils.encCrStrBufCat(EncodingUtils.java:1820)
        at org.jruby.util.io.EncodingUtils.encCrStrBufCat(EncodingUtils.java:1747)
        at org.jruby.RubyString.cat19(RubyString.java:1372)
        at org.jruby.RubyString.cat19(RubyString.java:1362)
        at org.jruby.RubyHash$4.visit(RubyHash.java:864)
        at org.jruby.RubyHash$4.visit(RubyHash.java:851)
        at org.jruby.RubyHash.visitLimited(RubyHash.java:698)
        at org.jruby.RubyHash.visitAll(RubyHash.java:683)
        at org.jruby.RubyHash.inspectHash(RubyHash.java:846)
        at org.jruby.RubyHash.inspect(RubyHash.java:883)
        at org.jruby.RubyHash$INVOKER$i$0$0$inspect.call(RubyHash$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyHash$4.visit(RubyHash.java:855)
        at org.jruby.RubyHash$4.visit(RubyHash.java:851)
        at org.jruby.RubyHash.visitLimited(RubyHash.java:698)
        at org.jruby.RubyHash.visitAll(RubyHash.java:683)
        at org.jruby.RubyHash.inspectHash(RubyHash.java:846)
        at org.jruby.RubyHash.inspect(RubyHash.java:883)
        at org.jruby.RubyHash$INVOKER$i$0$0$inspect.call(RubyHash$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyNameError$RubyNameErrorMessage.to_str(RubyNameError.java:121)
        at org.jruby.RubyNameError$RubyNameErrorMessage$INVOKER$i$0$0$to_str.call(RubyNameError$RubyNameErrorMessage$INVOKER$i$0$0$to_str.gen)
        at org.jruby.RubyClass.checkFuncallDefault(RubyClass.java:659)
        at org.jruby.RubyClass.finvokeChecked(RubyClass.java:603)
        at org.jruby.runtime.Helpers.invokeChecked(Helpers.java:501)
        at org.jruby.RubyBasicObject.checkCallMethod(RubyBasicObject.java:346)
        at org.jruby.util.TypeConverter.convertToType(TypeConverter.java:86)
        at org.jruby.util.TypeConverter.convertToType(TypeConverter.java:117)
        at org.jruby.RubyBasicObject.convertToString(RubyBasicObject.java:794)
        at org.jruby.RubyNameError.to_s(RubyNameError.java:236)
        at org.jruby.RubyNameError$INVOKER$i$0$0$to_s.call(RubyNameError$INVOKER$i$0$0$to_s.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:831)
        at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:1206)
        at org.jruby.ir.instructions.UnresolvedSuperInstr.interpret(UnresolvedSuperInstr.java:104)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.RubyClass.finvoke(RubyClass.java:572)
        at org.jruby.runtime.Helpers.invoke(Helpers.java:452)
        at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:354)
        at org.jruby.RubyException.message(RubyException.java:285)
        at org.jruby.exceptions.RaiseException.getMessage(RaiseException.java:93)
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:398)
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:366)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_convertFiles_closure4.doCall(AsciidoctorJavaExec.groovy:87)
        ... 22 more

When disabling my custom theme, the error changes (probably because this results in a smaller PDF, at least if I run on 1.6.0) to a "java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 2636169695 out of bounds for byte[1976861743]" in what - at least at a casual glance - is the same place:

Exception in thread "main" org.asciidoctor.gradle.remote.AsciidoctorRemoteExecutionException: Error running Asciidoctor whilst attempting to process D:\Development\firebird-documentation\src\docs\asciidoc\en\refdocs\fblangref40\firebird-40-language-reference.adoc using backend pdf
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_convertFiles_closure4.doCall(AsciidoctorJavaExec.groovy:91)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
        at groovy.lang.Closure.call(Closure.java:412)
        at groovy.lang.Closure.call(Closure.java:428)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2358)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2343)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2396)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.convertFiles(AsciidoctorJavaExec.groovy:82)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.access$1(AsciidoctorJavaExec.groovy)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.doCall(AsciidoctorJavaExec.groovy:73)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_run_closure3.call(AsciidoctorJavaExec.groovy)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2358)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2343)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2384)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.run(AsciidoctorJavaExec.groovy:68)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec.main(AsciidoctorJavaExec.groovy:49)
Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last destination index 2636169695 out of bounds for byte[1976861743]
        at org.jruby.util.ByteList.append(ByteList.java:547)
        at org.jruby.util.io.EncodingUtils.strBufCat(EncodingUtils.java:1713)
        at org.jruby.util.io.EncodingUtils.strBufCat(EncodingUtils.java:1697)
        at org.jruby.util.io.EncodingUtils.encCrStrBufCat(EncodingUtils.java:1820)
        at org.jruby.util.io.EncodingUtils.encCrStrBufCat(EncodingUtils.java:1747)
        at org.jruby.RubyString.cat19(RubyString.java:1372)
        at org.jruby.RubyString.cat19(RubyString.java:1362)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1678)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyArray.inspectAry(RubyArray.java:1668)
        at org.jruby.RubyArray.inspect(RubyArray.java:1698)
        at org.jruby.RubyArray$INVOKER$i$0$0$inspect.call(RubyArray$INVOKER$i$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.inspectObj(RubyBasicObject.java:1234)
        at org.jruby.RubyBasicObject.hashyInspect(RubyBasicObject.java:1178)
        at org.jruby.RubyBasicObject.inspect(RubyBasicObject.java:1150)
        at org.jruby.RubyKernel.inspect(RubyKernel.java:2088)
        at org.jruby.RubyKernel$INVOKER$s$0$0$inspect.call(RubyKernel$INVOKER$s$0$0$inspect.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:354)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:143)
        at org.jruby.RubyBasicObject.rbInspect(RubyBasicObject.java:1187)
        at org.jruby.RubyObject.inspect(RubyObject.java:442)
        at org.jruby.RubyNameError$RubyNameErrorMessage.to_str(RubyNameError.java:121)
        at org.jruby.RubyNameError$RubyNameErrorMessage$INVOKER$i$0$0$to_str.call(RubyNameError$RubyNameErrorMessage$INVOKER$i$0$0$to_str.gen)
        at org.jruby.RubyClass.checkFuncallDefault(RubyClass.java:659)
        at org.jruby.RubyClass.finvokeChecked(RubyClass.java:603)
        at org.jruby.runtime.Helpers.invokeChecked(Helpers.java:501)
        at org.jruby.RubyBasicObject.checkCallMethod(RubyBasicObject.java:346)
        at org.jruby.util.TypeConverter.convertToType(TypeConverter.java:86)
        at org.jruby.util.TypeConverter.convertToType(TypeConverter.java:117)
        at org.jruby.RubyBasicObject.convertToString(RubyBasicObject.java:794)
        at org.jruby.RubyNameError.to_s(RubyNameError.java:236)
        at org.jruby.RubyNameError$INVOKER$i$0$0$to_s.call(RubyNameError$INVOKER$i$0$0$to_s.gen)
        at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:831)
        at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:1206)
        at org.jruby.ir.instructions.UnresolvedSuperInstr.interpret(UnresolvedSuperInstr.java:104)
        at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)
        at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
        at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:121)
        at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:108)
        at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
        at org.jruby.RubyClass.finvoke(RubyClass.java:572)
        at org.jruby.runtime.Helpers.invoke(Helpers.java:452)
        at org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:354)
        at org.jruby.RubyException.message(RubyException.java:285)
        at org.jruby.exceptions.RaiseException.getMessage(RaiseException.java:93)
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:398)
        at org.asciidoctor.jruby.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:366)
        at org.asciidoctor.gradle.remote.AsciidoctorJavaExec$_convertFiles_closure4.doCall(AsciidoctorJavaExec.groovy:87)
        ... 22 more

Steps to reproduce:

  • checkout https://github.com/FirebirdSQL/firebird-documentation.git
  • edit build.gradle, line 73 (in asciidocPdf task) from version '1.6.0' to version '2.1.6'
  • run ./gradlew asciidocPdf --baseName refdocs --docId fblangref40 (I'm using Java 17.0.4 on Windows 11 64-bit, but I don't think it matters)
  • for comparison, a smaller file works fine (./gradlew asciidocPdf --docId gfix)

Although the error is different, this seems to similar to the problem reported in #36.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.