1
0
Fork 0

[fix] tests

This commit is contained in:
Andy Bunce 2025-06-04 11:59:13 +01:00
parent e6832289b6
commit 0ae74baba3
12 changed files with 133 additions and 132 deletions

View file

@ -6,6 +6,6 @@
/ Annotations / Annotations
</h2><span class="ml-2"><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></span><h3> </h2><span class="ml-2"><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></span><h3>
Contents Contents
</h3><ol class="toc"><li><a href="#summary"><span class="secno">1 </span><span class="content">Summary</span></a></li><li><a href="#annotations"><span class="secno">2 </span><span class="content">Annotations</span></a><ol><li><a href="#http://www.w3.org/2012/xquery"><span class="secno">2.1 </span><span class="content">http://www.w3.org/2012/xquery</span></a></li></ol></li></ol></nav><section id="summary"><h2>Summary</h2><p>This project uses 1 annotation namespaces.</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a></td><td>Summary of REST interface</td><td>xhtml</td></tr><tr><td><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a></td><td>Summary of import usage</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="annotations"><h2>Annotations</h2><section id="http://www.w3.org/2012/xquery"><h3>2.1 http://www.w3.org/2012/xquery</h3><span style="margin-left:1em"><a href="#{http://www.w3.org/2012/xquery}private">private</a></span><div class="div4"><h4><a id="{http://www.w3.org/2012/xquery}private"></a>{http://www.w3.org/2012/xquery}private<div style="float:right"><span class="badge badge-info">7</span></div></h4><table class="data"><thead><tr><th>Attached to</th><th>Values</th></tr></thead><tbody><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}$property-map" title="Pdfbox3.xqm">pdfbox:$property-map</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}read-stream#2" title="Pdfbox3.xqm">pdfbox:read-stream#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}outline_#2" title="Pdfbox3.xqm">pdfbox:outline_#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}bookmark-xml#1" title="Pdfbox3.xqm">pdfbox:bookmark-xml#1</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}bookmark#2" title="Pdfbox3.xqm">pdfbox:bookmark#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}gregToISO#1" title="Pdfbox3.xqm">pdfbox:gregToISO#1</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}do-until#3" title="Pdfbox3.xqm">pdfbox:do-until#3</a></span></td><td>()</td></tr></tbody></table></div></section></section></div></div><div class="footer"><p style="text-align:right">Generated by </h3><ol class="toc"><li><a href="#summary"><span class="secno">1 </span><span class="content">Summary</span></a></li><li><a href="#annotations"><span class="secno">2 </span><span class="content">Annotations</span></a><ol><li><a href="#http://www.w3.org/2012/xquery"><span class="secno">2.1 </span><span class="content">http://www.w3.org/2012/xquery</span></a></li></ol></li></ol></nav><section id="summary"><h2>Summary</h2><p>This project uses 1 annotation namespaces.</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a></td><td>Summary of REST interface</td><td>xhtml</td></tr><tr><td><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a></td><td>Summary of import usage</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="annotations"><h2>Annotations</h2><section id="http://www.w3.org/2012/xquery"><h3>2.1 http://www.w3.org/2012/xquery</h3><span style="margin-left:1em"><a href="#{http://www.w3.org/2012/xquery}private">private</a></span><div class="div4"><h4><a id="{http://www.w3.org/2012/xquery}private"></a>{http://www.w3.org/2012/xquery}private<div style="float:right"><span class="badge badge-info">8</span></div></h4><table class="data"><thead><tr><th>Attached to</th><th>Values</th></tr></thead><tbody><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}$property-map" title="Pdfbox3.xqm">pdfbox:$property-map</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}read-stream#2" title="Pdfbox3.xqm">pdfbox:read-stream#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}outline#2" title="Pdfbox3.xqm">pdfbox:outline#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}outline_#2" title="Pdfbox3.xqm">pdfbox:outline_#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}bookmark-xml#1" title="Pdfbox3.xqm">pdfbox:bookmark-xml#1</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}bookmark#2" title="Pdfbox3.xqm">pdfbox:bookmark#2</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}gregToISO#1" title="Pdfbox3.xqm">pdfbox:gregToISO#1</a></span></td><td>()</td></tr><tr><td><span><a href="modules/F000001/index.html#{org.expkg_zone58.Pdfbox3}do-until#3" title="Pdfbox3.xqm">pdfbox:do-until#3</a></span></td><td>()</td></tr></tbody></table></div></section></section></div></div><div class="footer"><p style="text-align:right">Generated by
<a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a> <a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a>
  on <span title="2025-06-03T22:34:04.782+01:00">Tuesday, 3rd June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>   on <span title="2025-06-04T10:09:22.636+01:00">Wednesday, 4th June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>

View file

@ -6,4 +6,4 @@
Contents Contents
</h3><ol class="toc"><li><a href="#summary"><span class="secno">1 </span><span class="content">Summary</span></a></li><li><a href="#imports"><span class="secno">2 </span><span class="content">Imports</span></a><ol></ol></li></ol></nav><section id="summary"><h2>Summary</h2><p>Lists all modules imported.</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a></td><td>Summary of REST interface</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="annotations.html" title="Summary of XQuery annotation use " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">annotations</a></td><td>Summary of XQuery annotation use</td><td>xhtml</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="imports"><h2>Imports (0)</h2></section></div></div><div class="footer"><p style="text-align:right">Generated by </h3><ol class="toc"><li><a href="#summary"><span class="secno">1 </span><span class="content">Summary</span></a></li><li><a href="#imports"><span class="secno">2 </span><span class="content">Imports</span></a><ol></ol></li></ol></nav><section id="summary"><h2>Summary</h2><p>Lists all modules imported.</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a></td><td>Summary of REST interface</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="annotations.html" title="Summary of XQuery annotation use " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">annotations</a></td><td>Summary of XQuery annotation use</td><td>xhtml</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="imports"><h2>Imports (0)</h2></section></div></div><div class="footer"><p style="text-align:right">Generated by
<a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a> <a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a>
  on <span title="2025-06-03T22:34:04.782+01:00">Tuesday, 3rd June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>   on <span title="2025-06-04T10:09:22.636+01:00">Wednesday, 4th June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>

View file

@ -6,9 +6,9 @@
1 XQuery source files, and uses 1 XQuery source files, and uses
1 annotation namespaces. 1 annotation namespaces.
</p><p>This document was built from source folder <kbd>C:/Users/mrwhe/git/expkg-zone58/pdfbox/src/</kbd> on </p><p>This document was built from source folder <kbd>C:/Users/mrwhe/git/expkg-zone58/pdfbox/src/</kbd> on
<span title="2025-06-03T22:34:04.782+01:00">Tuesday, 3rd June 2025</span>.</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a></td><td>Summary of REST interface</td><td>xhtml</td></tr><tr><td><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a></td><td>Summary of import usage</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="annotations.html" title="Summary of XQuery annotation use " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">annotations</a></td><td>Summary of XQuery annotation use</td><td>xhtml</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="main_mods"><h2> XQuery Main (0)</h2><div><p>None</p></div></section><section id="library_mods"><h2> XQuery Library (1)</h2><div><table class="data"><colgroup><col style="width: 35%;"/><col style="width: 10%;"/><col style="width: 25%;"/><col style="width: 10%;"/><col style="width: 10%;"/><col style="width: 10%;"/></colgroup><thead><tr><th>Uri</th><th>Prefix</th><th>Description</th><th>Use</th><th title="Annotations">A</th><th>Metrics</th></tr></thead><tbody><tr><td style="word-break:break-all;"><span><a href="modules/F000001/index.html" title="A BaseX 10.7+ interface to pdfbox3 https://pdfbox.apache.org/ , requires pdfbox jars on classpath, in lib/custom or xar refer to the same concept. Also label and (page)range are used interchangably ">org.expkg_zone58.Pdfbox3</a></span></td><td title="prefix">pdfbox</td><td title="A BaseX 10.7+ interface to pdfbox3 https://pdfbox.apache.org/ , requires pdfbox jars on classpath, in lib/custom or xar refer to the same concept. Also label and (page)range are used interchangably ">&#xD; <span title="2025-06-04T10:09:22.636+01:00">Wednesday, 4th June 2025</span>.</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="restxq.html" title="Summary of REST interface " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">restxq</a></td><td>Summary of REST interface</td><td>xhtml</td></tr><tr><td><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a></td><td>Summary of import usage</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="annotations.html" title="Summary of XQuery annotation use " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">annotations</a></td><td>Summary of XQuery annotation use</td><td>xhtml</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="main_mods"><h2> XQuery Main (0)</h2><div><p>None</p></div></section><section id="library_mods"><h2> XQuery Library (1)</h2><div><table class="data"><colgroup><col style="width: 35%;"/><col style="width: 10%;"/><col style="width: 25%;"/><col style="width: 10%;"/><col style="width: 10%;"/><col style="width: 10%;"/></colgroup><thead><tr><th>Uri</th><th>Prefix</th><th>Description</th><th>Use</th><th title="Annotations">A</th><th>Metrics</th></tr></thead><tbody><tr><td style="word-break:break-all;"><span><a href="modules/F000001/index.html" title="A BaseX 10.7+ interface to pdfbox3 https://pdfbox.apache.org/ , requires pdfbox jars on classpath, in lib/custom or xar refer to the same concept. Also label and (page)range are used interchangably ">org.expkg_zone58.Pdfbox3</a></span></td><td title="prefix">pdfbox</td><td title="A BaseX 10.7+ interface to pdfbox3 https://pdfbox.apache.org/ , requires pdfbox jars on classpath, in lib/custom or xar refer to the same concept. Also label and (page)range are used interchangably ">&#xD;
&#xD; &#xD;
A BaseX 10.7+ interface to pdfbox3 https://...</td><td><div><div title="imported by">0<span></span></div><div title="Library module" class="badge badge-info">Library</div><div title="imports" style="float:right">↖0</div></div></td><td title="http://www.w3.org/2012/xquery"><span class="badge badge-dark" title="Private">P</span></td><td style="text-align: right"><div>V#1</div><div>F#37</div></td></tr></tbody></table></div></section><section id="file"><h2>File view (1)</h2><ul class="tree"><li><a href="modules/F000001/index.html">Pdfbox3.xqm</a></li></ul></section><section id="annotation"><h2>Annotation namespaces (1)</h2><p> A total of 7 annotations are defined. A BaseX 10.7+ interface to pdfbox3 https://...</td><td><div><div title="imported by">0<span></span></div><div title="Library module" class="badge badge-info">Library</div><div title="imports" style="float:right">↖0</div></div></td><td title="http://www.w3.org/2012/xquery"><span class="badge badge-dark" title="Private">P</span></td><td style="text-align: right"><div>V#1</div><div>F#37</div></td></tr></tbody></table></div></section><section id="file"><h2>File view (1)</h2><ul class="tree"><li><a href="modules/F000001/index.html">Pdfbox3.xqm</a></li></ul></section><section id="annotation"><h2>Annotation namespaces (1)</h2><p> A total of 8 annotations are defined.
</p><section id="http://www.w3.org/2012/xquery"><h3>http://www.w3.org/2012/xquery</h3><div><span style="margin-right:1em;"><a href="annotations.html#{http://www.w3.org/2012/xquery}private">private</a><span class="badge badge-info">7</span></span></div></section></section></div><div class="footer"><p style="text-align:right">Generated by </p><section id="http://www.w3.org/2012/xquery"><h3>http://www.w3.org/2012/xquery</h3><div><span style="margin-right:1em;"><a href="annotations.html#{http://www.w3.org/2012/xquery}private">private</a><span class="badge badge-info">8</span></span></div></section></section></div><div class="footer"><p style="text-align:right">Generated by
<a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a> <a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a>
  on <span title="2025-06-03T22:34:04.782+01:00">Tuesday, 3rd June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>   on <span title="2025-06-04T10:09:22.636+01:00">Wednesday, 4th June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date>2025-06-03T22:34:04.782+01:00</xqdoc:date><xqdoc:version>1.1</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>pdfbox</xqdoc:name><xqdoc:comment><xqdoc:description>&#xD; <xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date>2025-06-04T10:09:22.636+01:00</xqdoc:date><xqdoc:version>1.1</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>pdfbox</xqdoc:name><xqdoc:comment><xqdoc:description>&#xD;
&#xD; &#xD;
A BaseX 10.7+ interface to pdfbox3 https://pdfbox.apache.org/ ,&#xD; A BaseX 10.7+ interface to pdfbox3 https://pdfbox.apache.org/ ,&#xD;
requires pdfbox jars on classpath, in lib/custom or xar&#xD; requires pdfbox jars on classpath, in lib/custom or xar&#xD;
@ -144,9 +144,9 @@ as xs:base64Binary{&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
&#xD; &#xD;
(:~ property access map&#xD; (:~ Defines a map from property names to evaluation method.&#xD;
keys are property names, &#xD; Keys are property names, &#xD;
values are sequences of functions to get property from $pdf object&#xD; values are sequences of functions to get property value starting from a $pdf object.&#xD;
:)&#xD; :)&#xD;
declare %private variable $pdfbox:property-map:=map{&#xD; declare %private variable $pdfbox:property-map:=map{&#xD;
"#pages": pdfbox:number-of-pages#1,&#xD; "#pages": pdfbox:number-of-pages#1,&#xD;
@ -185,13 +185,13 @@ declare %private variable $pdfbox:property-map:=map{&#xD;
"labels": pdfbox:labels-as-strings#1 &#xD; "labels": pdfbox:labels-as-strings#1 &#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ known property names sorted :)&#xD; (:~ Defined property names, sorted :)&#xD;
declare function pdfbox:property-names() &#xD; declare function pdfbox:property-names() &#xD;
as xs:string*{&#xD; as xs:string*{&#xD;
$pdfbox:property-map=&gt;map:keys()=&gt;sort()&#xD; $pdfbox:property-map=&gt;map:keys()=&gt;sort()&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ return value of $property for $pdf :)&#xD; (:~ Return the value of $property for $pdf :)&#xD;
declare function pdfbox:property($pdf as item(),$property as xs:string)&#xD; declare function pdfbox:property($pdf as item(),$property as xs:string)&#xD;
as item()*{&#xD; as item()*{&#xD;
let $fns:= $pdfbox:property-map($property)&#xD; let $fns:= $pdfbox:property-map($property)&#xD;
@ -209,7 +209,7 @@ as map(*){&#xD;
pdfbox:report($pdfpaths,pdfbox:property-names())&#xD; pdfbox:report($pdfpaths,pdfbox:property-names())&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ summary CSV style info for named properties for $pdfpaths &#xD; (:~ summary CSV style info for named $properties for PDFs in $pdfpaths &#xD;
@see https://docs.basex.org/main/CSV_Functions#xquery&#xD; @see https://docs.basex.org/main/CSV_Functions#xquery&#xD;
:)&#xD; :)&#xD;
declare function pdfbox:report($pdfpaths as item()*, $properties as xs:string*)&#xD; declare function pdfbox:report($pdfpaths as item()*, $properties as xs:string*)&#xD;
@ -237,14 +237,14 @@ as map(*){&#xD;
}&#xD; }&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ convenience function to save report() data to file :)&#xD; (:~ Convenience function to save report() data to file :)&#xD;
declare function pdfbox:report-save($data as map(*),$dest as xs:string)&#xD; declare function pdfbox:report-save($data as map(*),$dest as xs:string)&#xD;
as empty-sequence(){&#xD; as empty-sequence(){&#xD;
let $opts := map { "format":"xquery", "header":"yes", "separator" : "," }&#xD; let $opts := map { "format":"xquery", "header":"yes", "separator" : "," }&#xD;
return file:write-text($dest,csv:serialize($data,$opts))&#xD; return file:write-text($dest,csv:serialize($data,$opts))&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ number of outline items :)&#xD; (:~ The number of outline items defined in $pdf :)&#xD;
declare function pdfbox:number-of-bookmarks($pdf as item())&#xD; declare function pdfbox:number-of-bookmarks($pdf as item())&#xD;
as xs:integer{&#xD; as xs:integer{&#xD;
let $xml:=pdfbox:outline-xml($pdf)&#xD; let $xml:=pdfbox:outline-xml($pdf)&#xD;
@ -282,7 +282,7 @@ as map(*){&#xD;
return map{"n":$n, "data": $read || $data}&#xD; return map{"n":$n, "data": $read || $data}&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ outline for $pdf as map()* :)&#xD; (:~ Return outline for $pdf as map()* :)&#xD;
declare function pdfbox:outline($pdf as item())&#xD; declare function pdfbox:outline($pdf as item())&#xD;
as map(*)*{&#xD; as map(*)*{&#xD;
(# db:wrapjava some #) {&#xD; (# db:wrapjava some #) {&#xD;
@ -296,13 +296,13 @@ as map(*)*{&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ return bookmark info for children of $outlineItem as seq of maps :)&#xD; (:~ return bookmark info for children of $outlineItem as seq of maps :)&#xD;
declare function pdfbox:outline($pdf as item(),$outlineItem as item()?)&#xD; declare %private function pdfbox:outline($pdf as item(),$outlineItem as item()?)&#xD;
as map(*)*{&#xD; as map(*)*{&#xD;
let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem)&#xD; let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem)&#xD;
return map:get($find,"list")&#xD; return map:get($find,"list")&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ BaseX bug 10.7? error if inlined in outline :)&#xD; (:~ outline helper. BaseX bug 10.7? error if inlined in outline :)&#xD;
declare %private function pdfbox:outline_($pdf as item(),$outlineItem as item()?)&#xD; declare %private function pdfbox:outline_($pdf as item(),$outlineItem as item()?)&#xD;
as map(*){&#xD; as map(*){&#xD;
pdfbox:do-until(&#xD; pdfbox:do-until(&#xD;
@ -424,7 +424,7 @@ declare function pdfbox:page-labels($pdf)&#xD;
=&gt;PDDocumentCatalog:getPageLabels()&#xD; =&gt;PDDocumentCatalog:getPageLabels()&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ label for $page formated as string :)&#xD; (:~ label for $page formated as string, empty if none :)&#xD;
declare function pdfbox:label-as-string($pagelabels,$page as xs:integer)&#xD; declare function pdfbox:label-as-string($pagelabels,$page as xs:integer)&#xD;
as xs:string?{&#xD; as xs:string?{&#xD;
let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)&#xD; let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)&#xD;
@ -441,7 +441,7 @@ as xs:string?{&#xD;
))&#xD; ))&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ sequence of maps for each label in :)&#xD; (:~ sequence of maps for each label/page range defined in $pdf:)&#xD;
declare function pdfbox:labels-as-map($pdf as item())&#xD; declare function pdfbox:labels-as-map($pdf as item())&#xD;
as map(*)*{&#xD; as map(*)*{&#xD;
let $pagelabels:=PDDocument:getDocumentCatalog($pdf)&#xD; let $pagelabels:=PDDocument:getDocumentCatalog($pdf)&#xD;
@ -451,7 +451,7 @@ as map(*)*{&#xD;
!pdfbox:label-as-map($pagelabels,.)&#xD; !pdfbox:label-as-map($pagelabels,.)&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ express label/page-range for $page as map :)&#xD; (:~ label/page-range for $page as map :)&#xD;
declare function pdfbox:label-as-map($pagelabels,$page as xs:integer)&#xD; declare function pdfbox:label-as-map($pagelabels,$page as xs:integer)&#xD;
as map(*)&#xD; as map(*)&#xD;
{&#xD; {&#xD;
@ -480,7 +480,7 @@ as xs:string{&#xD;
};&#xD; };&#xD;
&#xD; &#xD;
(:~ Return size of $pageNo (zero based)&#xD; (:~ Return size of $pageNo (zero based)&#xD;
@result e.g. [0.0,0.0,168.0,239.52]&#xD; @return e.g. [0.0,0.0,168.0,239.52]&#xD;
:)&#xD; :)&#xD;
declare function pdfbox:page-media-box($pdf as item(), $pageNo as xs:integer)&#xD; declare function pdfbox:page-media-box($pdf as item(), $pageNo as xs:integer)&#xD;
as xs:string{&#xD; as xs:string{&#xD;
@ -523,9 +523,9 @@ declare %private function pdfbox:do-until(&#xD;
&#xD; &#xD;
};&#xD; };&#xD;
</xqdoc:body></xqdoc:module><xqdoc:namespaces><xqdoc:namespace prefix="pdfbox" uri="org.expkg_zone58.Pdfbox3"/><xqdoc:namespace prefix="Loader" uri="java:org.apache.pdfbox.Loader"/><xqdoc:namespace prefix="PDFTextStripper" uri="java:org.apache.pdfbox.text.PDFTextStripper"/><xqdoc:namespace prefix="PDDocument" uri="java:org.apache.pdfbox.pdmodel.PDDocument"/><xqdoc:namespace prefix="PDDocumentCatalog" uri="java:org.apache.pdfbox.pdmodel.PDDocumentCatalog"/><xqdoc:namespace prefix="PDPageLabels" uri="java:org.apache.pdfbox.pdmodel.common.PDPageLabels"/><xqdoc:namespace prefix="PDPageLabelRange" uri="java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange"/><xqdoc:namespace prefix="PageExtractor" uri="java:org.apache.pdfbox.multipdf.PageExtractor"/><xqdoc:namespace prefix="PDPage" uri="java:org.apache.pdfbox.pdmodel.PDPage"/><xqdoc:namespace prefix="PDPageTree" uri="java:org.apache.pdfbox.pdmodel.PDPageTree"/><xqdoc:namespace prefix="PDDocumentOutline" uri="java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDDocumentOutline"/><xqdoc:namespace prefix="PDDocumentInformation" uri="java:org.apache.pdfbox.pdmodel.PDDocumentInformation"/><xqdoc:namespace prefix="PDOutlineItem" uri="java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem"/><xqdoc:namespace prefix="PDFRenderer" uri="java:org.apache.pdfbox.rendering.PDFRenderer"/><xqdoc:namespace prefix="PDMetadata" uri="java:org.apache.pdfbox.pdmodel.common.PDMetadata"/><xqdoc:namespace prefix="COSInputStream" uri="java:org.apache.pdfbox.cos.COSInputStream"/><xqdoc:namespace prefix="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/><xqdoc:namespace prefix="RandomAccessReadBuffer" uri="java:org.apache.pdfbox.io.RandomAccessReadBuffer"/><xqdoc:namespace prefix="RandomAccessReadBufferedFile" uri="java:org.apache.pdfbox.io.RandomAccessReadBufferedFile"/><xqdoc:namespace prefix="PDRectangle" uri="org.apache.pdfbox.pdmodel.common.PDRectangle"/><xqdoc:namespace prefix="File" uri="java:java.io.File"/><xqdoc:namespace prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/><xqdoc:namespace prefix="fn" uri="http://www.w3.org/2005/xpath-functions"/><xqdoc:namespace prefix="err" uri="http://www.w3.org/2005/xqt-errors"/><xqdoc:namespace prefix="fetch" uri="http://basex.org/modules/fetch"/><xqdoc:namespace prefix="convert" uri="http://basex.org/modules/convert"/><xqdoc:namespace prefix="db" uri="http://basex.org/modules/db"/><xqdoc:namespace prefix="map" uri="http://www.w3.org/2005/xpath-functions/map"/><xqdoc:namespace prefix="array" uri="http://www.w3.org/2005/xpath-functions/array"/><xqdoc:namespace prefix="file" uri="http://expath.org/ns/file"/><xqdoc:namespace prefix="csv" uri="http://basex.org/modules/csv"/></xqdoc:namespaces><xqdoc:variables><xqdoc:variable><xqdoc:name>pdfbox:property-map</xqdoc:name><xqdoc:comment><xqdoc:description>&#xD; </xqdoc:body></xqdoc:module><xqdoc:namespaces><xqdoc:namespace prefix="pdfbox" uri="org.expkg_zone58.Pdfbox3"/><xqdoc:namespace prefix="Loader" uri="java:org.apache.pdfbox.Loader"/><xqdoc:namespace prefix="PDFTextStripper" uri="java:org.apache.pdfbox.text.PDFTextStripper"/><xqdoc:namespace prefix="PDDocument" uri="java:org.apache.pdfbox.pdmodel.PDDocument"/><xqdoc:namespace prefix="PDDocumentCatalog" uri="java:org.apache.pdfbox.pdmodel.PDDocumentCatalog"/><xqdoc:namespace prefix="PDPageLabels" uri="java:org.apache.pdfbox.pdmodel.common.PDPageLabels"/><xqdoc:namespace prefix="PDPageLabelRange" uri="java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange"/><xqdoc:namespace prefix="PageExtractor" uri="java:org.apache.pdfbox.multipdf.PageExtractor"/><xqdoc:namespace prefix="PDPage" uri="java:org.apache.pdfbox.pdmodel.PDPage"/><xqdoc:namespace prefix="PDPageTree" uri="java:org.apache.pdfbox.pdmodel.PDPageTree"/><xqdoc:namespace prefix="PDDocumentOutline" uri="java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDDocumentOutline"/><xqdoc:namespace prefix="PDDocumentInformation" uri="java:org.apache.pdfbox.pdmodel.PDDocumentInformation"/><xqdoc:namespace prefix="PDOutlineItem" uri="java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem"/><xqdoc:namespace prefix="PDFRenderer" uri="java:org.apache.pdfbox.rendering.PDFRenderer"/><xqdoc:namespace prefix="PDMetadata" uri="java:org.apache.pdfbox.pdmodel.common.PDMetadata"/><xqdoc:namespace prefix="COSInputStream" uri="java:org.apache.pdfbox.cos.COSInputStream"/><xqdoc:namespace prefix="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/><xqdoc:namespace prefix="RandomAccessReadBuffer" uri="java:org.apache.pdfbox.io.RandomAccessReadBuffer"/><xqdoc:namespace prefix="RandomAccessReadBufferedFile" uri="java:org.apache.pdfbox.io.RandomAccessReadBufferedFile"/><xqdoc:namespace prefix="PDRectangle" uri="org.apache.pdfbox.pdmodel.common.PDRectangle"/><xqdoc:namespace prefix="File" uri="java:java.io.File"/><xqdoc:namespace prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/><xqdoc:namespace prefix="fn" uri="http://www.w3.org/2005/xpath-functions"/><xqdoc:namespace prefix="err" uri="http://www.w3.org/2005/xqt-errors"/><xqdoc:namespace prefix="fetch" uri="http://basex.org/modules/fetch"/><xqdoc:namespace prefix="convert" uri="http://basex.org/modules/convert"/><xqdoc:namespace prefix="db" uri="http://basex.org/modules/db"/><xqdoc:namespace prefix="map" uri="http://www.w3.org/2005/xpath-functions/map"/><xqdoc:namespace prefix="array" uri="http://www.w3.org/2005/xpath-functions/array"/><xqdoc:namespace prefix="file" uri="http://expath.org/ns/file"/><xqdoc:namespace prefix="csv" uri="http://basex.org/modules/csv"/></xqdoc:namespaces><xqdoc:variables><xqdoc:variable><xqdoc:name>pdfbox:property-map</xqdoc:name><xqdoc:comment><xqdoc:description>&#xD;
property access map&#xD; Defines a map from property names to evaluation method.&#xD;
keys are property names,&#xD; Keys are property names,&#xD;
values are sequences of functions to get property from $pdf object&#xD; values are sequences of functions to get property value starting from a $pdf object.&#xD;
</xqdoc:description></xqdoc:comment><xqdoc:annotations><xqdoc:annotation name="private"/></xqdoc:annotations><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-pages</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-bookmarks</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-labels</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>specification</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getTitle</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getAuthor</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getCreator</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getProducer</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getSubject</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getKeywords</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getCreationDate</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>gregToISO</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getModificationDate</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>gregToISO</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>labels-as-strings</xqdoc:name></xqdoc:invoked><xqdoc:body>variable $pdfbox:property-map:=map{&#xD; </xqdoc:description></xqdoc:comment><xqdoc:annotations><xqdoc:annotation name="private"/></xqdoc:annotations><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-pages</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-bookmarks</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-labels</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>specification</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getTitle</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getAuthor</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getCreator</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getProducer</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getSubject</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getKeywords</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getCreationDate</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>gregToISO</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentInformation</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocumentInformation</xqdoc:uri><xqdoc:name>getModificationDate</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>gregToISO</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>labels-as-strings</xqdoc:name></xqdoc:invoked><xqdoc:body>variable $pdfbox:property-map:=map{&#xD;
"#pages": pdfbox:number-of-pages#1,&#xD; "#pages": pdfbox:number-of-pages#1,&#xD;
&#xD; &#xD;
@ -637,11 +637,11 @@ as xs:base64Binary{&#xD;
=&gt;convert:integers-to-base64()&#xD; =&gt;convert:integers-to-base64()&#xD;
&#xD; &#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="0"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="0"><xqdoc:comment><xqdoc:description>&#xD;
known property names sorted</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:property-names</xqdoc:name><xqdoc:signature>function pdfbox:property-names ( ) as xs:string* { $pdfbox:property-map=&gt;map:keys()=&gt;sort() }</xqdoc:signature><xqdoc:return><xqdoc:type occurrence="*">xs:string</xqdoc:type></xqdoc:return><xqdoc:ref-variable><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>property-map</xqdoc:name></xqdoc:ref-variable><xqdoc:body>function pdfbox:property-names() &#xD; Defined property names, sorted</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:property-names</xqdoc:name><xqdoc:signature>function pdfbox:property-names ( ) as xs:string* { $pdfbox:property-map=&gt;map:keys()=&gt;sort() }</xqdoc:signature><xqdoc:return><xqdoc:type occurrence="*">xs:string</xqdoc:type></xqdoc:return><xqdoc:ref-variable><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>property-map</xqdoc:name></xqdoc:ref-variable><xqdoc:body>function pdfbox:property-names() &#xD;
as xs:string*{&#xD; as xs:string*{&#xD;
$pdfbox:property-map=&gt;map:keys()=&gt;sort()&#xD; $pdfbox:property-map=&gt;map:keys()=&gt;sort()&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
return value of $property for $pdf</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:property</xqdoc:name><xqdoc:signature>function pdfbox:property ( $pdf as item(),$property as xs:string ) as item()* { let $fns:= $pdfbox:property-map($property) return if(exists($fns)) then fold-left($fns, $pdf, function($result,$this as function(*)){$result!$this(.)}) else error(xs:QName('pdfbox:property'),concat("Property '",$property,"' not defined.")) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>property</xqdoc:name><xqdoc:type>xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">item()</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>exists</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>fold-left</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>error</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2001/XMLSchema</xqdoc:uri><xqdoc:name>QName</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>concat</xqdoc:name></xqdoc:invoked><xqdoc:ref-variable><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>property-map</xqdoc:name></xqdoc:ref-variable><xqdoc:body>function pdfbox:property($pdf as item(),$property as xs:string)&#xD; Return the value of $property for $pdf</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:property</xqdoc:name><xqdoc:signature>function pdfbox:property ( $pdf as item(),$property as xs:string ) as item()* { let $fns:= $pdfbox:property-map($property) return if(exists($fns)) then fold-left($fns, $pdf, function($result,$this as function(*)){$result!$this(.)}) else error(xs:QName('pdfbox:property'),concat("Property '",$property,"' not defined.")) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>property</xqdoc:name><xqdoc:type>xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">item()</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>exists</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>fold-left</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>error</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2001/XMLSchema</xqdoc:uri><xqdoc:name>QName</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>concat</xqdoc:name></xqdoc:invoked><xqdoc:ref-variable><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>property-map</xqdoc:name></xqdoc:ref-variable><xqdoc:body>function pdfbox:property($pdf as item(),$property as xs:string)&#xD;
as item()*{&#xD; as item()*{&#xD;
let $fns:= $pdfbox:property-map($property)&#xD; let $fns:= $pdfbox:property-map($property)&#xD;
return if(exists($fns))&#xD; return if(exists($fns))&#xD;
@ -655,7 +655,7 @@ summary CSV style info for all properties for $pdfpaths&#xD;
as map(*){&#xD; as map(*){&#xD;
pdfbox:report($pdfpaths,pdfbox:property-names())&#xD; pdfbox:report($pdfpaths,pdfbox:property-names())&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
summary CSV style info for named properties for $pdfpaths&#xD; summary CSV style info for named $properties for PDFs in $pdfpaths&#xD;
</xqdoc:description><xqdoc:see>https://docs.basex.org/main/CSV_Functions#xquery</xqdoc:see></xqdoc:comment><xqdoc:name>pdfbox:report</xqdoc:name><xqdoc:signature>function pdfbox:report ( $pdfpaths as item()*, $properties as xs:string* ) as map(*) { map{"names": array{"path",$properties}, "records": for $path in $pdfpaths let $name:=if($path instance of xs:base64Binary) then "binary" else $path return try{ let $pdf:=pdfbox:open($path) return (fold-left($properties, array{$name}, function($result as array(*),$prop as xs:string){ array:append($result, string(pdfbox:property($pdf, $prop)))} ), pdfbox:close($pdf) ) } catch *{ fold-left($properties, array{$name}, function($result as array(*),$prop as xs:string){ array:append($result, "#ERROR")} ) } } }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdfpaths</xqdoc:name><xqdoc:type occurrence="*">item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>properties</xqdoc:name><xqdoc:type occurrence="*">xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>open</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>fold-left</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/array</xqdoc:uri><xqdoc:name>append</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>string</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>property</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>close</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>fold-left</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/array</xqdoc:uri><xqdoc:name>append</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:report($pdfpaths as item()*, $properties as xs:string*)&#xD; </xqdoc:description><xqdoc:see>https://docs.basex.org/main/CSV_Functions#xquery</xqdoc:see></xqdoc:comment><xqdoc:name>pdfbox:report</xqdoc:name><xqdoc:signature>function pdfbox:report ( $pdfpaths as item()*, $properties as xs:string* ) as map(*) { map{"names": array{"path",$properties}, "records": for $path in $pdfpaths let $name:=if($path instance of xs:base64Binary) then "binary" else $path return try{ let $pdf:=pdfbox:open($path) return (fold-left($properties, array{$name}, function($result as array(*),$prop as xs:string){ array:append($result, string(pdfbox:property($pdf, $prop)))} ), pdfbox:close($pdf) ) } catch *{ fold-left($properties, array{$name}, function($result as array(*),$prop as xs:string){ array:append($result, "#ERROR")} ) } } }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdfpaths</xqdoc:name><xqdoc:type occurrence="*">item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>properties</xqdoc:name><xqdoc:type occurrence="*">xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>open</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>fold-left</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/array</xqdoc:uri><xqdoc:name>append</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>string</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>property</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>close</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="3"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>fold-left</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/array</xqdoc:uri><xqdoc:name>append</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:report($pdfpaths as item()*, $properties as xs:string*)&#xD;
as map(*){&#xD; as map(*){&#xD;
map{"names": array{"path",$properties},&#xD; map{"names": array{"path",$properties},&#xD;
@ -680,12 +680,12 @@ as map(*){&#xD;
&#xD; &#xD;
}&#xD; }&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
convenience function to save report() data to file</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:report-save</xqdoc:name><xqdoc:signature>function pdfbox:report-save ( $data as map(*),$dest as xs:string ) as empty-sequence() { let $opts := map { "format":"xquery", "header":"yes", "separator" : "," } return file:write-text($dest,csv:serialize($data,$opts)) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>data</xqdoc:name><xqdoc:type>map(*)</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>dest</xqdoc:name><xqdoc:type>xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>empty-sequence</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>http://expath.org/ns/file</xqdoc:uri><xqdoc:name>write-text</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://basex.org/modules/csv</xqdoc:uri><xqdoc:name>serialize</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:report-save($data as map(*),$dest as xs:string)&#xD; Convenience function to save report() data to file</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:report-save</xqdoc:name><xqdoc:signature>function pdfbox:report-save ( $data as map(*),$dest as xs:string ) as empty-sequence() { let $opts := map { "format":"xquery", "header":"yes", "separator" : "," } return file:write-text($dest,csv:serialize($data,$opts)) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>data</xqdoc:name><xqdoc:type>map(*)</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>dest</xqdoc:name><xqdoc:type>xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>empty-sequence</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>http://expath.org/ns/file</xqdoc:uri><xqdoc:name>write-text</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://basex.org/modules/csv</xqdoc:uri><xqdoc:name>serialize</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:report-save($data as map(*),$dest as xs:string)&#xD;
as empty-sequence(){&#xD; as empty-sequence(){&#xD;
let $opts := map { "format":"xquery", "header":"yes", "separator" : "," }&#xD; let $opts := map { "format":"xquery", "header":"yes", "separator" : "," }&#xD;
return file:write-text($dest,csv:serialize($data,$opts))&#xD; return file:write-text($dest,csv:serialize($data,$opts))&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="1"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="1"><xqdoc:comment><xqdoc:description>&#xD;
number of outline items</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:number-of-bookmarks</xqdoc:name><xqdoc:signature>function pdfbox:number-of-bookmarks ( $pdf as item() ) as xs:integer { let $xml:=pdfbox:outline-xml($pdf) return count($xml//bookmark) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>xs:integer</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline-xml</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>count</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:number-of-bookmarks($pdf as item())&#xD; The number of outline items defined in $pdf</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:number-of-bookmarks</xqdoc:name><xqdoc:signature>function pdfbox:number-of-bookmarks ( $pdf as item() ) as xs:integer { let $xml:=pdfbox:outline-xml($pdf) return count($xml//bookmark) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>xs:integer</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline-xml</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>count</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:number-of-bookmarks($pdf as item())&#xD;
as xs:integer{&#xD; as xs:integer{&#xD;
let $xml:=pdfbox:outline-xml($pdf)&#xD; let $xml:=pdfbox:outline-xml($pdf)&#xD;
return count($xml//bookmark)&#xD; return count($xml//bookmark)&#xD;
@ -716,7 +716,7 @@ as map(*){&#xD;
let $data:=convert:integers-to-base64(subsequence($buff,1,$n))=&gt;convert:binary-to-string()&#xD; let $data:=convert:integers-to-base64(subsequence($buff,1,$n))=&gt;convert:binary-to-string()&#xD;
return map{"n":$n, "data": $read || $data}&#xD; return map{"n":$n, "data": $read || $data}&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="1"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="1"><xqdoc:comment><xqdoc:description>&#xD;
outline for $pdf as map()*</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:outline</xqdoc:name><xqdoc:signature>function pdfbox:outline ( $pdf as item() ) as map(*)* { (# db:wrapjava some #) { let $outline:= PDDocument:getDocumentCatalog($pdf) =&gt;PDDocumentCatalog:getDocumentOutline() return if(exists($outline)) then pdfbox:outline($pdf,PDOutlineItem:getFirstChild($outline)) } }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentCatalog</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>exists</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem</xqdoc:uri><xqdoc:name>getFirstChild</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:outline($pdf as item())&#xD; Return outline for $pdf as map()*</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:outline</xqdoc:name><xqdoc:signature>function pdfbox:outline ( $pdf as item() ) as map(*)* { (# db:wrapjava some #) { let $outline:= PDDocument:getDocumentCatalog($pdf) =&gt;PDDocumentCatalog:getDocumentOutline() return if(exists($outline)) then pdfbox:outline($pdf,PDOutlineItem:getFirstChild($outline)) } }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentCatalog</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>exists</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem</xqdoc:uri><xqdoc:name>getFirstChild</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:outline($pdf as item())&#xD;
as map(*)*{&#xD; as map(*)*{&#xD;
(# db:wrapjava some #) {&#xD; (# db:wrapjava some #) {&#xD;
let $outline:=&#xD; let $outline:=&#xD;
@ -727,12 +727,12 @@ as map(*)*{&#xD;
then pdfbox:outline($pdf,PDOutlineItem:getFirstChild($outline)) &#xD; then pdfbox:outline($pdf,PDOutlineItem:getFirstChild($outline)) &#xD;
}&#xD; }&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
return bookmark info for children of $outlineItem as seq of maps</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:outline</xqdoc:name><xqdoc:signature>function pdfbox:outline ( $pdf as item(),$outlineItem as item()? ) as map(*)* { let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem) return map:get($find,"list") }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>outlineItem</xqdoc:name><xqdoc:type occurrence="?">item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline_</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/map</xqdoc:uri><xqdoc:name>get</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:outline($pdf as item(),$outlineItem as item()?)&#xD; return bookmark info for children of $outlineItem as seq of maps</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:outline</xqdoc:name><xqdoc:annotations><xqdoc:annotation name="private"/></xqdoc:annotations><xqdoc:signature>function pdfbox:outline ( $pdf as item(),$outlineItem as item()? ) as map(*)* { let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem) return map:get($find,"list") }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>outlineItem</xqdoc:name><xqdoc:type occurrence="?">item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline_</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/map</xqdoc:uri><xqdoc:name>get</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:outline($pdf as item(),$outlineItem as item()?)&#xD;
as map(*)*{&#xD; as map(*)*{&#xD;
let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem)&#xD; let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem)&#xD;
return map:get($find,"list")&#xD; return map:get($find,"list")&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
BaseX bug 10.7? error if inlined in outline</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:outline_</xqdoc:name><xqdoc:annotations><xqdoc:annotation name="private"/></xqdoc:annotations><xqdoc:signature>function pdfbox:outline_ ( $pdf as item(),$outlineItem as item()? ) as map(*) { pdfbox:do-until( map{"list":(),"this":$outlineItem}, function($input,$pos ) { let $bk:= pdfbox:bookmark($input?this,$pdf) let $bk:= if($bk?hasChildren) then let $kids:=pdfbox:outline($pdf,PDOutlineItem:getFirstChild($input?this)) return map:merge(($bk,map:entry("children",$kids))) else $bk return map{ "list": ($input?list, $bk), "this": PDOutlineItem:getNextSibling($input?this)} }, function($output,$pos) { empty($output?this) } ) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>outlineItem</xqdoc:name><xqdoc:type occurrence="?">item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="3"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>do-until</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>bookmark</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem</xqdoc:uri><xqdoc:name>getFirstChild</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/map</xqdoc:uri><xqdoc:name>merge</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/map</xqdoc:uri><xqdoc:name>entry</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem</xqdoc:uri><xqdoc:name>getNextSibling</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:outline_($pdf as item(),$outlineItem as item()?)&#xD; outline helper. BaseX bug 10.7? error if inlined in outline</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:outline_</xqdoc:name><xqdoc:annotations><xqdoc:annotation name="private"/></xqdoc:annotations><xqdoc:signature>function pdfbox:outline_ ( $pdf as item(),$outlineItem as item()? ) as map(*) { pdfbox:do-until( map{"list":(),"this":$outlineItem}, function($input,$pos ) { let $bk:= pdfbox:bookmark($input?this,$pdf) let $bk:= if($bk?hasChildren) then let $kids:=pdfbox:outline($pdf,PDOutlineItem:getFirstChild($input?this)) return map:merge(($bk,map:entry("children",$kids))) else $bk return map{ "list": ($input?list, $bk), "this": PDOutlineItem:getNextSibling($input?this)} }, function($output,$pos) { empty($output?this) } ) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>outlineItem</xqdoc:name><xqdoc:type occurrence="?">item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="3"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>do-until</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>bookmark</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>outline</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem</xqdoc:uri><xqdoc:name>getFirstChild</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/map</xqdoc:uri><xqdoc:name>merge</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions/map</xqdoc:uri><xqdoc:name>entry</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem</xqdoc:uri><xqdoc:name>getNextSibling</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:outline_($pdf as item(),$outlineItem as item()?)&#xD;
as map(*){&#xD; as map(*){&#xD;
pdfbox:do-until(&#xD; pdfbox:do-until(&#xD;
&#xD; &#xD;
@ -828,7 +828,7 @@ get pagelabels exist</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:page-
PDDocument:getDocumentCatalog($pdf)&#xD; PDDocument:getDocumentCatalog($pdf)&#xD;
=&gt;PDDocumentCatalog:getPageLabels()&#xD; =&gt;PDDocumentCatalog:getPageLabels()&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
label for $page formated as string</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:label-as-string</xqdoc:name><xqdoc:signature>function pdfbox:label-as-string ( $pagelabels,$page as xs:integer ) as xs:string? { let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page) return if(empty($label)) then () else let $start:= PDPageLabelRange:getStart($label) let $style := PDPageLabelRange:getStyle($label) let $prefix:= PDPageLabelRange:getPrefix($label) return string-join(($page, if(empty($style)) then "-" else $style, if(($start eq 1)) then "" else $start, if(exists($prefix)) then '*' || $prefix (:TODO double " :) )) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pagelabels</xqdoc:name></xqdoc:parameter><xqdoc:parameter><xqdoc:name>page</xqdoc:name><xqdoc:type>xs:integer</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="?">xs:string</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabels</xqdoc:uri><xqdoc:name>getPageLabelRange</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStart</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStyle</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getPrefix</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>string-join</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>exists</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:label-as-string($pagelabels,$page as xs:integer)&#xD; label for $page formated as string, empty if none</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:label-as-string</xqdoc:name><xqdoc:signature>function pdfbox:label-as-string ( $pagelabels,$page as xs:integer ) as xs:string? { let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page) return if(empty($label)) then () else let $start:= PDPageLabelRange:getStart($label) let $style := PDPageLabelRange:getStyle($label) let $prefix:= PDPageLabelRange:getPrefix($label) return string-join(($page, if(empty($style)) then "-" else $style, if(($start eq 1)) then "" else $start, if(exists($prefix)) then '*' || $prefix (:TODO double " :) )) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pagelabels</xqdoc:name></xqdoc:parameter><xqdoc:parameter><xqdoc:name>page</xqdoc:name><xqdoc:type>xs:integer</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="?">xs:string</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabels</xqdoc:uri><xqdoc:name>getPageLabelRange</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStart</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStyle</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getPrefix</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>string-join</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>exists</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:label-as-string($pagelabels,$page as xs:integer)&#xD;
as xs:string?{&#xD; as xs:string?{&#xD;
let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)&#xD; let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)&#xD;
return if(empty($label))&#xD; return if(empty($label))&#xD;
@ -843,7 +843,7 @@ as xs:string?{&#xD;
if(exists($prefix)) then '*' || $prefix (:TODO double " :)&#xD; if(exists($prefix)) then '*' || $prefix (:TODO double " :)&#xD;
))&#xD; ))&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="1"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="1"><xqdoc:comment><xqdoc:description>&#xD;
sequence of maps for each label in</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:labels-as-map</xqdoc:name><xqdoc:signature>function pdfbox:labels-as-map ( $pdf as item() ) as map(*)* { let $pagelabels:=PDDocument:getDocumentCatalog($pdf) =&gt;PDDocumentCatalog:getPageLabels() return $pagelabels !(0 to pdfbox:number-of-pages($pdf)-1) !pdfbox:label-as-map($pagelabels,.) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentCatalog</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-pages</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>label-as-map</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:labels-as-map($pdf as item())&#xD; sequence of maps for each label/page range defined in $pdf</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:labels-as-map</xqdoc:name><xqdoc:signature>function pdfbox:labels-as-map ( $pdf as item() ) as map(*)* { let $pagelabels:=PDDocument:getDocumentCatalog($pdf) =&gt;PDDocumentCatalog:getPageLabels() return $pagelabels !(0 to pdfbox:number-of-pages($pdf)-1) !pdfbox:label-as-map($pagelabels,.) }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type occurrence="*">map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getDocumentCatalog</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>number-of-pages</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="2"><xqdoc:uri>org.expkg_zone58.Pdfbox3</xqdoc:uri><xqdoc:name>label-as-map</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:labels-as-map($pdf as item())&#xD;
as map(*)*{&#xD; as map(*)*{&#xD;
let $pagelabels:=PDDocument:getDocumentCatalog($pdf)&#xD; let $pagelabels:=PDDocument:getDocumentCatalog($pdf)&#xD;
=&gt;PDDocumentCatalog:getPageLabels()&#xD; =&gt;PDDocumentCatalog:getPageLabels()&#xD;
@ -851,7 +851,7 @@ as map(*)*{&#xD;
!(0 to pdfbox:number-of-pages($pdf)-1)&#xD; !(0 to pdfbox:number-of-pages($pdf)-1)&#xD;
!pdfbox:label-as-map($pagelabels,.)&#xD; !pdfbox:label-as-map($pagelabels,.)&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
express label/page-range for $page as map</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:label-as-map</xqdoc:name><xqdoc:signature>function pdfbox:label-as-map ( $pagelabels,$page as xs:integer ) as map(*) { let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page) return if(empty($label)) then () else map{ "index": $page, "prefix": PDPageLabelRange:getPrefix($label), "start": PDPageLabelRange:getStart($label), "style": PDPageLabelRange:getStyle($label) } }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pagelabels</xqdoc:name></xqdoc:parameter><xqdoc:parameter><xqdoc:name>page</xqdoc:name><xqdoc:type>xs:integer</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabels</xqdoc:uri><xqdoc:name>getPageLabelRange</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getPrefix</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStart</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStyle</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:label-as-map($pagelabels,$page as xs:integer)&#xD; label/page-range for $page as map</xqdoc:description></xqdoc:comment><xqdoc:name>pdfbox:label-as-map</xqdoc:name><xqdoc:signature>function pdfbox:label-as-map ( $pagelabels,$page as xs:integer ) as map(*) { let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page) return if(empty($label)) then () else map{ "index": $page, "prefix": PDPageLabelRange:getPrefix($label), "start": PDPageLabelRange:getStart($label), "style": PDPageLabelRange:getStyle($label) } }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pagelabels</xqdoc:name></xqdoc:parameter><xqdoc:parameter><xqdoc:name>page</xqdoc:name><xqdoc:type>xs:integer</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>map(*)</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabels</xqdoc:uri><xqdoc:name>getPageLabelRange</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>empty</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getPrefix</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStart</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.common.PDPageLabelRange</xqdoc:uri><xqdoc:name>getStyle</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:label-as-map($pagelabels,$page as xs:integer)&#xD;
as map(*)&#xD; as map(*)&#xD;
{&#xD; {&#xD;
let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)&#xD; let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)&#xD;
@ -874,7 +874,7 @@ as xs:string{&#xD;
return (# db:checkstrings #) {PDFTextStripper:getText($tStripper,$pdf)}&#xD; return (# db:checkstrings #) {PDFTextStripper:getText($tStripper,$pdf)}&#xD;
}</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD; }</xqdoc:body></xqdoc:function><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description>&#xD;
Return size of $pageNo (zero based)&#xD; Return size of $pageNo (zero based)&#xD;
</xqdoc:description><xqdoc:custom tag="result">e.g. [0.0,0.0,168.0,239.52]</xqdoc:custom></xqdoc:comment><xqdoc:name>pdfbox:page-media-box</xqdoc:name><xqdoc:signature>function pdfbox:page-media-box ( $pdf as item(), $pageNo as xs:integer ) as xs:string { PDDocument:getPage($pdf, $pageNo) =&gt;PDPage:getMediaBox() =&gt;PDRectangle:toString() }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>pageNo</xqdoc:name><xqdoc:type>xs:integer</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>xs:string</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getPage</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:page-media-box($pdf as item(), $pageNo as xs:integer)&#xD; </xqdoc:description><xqdoc:return>e.g. [0.0,0.0,168.0,239.52]</xqdoc:return></xqdoc:comment><xqdoc:name>pdfbox:page-media-box</xqdoc:name><xqdoc:signature>function pdfbox:page-media-box ( $pdf as item(), $pageNo as xs:integer ) as xs:string { PDDocument:getPage($pdf, $pageNo) =&gt;PDPage:getMediaBox() =&gt;PDRectangle:toString() }</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>pdf</xqdoc:name><xqdoc:type>item()</xqdoc:type></xqdoc:parameter><xqdoc:parameter><xqdoc:name>pageNo</xqdoc:name><xqdoc:type>xs:integer</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:return><xqdoc:type>xs:string</xqdoc:type></xqdoc:return><xqdoc:invoked arity="2"><xqdoc:uri>java:org.apache.pdfbox.pdmodel.PDDocument</xqdoc:uri><xqdoc:name>getPage</xqdoc:name></xqdoc:invoked><xqdoc:body>function pdfbox:page-media-box($pdf as item(), $pageNo as xs:integer)&#xD;
as xs:string{&#xD; as xs:string{&#xD;
PDDocument:getPage($pdf, $pageNo)&#xD; PDDocument:getPage($pdf, $pageNo)&#xD;
=&gt;PDPage:getMediaBox()&#xD; =&gt;PDPage:getMediaBox()&#xD;

File diff suppressed because one or more lines are too long

View file

@ -7,4 +7,4 @@
Contents Contents
</h3><ol class="toc"><li><a href="#summary"><span class="secno">1 </span><span class="content">Summary</span></a></li><li><a href="#rest"><span class="secno">2 </span><span class="content">Rest Paths</span></a></li></ol></nav><section id="summary"><h2>Summary</h2><p>No RESTXQ usage</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a></td><td>Summary of import usage</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="annotations.html" title="Summary of XQuery annotation use " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">annotations</a></td><td>Summary of XQuery annotation use</td><td>xhtml</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="rest"><h2>Rest interface paths</h2></section></div></div><div class="footer"><p style="text-align:right">Generated by </h3><ol class="toc"><li><a href="#summary"><span class="secno">1 </span><span class="content">Summary</span></a></li><li><a href="#rest"><span class="secno">2 </span><span class="content">Rest Paths</span></a></li></ol></nav><section id="summary"><h2>Summary</h2><p>No RESTXQ usage</p><details><summary>Related documents</summary><table class="data"><thead><th>View</th><th>Description</th><th>Format</th></thead><tbody><tr><td><a href="index.html" title="Index of sources " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">report</a></td><td>Index of sources</td><td>xhtml</td></tr><tr><td><a href="imports.html" title="Summary of import usage " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports</a></td><td>Summary of import usage</td><td>xhtml</td></tr><tr><td><a href="mermaid.html" title="Project wide module imports as html mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">imports-diag</a></td><td>Project wide module imports as html mermaid class diagram</td><td>html5</td></tr><tr><td><a href="mermaid.mmd" title="Project wide module imports as a mermaid class diagram " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">imports-diag.mmd</a></td><td>Project wide module imports as a mermaid class diagram</td><td>text</td></tr><tr><td><a href="annotations.html" title="Summary of XQuery annotation use " class="badge badge-pill badge-light" style="margin-left:1em" target="_self">annotations</a></td><td>Summary of XQuery annotation use</td><td>xhtml</td></tr><tr><td><a href="xqdoca.xml" title="xqDocA run configuration report (XML) " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoca.xml</a></td><td>xqDocA run configuration report (XML)</td><td>xml</td></tr><tr><td><a href="validation-report.xml" title="validate generated xqdoc files " class="badge badge-pill badge-light" style="margin-left:1em" target="_blank">xqdoc-validate</a></td><td>validate generated xqdoc files</td><td>xml</td></tr></tbody></table></details></section><section id="rest"><h2>Rest interface paths</h2></section></div></div><div class="footer"><p style="text-align:right">Generated by
<a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a> <a href="https://github.com/Quodatum/xqdoca" target="_blank">xqDocA <span>0.9.1</span></a>
  on <span title="2025-06-03T22:34:04.782+01:00">Tuesday, 3rd June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>   on <span title="2025-06-04T10:09:22.636+01:00">Wednesday, 4th June 2025</span></p></div><script src="resources/prism/1.29.0/prism.js" type="text/javascript"></script><script src="resources/xqdoca.js" type="text/javascript"></script></body></html>

View file

@ -1 +1 @@
<errors created="2025-06-03T22:34:04.782+01:00" schema="file:///C:/Users/mrwhe/git/quodatum/xqdoca/src/main/etc/models/xqdoc-1.1.xsd" errors="0"><report source="Pdfbox3.xqm" xqdoc="modules/F000001/"><status>valid</status></report></errors> <errors created="2025-06-04T10:09:22.636+01:00" schema="file:///C:/Users/mrwhe/git/quodatum/xqdoca/src/main/etc/models/xqdoc-1.1.xsd" errors="0"><report source="Pdfbox3.xqm" xqdoc="modules/F000001/"><status>valid</status></report></errors>

View file

@ -1,4 +1,4 @@
<xqdoca created="2025-06-03T22:34:04.782+01:00"><xqdoca>0.9.1</xqdoca><target>docs/xqdoc/</target><outputs><global> <xqdoca created="2025-06-04T10:09:22.636+01:00"><xqdoca>0.9.1</xqdoca><target>docs/xqdoc/</target><outputs><global>
report report
restxq restxq
imports imports

View file

@ -1,28 +1,28 @@
# Pdfbox # Pdfbox
A `BaseX` interface for the `Apache Pdfbox library` version 3. A `BaseX` interface for the `Apache Pdfbox library` version 3.
The [Apache PDFBox® library](https://pdfbox.apache.org/) is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. > The [Apache PDFBox® library](https://pdfbox.apache.org/) is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.
This interface is packaged in the [Expath](https://docs.basex.org/main/Repository#expath_packaging) format. The package includes the required Pdfbox jars. This interface is packaged in the [Expath XAR](https://docs.basex.org/main/Repository#expath_packaging) format. The package includes the required Pdfbox jars.
A test suite is available and workflow actions run this on BaseX 10.7 and 11.7. A test suite is available and workflow actions run these tests against BaseX 10.7 and 11.7.
> [!NOTE] > [!NOTE]
>Currently (v0.1.5) works with BaseX 9.7, but this may change with future versions. >Currently (v0.3.6) works with BaseX 9.7, but this may change with future versions.
## Features ## Features
The features focus on extracting information from PDFs rather than creation or editing of PDFs. The features focus on extracting information from PDFs rather than creation or editing of PDFs.
### Supported ### Supported
* read PDF page count. * Read PDF page count.
* read any PDF outline and return as map(s) or XML. * Read any PDF outline and return as map(s) or XML.
* read pagelabels. * Read pagelabels.
* read page text. * Read page text.
* save pdf page range to a new pdf. * Save pdf page range to a new pdf.
* save image of rendered pdf page. * Create image of rendered pdf page.
* open PDF with password * Open PDF with password.
* read XMP metadata * Read XMP metadata.
* Page size information * Page size information.
* support for xs:base64Binary in function inputs and outputs to facilitate database and store usage. * Datatype xs:base64Binary in function inputs and outputs to facilitate database and store usage.
### Not supported: ### Not supported:
* creating PDFs with new content * creating PDFs with new content
@ -50,7 +50,7 @@ pdfbox:with-pdf("...path/to/pdf.pdf",
* `scripts/make-xar.xq` packages the required `jar`s and `xqm` files to a `xar` file in the `dist` folder. * `scripts/make-xar.xq` packages the required `jar`s and `xqm` files to a `xar` file in the `dist` folder.
The `package.json` is used/abused as a configuration source. Non standard information is held in the `expkg_zone58` section. This is experimental and may change. The `package.json` is (ab)used as a configuration source. Non standard information is held in the `expkg_zone58` section. This is experimental and may change.
### Action support ### Action support
The workflow `ci-basex.yaml` builds and tests the package. This can be used as an action on [github](https://github.com/features/actions), or on a local [gitea](https://docs.gitea.com/usage/actions/overview) installation. The workflow `ci-basex.yaml` builds and tests the package. This can be used as an action on [github](https://github.com/features/actions), or on a local [gitea](https://docs.gitea.com/usage/actions/overview) or [forgejo](https://forgejo.org/) installation.

View file

@ -139,9 +139,9 @@ as xs:base64Binary{
}; };
(:~ property access map (:~ Defines a map from property names to evaluation method.
keys are property names, Keys are property names,
values are sequences of functions to get property from $pdf object values are sequences of functions to get property value starting from a $pdf object.
:) :)
declare %private variable $pdfbox:property-map:=map{ declare %private variable $pdfbox:property-map:=map{
"#pages": pdfbox:number-of-pages#1, "#pages": pdfbox:number-of-pages#1,
@ -180,13 +180,13 @@ declare %private variable $pdfbox:property-map:=map{
"labels": pdfbox:labels-as-strings#1 "labels": pdfbox:labels-as-strings#1
}; };
(:~ known property names sorted :) (:~ Defined property names, sorted :)
declare function pdfbox:property-names() declare function pdfbox:property-names()
as xs:string*{ as xs:string*{
$pdfbox:property-map=>map:keys()=>sort() $pdfbox:property-map=>map:keys()=>sort()
}; };
(:~ return value of $property for $pdf :) (:~ Return the value of $property for $pdf :)
declare function pdfbox:property($pdf as item(),$property as xs:string) declare function pdfbox:property($pdf as item(),$property as xs:string)
as item()*{ as item()*{
let $fns:= $pdfbox:property-map($property) let $fns:= $pdfbox:property-map($property)
@ -204,7 +204,7 @@ as map(*){
pdfbox:report($pdfpaths,pdfbox:property-names()) pdfbox:report($pdfpaths,pdfbox:property-names())
}; };
(:~ summary CSV style info for named properties for $pdfpaths (:~ summary CSV style info for named $properties for PDFs in $pdfpaths
@see https://docs.basex.org/main/CSV_Functions#xquery @see https://docs.basex.org/main/CSV_Functions#xquery
:) :)
declare function pdfbox:report($pdfpaths as item()*, $properties as xs:string*) declare function pdfbox:report($pdfpaths as item()*, $properties as xs:string*)
@ -232,14 +232,14 @@ as map(*){
} }
}; };
(:~ convenience function to save report() data to file :) (:~ Convenience function to save report() data to file :)
declare function pdfbox:report-save($data as map(*),$dest as xs:string) declare function pdfbox:report-save($data as map(*),$dest as xs:string)
as empty-sequence(){ as empty-sequence(){
let $opts := map { "format":"xquery", "header":"yes", "separator" : "," } let $opts := map { "format":"xquery", "header":"yes", "separator" : "," }
return file:write-text($dest,csv:serialize($data,$opts)) return file:write-text($dest,csv:serialize($data,$opts))
}; };
(:~ number of outline items :) (:~ The number of outline items defined in $pdf :)
declare function pdfbox:number-of-bookmarks($pdf as item()) declare function pdfbox:number-of-bookmarks($pdf as item())
as xs:integer{ as xs:integer{
let $xml:=pdfbox:outline-xml($pdf) let $xml:=pdfbox:outline-xml($pdf)
@ -277,7 +277,7 @@ as map(*){
return map{"n":$n, "data": $read || $data} return map{"n":$n, "data": $read || $data}
}; };
(:~ outline for $pdf as map()* :) (:~ Return outline for $pdf as map()* :)
declare function pdfbox:outline($pdf as item()) declare function pdfbox:outline($pdf as item())
as map(*)*{ as map(*)*{
(# db:wrapjava some #) { (# db:wrapjava some #) {
@ -291,13 +291,13 @@ as map(*)*{
}; };
(:~ return bookmark info for children of $outlineItem as seq of maps :) (:~ return bookmark info for children of $outlineItem as seq of maps :)
declare function pdfbox:outline($pdf as item(),$outlineItem as item()?) declare %private function pdfbox:outline($pdf as item(),$outlineItem as item()?)
as map(*)*{ as map(*)*{
let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem) let $find as map(*):=pdfbox:outline_($pdf ,$outlineItem)
return map:get($find,"list") return map:get($find,"list")
}; };
(:~ BaseX bug 10.7? error if inlined in outline :) (:~ outline helper. BaseX bug 10.7? error if inlined in outline :)
declare %private function pdfbox:outline_($pdf as item(),$outlineItem as item()?) declare %private function pdfbox:outline_($pdf as item(),$outlineItem as item()?)
as map(*){ as map(*){
pdfbox:do-until( pdfbox:do-until(
@ -401,14 +401,16 @@ as xs:string*
=>PDPageLabels:getLabelsByPageIndices() =>PDPageLabels:getLabelsByPageIndices()
}; };
(:~ sequence of label ranges defined in PDF as formatted strings :) (:~ sequence of label ranges defined in PDF as formatted strings
declare function pdfbox:labels-as-strings($pdf as item()) @return a custom representation of the labels e.g "0-*Cover,1r,11D"
:)
declare function pdfbox:labels-as-string($pdf as item())
as xs:string{ as xs:string{
let $pagelabels:=PDDocument:getDocumentCatalog($pdf) let $pagelabels:=PDDocument:getDocumentCatalog($pdf)
=>PDDocumentCatalog:getPageLabels() =>PDDocumentCatalog:getPageLabels()
return $pagelabels return $pagelabels
!(0 to pdfbox:number-of-pages($pdf)-1) !(0 to pdfbox:number-of-pages($pdf)-1)
!pdfbox:label-as-string($pagelabels,.)=>string-join(",") !pdfbox:label-as-string($pagelabels,.)=>string-join("&#10;")
}; };
@ -419,7 +421,7 @@ declare function pdfbox:page-labels($pdf)
=>PDDocumentCatalog:getPageLabels() =>PDDocumentCatalog:getPageLabels()
}; };
(:~ label for $page formated as string :) (:~ label for $page formated as string, empty if none :)
declare function pdfbox:label-as-string($pagelabels,$page as xs:integer) declare function pdfbox:label-as-string($pagelabels,$page as xs:integer)
as xs:string?{ as xs:string?{
let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page) let $label:=PDPageLabels:getPageLabelRange($pagelabels,$page)
@ -436,7 +438,7 @@ as xs:string?{
)) ))
}; };
(:~ sequence of maps for each label in :) (:~ sequence of maps for each label/page range defined in $pdf:)
declare function pdfbox:labels-as-map($pdf as item()) declare function pdfbox:labels-as-map($pdf as item())
as map(*)*{ as map(*)*{
let $pagelabels:=PDDocument:getDocumentCatalog($pdf) let $pagelabels:=PDDocument:getDocumentCatalog($pdf)
@ -446,7 +448,7 @@ as map(*)*{
!pdfbox:label-as-map($pagelabels,.) !pdfbox:label-as-map($pagelabels,.)
}; };
(:~ express label/page-range for $page as map :) (:~ label/page-range for $page as map :)
declare function pdfbox:label-as-map($pagelabels,$page as xs:integer) declare function pdfbox:label-as-map($pagelabels,$page as xs:integer)
as map(*) as map(*)
{ {
@ -475,7 +477,7 @@ as xs:string{
}; };
(:~ Return size of $pageNo (zero based) (:~ Return size of $pageNo (zero based)
@result e.g. [0.0,0.0,168.0,239.52] @return e.g. [0.0,0.0,168.0,239.52]
:) :)
declare function pdfbox:page-media-box($pdf as item(), $pageNo as xs:integer) declare function pdfbox:page-media-box($pdf as item(), $pageNo as xs:integer)
as xs:string{ as xs:string{

View file

@ -51,7 +51,7 @@ declare %unit:test
function test:labels(){ function test:labels(){
let $pdf:=test:open("samples.pdf/BaseX100.pdf") let $pdf:=test:open("samples.pdf/BaseX100.pdf")
let $labels:=pdfbox:labels($pdf) let $labels:=pdfbox:labels-by-page($pdf)
return ( return (
unit:assert-equals(count($labels),pdfbox:number-of-pages($pdf)), unit:assert-equals(count($labels),pdfbox:number-of-pages($pdf)),
unit:assert($labels[1]="i") , unit:assert($labels[1]="i") ,
@ -125,7 +125,7 @@ declare %unit:test
function test:save(){ function test:save(){
let $pdf:=test:open("samples.pdf/BaseX100.pdf") let $pdf:=test:open("samples.pdf/BaseX100.pdf")
let $dest:=file:create-temp-file("test-save",".pdf") let $dest:=file:create-temp-file("test-save",".pdf")
let $savedPath:=pdfbox:save($pdf, $dest) let $savedPath:=pdfbox:pdf-save($pdf, $dest)
return unit:assert-equals($savedPath, $dest) return unit:assert-equals($savedPath, $dest)
}; };
@ -133,7 +133,7 @@ function test:save(){
declare %unit:test declare %unit:test
function test:property(){ function test:property(){
let $pdf:=test:open("samples.pdf/BaseX100.pdf") let $pdf:=test:open("samples.pdf/BaseX100.pdf")
let $pages:=pdfbox:property($pdf, "pageCount") let $pages:=pdfbox:property($pdf, "#pages")
return unit:assert(true()) return unit:assert(true())
}; };
@ -141,8 +141,8 @@ function test:property(){
declare %unit:test("expected", "pdfbox:property") declare %unit:test("expected", "pdfbox:property")
function test:property-bad(){ function test:property-bad(){
let $pdf:=test:open("samples.pdf/BaseX100.pdf") let $pdf:=test:open("samples.pdf/BaseX100.pdf")
let $title:=pdfbox:property($pdf, "badname") let $p:=pdfbox:property($pdf, "badname")
return unit:assert(exists($title)) return unit:assert(exists($p))
}; };
(:~ Test for pdfbox:property-names function :) (:~ Test for pdfbox:property-names function :)
declare %unit:test declare %unit:test
@ -164,16 +164,16 @@ function test:report(){
declare %unit:test declare %unit:test
function test:hasOutline(){ function test:hasOutline(){
let $pdf:=test:open("samples.pdf/BaseX100.pdf") let $pdf:=test:open("samples.pdf/BaseX100.pdf")
let $hasOutline:=pdfbox:hasOutline($pdf) let $marks:=pdfbox:number-of-bookmarks($pdf)
return unit:assert(not($hasOutline)) return unit:assert-equals($marks,0)
}; };
(:~ Test for pdfbox:hasLabels function :) (:~ Test for pdfbox:hasLabels function :)
declare %unit:test declare %unit:test
function test:hasLabels(){ function test:hasLabels(){
let $pdf:=test:open("samples.pdf/BaseX100.pdf") let $pdf:=test:open("samples.pdf/BaseX100.pdf")
let $hasLabels:=pdfbox:hasLabels($pdf) let $labels:=pdfbox:number-of-labels($pdf)
return unit:assert($hasLabels) return unit:assert-equals($labels,302)
}; };