[jira] [Commented] (OFBIZ-10677) Standalone Asciidoc plugins documents can't render logo correctly in PDF

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-10677) Standalone Asciidoc plugins documents can't render logo correctly in PDF

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701761#comment-16701761 ]

Jacques Le Roux commented on OFBIZ-10677:
-----------------------------------------

I referred to this document http://gist.asciidoctor.org/?github-asciidoctor%2Fasciidoctor-pdf%2F%2Fdocs%2Ftheming-guide.adoc

So as noted above I tried the relative path, which works in terminal:
{code}
C:\projectsASF\ofbiz\plugins\birt\src\docs\asciidoc>dir "../../../../../docs/asciidoc/images/"
 Répertoire de C:\projectsASF\ofbiz\docs\asciidoc\images
29/03/2018  09:39           228 428 ofbiz-architecture.png
19/03/2018  09:17            15 110 OFBiz-Logo-250w.png
01/04/2018  20:03            13 981 OFBiz-Logo.svg
{code}

Then an easy way is to manually copy the {{OFBiz-Logo.svg}} file and use
{code}
:title-logo-image: image::OFBiz-Logo.svg[Apache OFBiz Logo, pdfwidth=4.25in, align=center]
{code}

We could improve that by making Buildbot temporary copy the file from {{../../../../../docs/asciidoc/images/} to the images directory.

If you see a better way please explain, thanks.

There are interesting related discussions. Here is one https://github.com/asciidoctor/asciidoctor-pdf/issues/95 see notaly comments from  Nov 27, 2018

> Standalone Asciidoc plugins documents can't render logo correctly in PDF
> ------------------------------------------------------------------------
>
>                 Key: OFBIZ-10677
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10677
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL PLUGINS
>    Affects Versions: Trunk, Release Branch 17.12
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>
> Asciidoc plugins documents should be standalone as described in [Documentation guidelines|https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk/docs/asciidoc/documentation_guidelines.adoc].
> When rendering in PDF we should use the {{docs/asciidoc/images/OFBiz-Logo.svg}} file to avoid duplication. For a reason, maybe related to [https://github.com/asciidoctor/asciidoctor-epub3/issues/22], it seems there is a conflict between declaring
> {code}
> :imagesdir: ./images
> {code}
> and
> {code}
> ifdef::backend-pdf[]
> :title-logo-image: ../../../../../docs/asciidoc/images/OFBiz-Logo.svg[Apache OFBiz Logo, pdfwidth=4.25in, align=center]
> :source-highlighter: rouge
> endif::[]
> {code}
> in the same file.
> You then get
> {code}
> [] | ../../../../../docs/asciidoc/images/OFBiz-Logo.svg[Apache OFBiz Logo, pdfwidth=4.25in, align=center]
> {code}
> instead of the logo in the 1st page of the PDF document.
> So it seems it's not an OFBiz bug but rather a Asciidoctor issue. Not sure yet, so I create this Jira more as a reminder.
> For now I'll not put logos in plugins standalone files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)