Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
9 posts
|
Hi,
I'd like to publish a book with https://www.createspace.com/ and their default page size is 6" x 9". Long story short: I don't know how to create such a PDF with asciidoctor-pdf. I guess :pdf-page-size: is the key but I don't know what to set there. While at it I'd like to use a smaller font. What do I have to set for both? Stefan |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
126 posts
|
I would like to know how this works too. I've experimented a bit. As you figured out you can change the page size
= My Test Document :pdf-page-size: A5 Then when you render it > asciidoctor-pdf MyTestDocument.adoc it produces a .pdf with page size 5.83 x 8.27 in Does anyone know how to set it in inches? I tried 6x9 and 6"x9" and both end up being ignored and the .pdf comes out as 8.27 x 11.69 in You can change the font by creating a style in a .yml file You can start with this https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/base-theme.yml (Notice the page_size: A4. You could set it here instead of inside your .adoc file) Save base-theme.yml in a directory MyThemes. After you've made your font changes, render it like this > asciidoctor-pdf -a pdf-stylesdir=MyThemes -a pdf-style=base MyTestDocument.adoc The -a pdf-style=base will look for a "base-theme-yml" file in your "MyThemes" directory For more information about PDF Themes: https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc
- Ted
@TedAtCIS
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
The PDF page size can be specified using one of the following: * A named size, as defined by the PDF specification (see https://github.com/prawnpdf/pdf-core/blob/master/lib/pdf/core/page_geometry.rb#L16-L68) * A measurement array, in the form [w, h] or w x h (see https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#measurement-units) In your case, you can see the page size as follows: :pdf-page-size: 6in x 9in The documentation definition needs to clarify that the page size can be controlled using the pdf-page-size attribute. (We could also consider supporting double quote as a valid measurement unit, so that 6" x 9" would work. If you'd like to see that, please file an issue). Cheers, -Dan On Mon, Feb 8, 2016 at 9:54 AM, Ted [via Asciidoctor :: Discussion] <[hidden email]> wrote: I would like to know how this works too. I've experimented a bit. As you figured out you can change the page size ... [show rest of quote] Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |