Closed mrotteveel closed 1 year ago
I can build the document successfully after also upgrading asciidoctorj itself:
def asciidocPdf = tasks.register('asciidocPdf', FbAsciidocPdfTask) {
group 'Documentation'
description 'Generate PDF documentation from asciidoc'
baseDirFollowsSourceFile()
attributes 'revnumber': null, 'source-highlighter': 'rouge', 'media': 'screen', 'toc': 'macro', 'compress': '',
'icon-set': 'fas', 'pdf-fontsdir': "${file('src/theme/fonts')},GEM_FONTS_DIR"
theme 'firebird'
asciidoctorj {
version = '2.5.5'
modules {
pdf {
version '2.1.6'
}
}
}
}
Thanks, that indeed does the trick. I hadn't thought of checking that.
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):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:
Steps to reproduce:
version '1.6.0'
toversion '2.1.6'
./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)./gradlew asciidocPdf --docId gfix
)Although the error is different, this seems to similar to the problem reported in #36.