Page 1 of 1

Relative path to image from Cover Page for PDF

Posted: Tue May 01, 2018 10:29 am
by Sangeeta
Hi,

In our PDFs for every product we have different product logo on the cover page. How can I give relative path to these images so that whenever I generate
PDF out the correct logo is picked? I can save the product logo in a graphics folder which is inside the source folder which contains my DITAmap.

Can you help with a solution, with detailed steps please? I am using oXygen Editor 19.1.

Best regards,
Sangeeta

Re: Relative path to image from Cover Page for PDF

Posted: Wed May 02, 2018 8:59 am
by Radu
Hi,

For completion I'm linking to the answer you received on the same post you made on the DITA Users List:

https://groups.yahoo.com/neo/groups/dit ... ages/43525

Regards,
Radu

Re: Relative path to image from Cover Page for PDF

Posted: Wed May 02, 2018 8:07 pm
by Sangeeta
Hi Radu,

The png file is in graphics folder, which is parallel to the DITAMAP.
graphics/product.logo.png

The graphic is not displayed in the PDF output. I made the following changes to my files. Can you please let me if I am missing something?

In the diatmap, I add the following:

Code: Select all

    
<bookmeta>
<data name="cover-image" href="graphics/product_logo.png" format="png"/>
</bookmeta>

Code: Select all

 
<frontmatter>
<topicref href="graphics/product_logo.png" format="png" processing-role="resource-only"
toc="no"/>
</frontmatter>
Added the following in front-matterxsl:

Code: Select all


<fo:block xsl:use-attribute-sets="__frontmatter__title">
<fo:block-container xsl:use-attribute-sets="__frontmatter__logo__container">
<fo:block xsl:use-attribute-sets="__frontmatter__logo_product">
<xsl:value-of select="//*[contains(@class,' frontmatter/topicref ')]"/>
<fo:external-graphic src="url({(//data[@name='cover-image'])[1]/@href})"/>
</fo:block>
</fo:block-container>
Added the following in front-matter-attr.xsl

Code: Select all


	<xsl:attribute-set name="__frontmatter__logo__container">
</xsl:attribute-set>

<xsl:attribute-set name="__frontmatter__logo_product">
</xsl:attribute-set>
Best regards,
Sangeeta

Re: Relative path to image from Cover Page for PDF

Posted: Thu May 03, 2018 1:48 pm
by Radu
Hi Sangeeta,

I answered you on the DITA Users list. I would prefer you not post duplicate questions in multiple places, so if you ask on the DITA Users List you can try to avoid posting the same question on the Oxygen forum, I am registered on the DITA Users List and if time allows I can try to help there with advice.

Regards,
Radu

Re: Relative path to image from Cover Page for PDF

Posted: Fri May 04, 2018 11:50 am
by Sangeeta
Hi Radu,

We are evaluating oXygen for our team of 50 writers. I am in the process of ironing out some details, so sometimes require fast answers. That is why I post in multiple locations, whichever gives me faster answers :) . Thank you so much for answering and helping me with resolution to my queries.

On this I had one question on language support. I see that Korean, Chinese traditional, Brazilian, and so on, these languages are not listed in the xml:lang field. So can we add these languages to open and publish PDFs and Help centers in these languages?

If yes, can you please help me with the procedure to do that?

Best regards,
Sangeeta

Re: Relative path to image from Cover Page for PDF

Posted: Mon May 07, 2018 12:12 pm
by Radu
Hi Sangeeta,

I recently created a blog post on the Oxygen XML Blog about DITA and translations. Looking at your reply, I realized I forgot to add information about how to add a new language to the DITA Open Toolkit. So I just added a section to it called Publishing your Translated Content:

http://blog.oxygenxml.com/2018/05/trans ... oject.html

Even if Oxygen does not propose those possible xml:lang values, it does not mean that the DITA OT does not have support for them.
For example the list with all languages supported for PDF is here:

http://www.dita-ot.org/2.0/readme/DITA- ... n-pdf.html

and it includes Simplified Chinese.

Regards,
Radu