Native PDF Publishing: How to get the variable value of a custom metadata added in Native Publishing PDF templates .plt files? | Community
Skip to main content
Level 2
September 23, 2022
Question

Native PDF Publishing: How to get the variable value of a custom metadata added in Native Publishing PDF templates .plt files?

  • September 23, 2022
  • 1 reply
  • 1091 views

As explained here https://experienceleague.adobe.com/docs/experience-manager-guides-learn/tutorials/configuring/config-native-pdf-publish/design-page-layout.html?lang=en#add-fields-metadata it is mentioned we can also add metadata information as variables or fields in your page layout. This metadata is stored in your source DITA map content, and it can be easily inserted in your page layout.

 

Please provide a code syntax on how to get the values of these custom metadata variables in the templates .plt files?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Employee
September 23, 2022

To add metadata information as variables or fields in your page layout: you can use the metadata elements that are added inside the bookmeta of your DITA map content.

 

Example: If I want to insert the metadata product name from the below DITA map.

 

I would create a custom metadata field for product name using xpath expression.

Xpath expression for fetching product name is //prodinfo[1]/prodname

 

 

 

And insert the custom metadata field in the page layout like below

 

 

 

Output:

 

 

shashi_cAuthor
Level 2
September 23, 2022

@aswinilakshminarayanan 

Thank you for the explanation. A few questions around this

 

1. We are not using bookmap where we can define bookmeta tags.  Can we using keydef tags keyword and map attribute 'product' value as well in the plain map (not bookmap)? If yes what is the expression to access them?

 

<map product="Sample Product">

<keydef  keys="Product_Name">
<topicmeta >
  <keywords>

    <keyword>Product Keyword 1234</keyword>
  </keywords>
</topicmeta>
</keydef>

</map>

 

2. Is it possible to inject jcr:content or /jcr:content/metadata node properties of the ditamap asset into native PDF publishing?

 

 

Adobe Employee
September 26, 2022

1. Yes, metadata rendering works on the elements inside topicmeta for plainmaps. 
//keywords[1]/keyword

2. Possibility of injecting JCR Assets metadata is something we are working on, and will be available by year end.