by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 03 11:35
    gern0 closed #3727
  • Aug 03 10:42
    gern0 edited #3727
  • Aug 03 10:41
    gern0 opened #3727
  • Aug 02 09:10
    mojavelinux labeled #3726
  • Aug 02 08:54
    mojavelinux closed #1805
  • Aug 01 22:26
    tobimensch edited #3726
  • Aug 01 22:25
    tobimensch edited #3726
  • Aug 01 22:25
    tobimensch edited #3726
  • Aug 01 22:25
    tobimensch edited #3726
  • Aug 01 22:24
    tobimensch opened #3726
  • Jul 31 16:15
    wimdeblauwe opened #3725
  • Jul 27 23:45
    mojavelinux transferred #3722
  • Jul 27 17:31
    paulmcquad closed #3724
  • Jul 27 17:24
    paulmcquad edited #3724
  • Jul 27 17:23
    paulmcquad edited #3724
  • Jul 27 17:23
    paulmcquad opened #3724
  • Jul 27 09:09
    ludwigmair opened #3723
  • Jul 24 23:57
    mojavelinux milestoned #3721
  • Jul 24 22:15
    mojavelinux assigned #3722
  • Jul 24 22:15
    mojavelinux milestoned #3722
mcp292
@mcp292
Yea it's unfortunate. @mojavelinux makes a great point with PDFs being intended for printing, thus the white background and minimal coloring. The html looks so professional though. I especially like the header with my name, email, and date. I anticipate this would be a struggle for me to reproduce in the pdf theme
Abel Salgado Romero
@abelsromero
If you want some quick-win there's https://wkhtmltopdf.org/, but never used it myself
I run a test on a simple file and except for the footer is not bad
mcp292
@mcp292
Oh that's a good idea! Go html to pdf! This is a promising route. I will report back
I was thinking to simply print to file from the browser, but that adds ugly metadata to the document
mcp292
@mcp292
I tried wkhtmltopdf and htmldoc. wkhtml preserved the styling well, but in code blocks puts the language top right very blurry. It breaks pages but doesn't number them. htmldoc does not preserve styling, but numbers pages well. My best bet might be to tweak the pdf theme, but I'm not sure how I would duplicate the document header
Abel Salgado Romero
@abelsromero
I understand then, you mean using asciidoctor-pdf with a theme? https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc
djencks
@djencks
You could consider asciidoctor-web-pdf as a very advanced print-from-browser.
mcp292
@mcp292
@abelsromero yes I was gonna extend the default and change fonts and colors, but am at a lose for how to duplicate the document header with the name, email, and date underneath
@djencks right I didn't look further into this because it seems it replaces the asciidoctor-pdf command. I will check it out again though
@djencks let me know if I'm missing something, but the Document theme is pretty close to the default asciidoctor-pdf. What would I be gaining with asciidoctor-web-pdf?
Abel Salgado Romero
@abelsromero
asciidoctor-web-pdf offers much more options in terms of layout ans is based on web technologies. If you are doing some brochure like document, could help, the repo has visual examples https://github.com/Mogztter/asciidoctor-web-pdf. asciidoctor-pdf is custom (yaml configuration) is oriented for printed docs
mcp292
@mcp292
Thank you. Still that would require custom config to achieve my end goal, right?
Abel Salgado Romero
@abelsromero
according to the readme there's a default layout
Abel Salgado Romero
@abelsromero
I installed it and it generates a similar style out of the box, however, no author title :%
Abel Salgado Romero
@abelsromero
source-highlighter does not seem to work, maybe that's a bocker for you?
mcp292
@mcp292
Yes I don't think that's my solution. After digesting the fact that PDFs are intended for print, I pared down my needs to the following: change headers to sans serif, add the author title. Headers in serif is easily achieved by extending the default theme. The author title I don't know where to begin. Is there any way to include this in the pdf? If I can check these boxes I'm satisfied.
Abel Salgado Romero
@abelsromero
can't help much there, sorry 🤷 I know you can add authors to the title page but not sure if can be done for the first page
mcp292
@mcp292
Yea I saw that too. Well thank you for taking the time to help!
Abel Salgado Romero
@abelsromero
No problem
mcp292
@mcp292

If a front cover image is specified, the title page comes after the front cover. -source

I haven't been able to find documentation on setting a front cover image

Abel Salgado Romero
@abelsromero
title-page-logo
mcp292
@mcp292
Ah! Thank you! It seems this is intended for books. Is there a way to get a company logo on the title page of a pdf?
mcp292
@mcp292
It seems my source blocks get pushed to the next page. Is there anything I can specify in asciidoc to have them start as is and be cut on the page break?
Dan Allen
@mojavelinux

I was gonna extend the default and change fonts and colors, but am at a lose for how to duplicate the document header with the name, email, and date underneath

The PDF converter adds a title page with all this information

you either set the doctype to book or set the title-page attribute in the header
I wasn't implying that PDF is intended for print. it's just as applicable to screen. what I was saying is that the default theme is optimized for print since people will want to print it. so the colors need to have good contrast by default
(we accomplish this with print styles in the HTML)
Dan Allen
@mojavelinux

Is there a way to get a company logo on the title page of a pdf

Yes, title-page-logo in theme https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#key-prefix-title-page-logo or title-logo-image in AsciiDoc header

Is there anything I can specify in asciidoc to have them start as is and be cut on the page break?

not until Asciidoctor PDF 2

mcp292
@mcp292
Really appreciate you clearing this up. If I understand correctly there are no other built in themes to choose from at this point, is that right?
mcp292
@mcp292
On another note, I am a C developer. What tools and languages would I become familiar with in order to contribute?
Dan Allen
@mojavelinux
there are two built-in themes. There is a default theme and there is a base theme. The base theme is the bare metal theme. The default them provides sensible styles.
If someone wants to contribute additional built-in themes, I'm happy to review and consider them.

What tools and languages would I become familiar with in order to contribute?

https://github.com/asciidoctor/asciidoctor-pdf/blob/master/CONTRIBUTING-CODE.adoc

you should know that I don't treat developers as language specific. I treat all developers as developers. Because the skill of development is with programming logic, not with knowing syntax. though I do recognize that you do need to become familiar with a toolchain in order to put that skill to use.
but that's why we are here, to help each other out over those hurdles.
mcp292
@mcp292
Awesome! Is there a way to specify an absolute path for the image? It seems :imagesdir:, :title-logo-image:, and image:: all take relative paths. Further, :title-logo-image: puts the logo on it's own page. This makes sense for a book, but is there a way to put the image on the title page, so there's only one cover page?
Good to hear!
I was mistaken on the :title-logo-image:! It does show on the title page with a valid path.
Dan Allen
@mojavelinux
yep, the title logo image shows on the title page, above the document title
yes, the path can be absolute
it's either absolute or relatvie to imagesdir
the path should still be encased in an image macro, as in image:relative-path.png[] or image:/absolute/path.png[]
that ensures it gets resolved like an image normally does and lets you specify dimensions
mcp292
@mcp292
Okay! That's why :imagesdir: wasn't working. I needed to encase the relative path.
Dan Allen
@mojavelinux
without the image macro, the path is resolved relative to the theme (if defined in the theme) or document (if defined in the document). for consistency, the image macro is always recommended.
mcp292
@mcp292
Excellent! Thank you to all who took the time to help me today! I got my document sorted out and am happy to be part of this community.
Dan Allen
@mojavelinux
hooray :tada: I love to hear that!