xdmp:
cts:
math:
sec:
thsr:
spell:
trgr:
cpf:
lnk:
dom:
p:
cvt:
msword:
excel:
ppt:
pdf:
dbk:
css:
xhtml:
fn:
The PDF module is part of the conversion processing pipeline. These functions are used to manipulate XHTML derived by converting PDF documents, as part of conversion processing.
To use the PDF module as part of your own XQuery module, include the following line in your XQuery prolog:
import module namespace pdf = "http://marklogic.com/cpf/pdf" at "/MarkLogic/conversion/pdf.xqy"
You will need to ensure that the PDF module is loaded into the same modules database as the importing module.
The library namespace prefix pdf is not predefined in the server.
pdf
import module namespace pdf = "http://marklogic.com/cpf/pdf" at "/MarkLogic/conversion/pdf.xqy" pdf:clean(fn:doc("my_pdf.xhtml"), pdf:get-toc("my_pdf.xhtml"))
import module namespace pdf = "http://marklogic.com/cpf/pdf" at "/MarkLogic/conversion/pdf.xqy" pdf:get-toc("my_pdf.xhtml")
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") ) )
import module namespace pdf = "http://marklogic.com/cpf/pdf" at "/MarkLogic/conversion/pdf.xqy" let $results := xdmp:pdf-convert( xdmp:get("/myfiles/myfile.pdf"), "myfile.pdf" ) let $manifest := $results[1] let $toc := for $doc at $index in $results[2 to last()] let $name := string($manifest/*[$index]) where fn:matches( $name, "toc.xml" ) return $doc return pdf:make-toc( $toc )