[add] bxs

This commit is contained in:
Andy Bunce 2025-02-01 21:35:09 +00:00
parent 0b8d565dac
commit 7447ca92be
3 changed files with 17 additions and 3 deletions

View file

@ -28,7 +28,7 @@ declare namespace PDFRenderer="java:org.apache.pdfbox.rendering.PDFRenderer";
declare namespace RandomAccessReadBufferedFile = "java:org.apache.pdfbox.io.RandomAccessReadBufferedFile";
declare namespace File ="java:java.io.File";
(:~ version of this package
(:~ SemVer version of this package
with build metadata for Apacke Pdfbox in use e.g. "0.1.0+pdfbox3.0.4"
:)
declare function pdfbox:version()
@ -36,6 +36,15 @@ as xs:string{
"0.1.0+pdfbox" || Q{java:org.apache.pdfbox.util.Version}getVersion()
};
(: open pdf,apply function, close pdf
with-document pattern, creates local pdfobject and ensures it is closed
e.g "path..." => pdfbox:with-pdf("path...",pdfbox:page-text(?,5))
:)
declare function pdfbox:with-pdf($src as xs:string,$fn as function(*)*)
as item()*{
"@TODO"
};
(:~ open pdf, returns pdf object :)
declare function pdfbox:open($pdfpath as xs:string)
as item(){