Loading TOC...

MarkLogic Server 11.0 Product Documentation
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") )
  )
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.