parsePdf (xlink : xlink, [fromDataSource : boolean]) : nodeset
The method “parsPdf” returns the textual content of a.pdf file for each page as well as some meta information if they are entered in the file.
The parameter »xlink« can either be an XLink to the binary file itself or an XLink to the literal method performing the PDF rendering i.e. it as good as produces the result »XY.pdf« already.
The second parameter »fromDataScource« is optional. If it is left out or is »true()«, then the extension expects an XLink to the binary data itself. It is »false()«, an XLink to the rendering method/data is expected.
The example shows three different calls of the method »parsePdf()«.
The first two have the same result. They call the method on the binary datum »onion://data/objects/1234.4321« (which has evidently been loaded into an object).
The third example however indicates, as the first parameter, an Xlink to the »default()« method of an object, which evidently contains a binary .pdf document. This method has the PDF itself as result. The second parameter is therefore »false()«.
The result XML of the method »parsePdf()« looks as follows: