Search code examples
xsltditaoxygenxmldita-ot

Can i have the PDF revision history or revision number or value in the DITA PDF output?


I need to provide a way for the customers to know the PDF revision numbers or date. I need to have the revision value or timestamp or anything similar at the footnote of the PDF. I tried adding tags in the bookmeta, but they are not picked during the build. Can someone help?


Solution

  • If you would use for publishing DITA to PDF Oxygen's specific "DITA Map PDF - based on HTML5 & CSS" transformation scenario which uses CSS for customizing the PDF output, you can use CSS pagination techniques: https://www.oxygenxml.com/doc/versions/24.1/ug-editor/topics/dcpp_headers_and_footers.html#ariaid-title7

    If the DITA Map looks like this:

     <map>
       <title>Growing Flowers</title>
       <topicmeta>
         <critdates>
           <revised modified="2022-06-03"/>
         </critdates>
    

    define for example a stringset with a certain name and use the stringset in the header for example:

     *[class ~= "topic/revised"] {
       string-set: hdrstr attr(modified);
      }
      @page {  
       @top-left-corner {
         content: string(hdrstr);
       }
      }