Relative path to image from Cover Page for PDF

Sangeeta
Posts: 14
Joined: Fri Nov 24, 2017 10:07 am

Relative path to image from Cover Page for PDF

Post by Sangeeta » Tue May 01, 2018 10:29 am

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

Radu
Posts: 6179
Joined: Fri Jul 09, 2004 5:18 pm

Re: Relative path to image from Cover Page for PDF

Post by Radu » Wed May 02, 2018 8:59 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Sangeeta
Posts: 14
Joined: Fri Nov 24, 2017 10:07 am

Re: Relative path to image from Cover Page for PDF

Post by Sangeeta » Wed May 02, 2018 8:07 pm

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

Radu
Posts: 6179
Joined: Fri Jul 09, 2004 5:18 pm

Re: Relative path to image from Cover Page for PDF

Post by Radu » Thu May 03, 2018 1:48 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Sangeeta
Posts: 14
Joined: Fri Nov 24, 2017 10:07 am

Re: Relative path to image from Cover Page for PDF

Post by Sangeeta » Fri May 04, 2018 11:50 am

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

Radu
Posts: 6179
Joined: Fri Jul 09, 2004 5:18 pm

Re: Relative path to image from Cover Page for PDF

Post by Radu » Mon May 07, 2018 12:12 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply