- the source code of this component is licensed under the MIT license.
- see coherentpdf.com for the licensing of Coherent PDF.
{
"dependencies": {
"cpdf": {
"github": "miyako/cpdf",
"version": "*"
}
}
}
#DECLARE($params : Object)
If ($params=Null)
/*
async calls must be performed in a worker or form
*/
CALL WORKER(1; Current method name; {})
Else
var $cpdf : cs.cpdf.cpdf
$cpdf:=cs.cpdf.cpdf.new(cs._cpdf_Controller)
$pdf:=File("/DATA/brochure.pdf")
$pdf:=OB Class($pdf).new($pdf.platformPath; fk platform path)
$out:=Folder(fk desktop folder).file("brochure.json")
$out2:=Folder(fk desktop folder).file("brochure.pdf")
$cpdf.perform([\
[$pdf; "-output-json"; "-output-json-parse-content-streams"; "-o"; $out]; \
["-j"; $out; "-o"; $out2]\
])
End if