pdf:insert-toc-headers

pdf:insert-toc-headers(
   $doc as node()?,
   $toc as element()?
) as node()?

Summary

Locate TOC anchors and make them properly refer to headers at the appropriate level. Returned the transformed document.

Parameters
doc The cleaned XHTML produced by PDF conversion.
toc The normalized TOC.

Example

  xquery version "1.0-ml";
  import module namespace pdf = "http://marklogic.com/cpf/pdf" 
		  at "/MarkLogic/conversion/pdf.xqy";

  xdmp:document-insert( "myfile.xhtml", 
         pdf:insert-toc-headers( doc("myfile.xhtml"), 
                                 pdf:get-toc("myfile.xhtml") )
  )
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy