-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use asciidoctorj api add style,like font size #1025
Comments
To create attributes, use the |
To learn how to add fonts for your PDF theme, please refer to this document: https://github.com/asciidoctor/asciidoctor-pdf/blob/v1.5.x/docs/theming-guide.adoc#fonts |
I see the docs update from main branch and we made some changes not yet released. Use these: Asciidoctor asciidoctor = Asciidoctor.Factory.create();
Attributes attributes = AttributesBuilder.attributes()
.attribute("pdf-theme", "path_to_theme")
.attribute("pdf-fontsdir", "path_to_fonts")
.tableOfContents(Placement.LEFT)
.icons("font")
.get();
Options options = OptionsBuilder.options()
.backend("pdf")
.attributes(attributes)
.get();
asciidoctor.convertFile(file("sample.adoc"), options); Not sure what is your use case, but you may be interested in having a look at the maven example to build PDF with CN fonts https://github.com/asciidoctor/asciidoctor-maven-examples/tree/main/asciidoctor-pdf-cjk-example. If you want to build docs in some automated way, maybe that's also al option and you don't need to deal with Asciidoctorj internals. |
Sorry to be late with the new one. When I use include, it generates a link, not a reference to its text. |
Hello!Thank you for reading!
I successfully converted ADOC to PDF with asciidoctorj api , but I'm very upset how to add some style?
jdk1.8,asciidoctor v2.0.14 asciidoctorj v2.4.2
Please help me!
Thank again for your reading and support.
The text was updated successfully, but these errors were encountered: