https://github.com/miyako/cpdf
https://github.com/miyako/cpdf
4d-class 4d-component cpdf
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/miyako/cpdf
- Owner: miyako
- License: mit
- Created: 2024-11-28T07:05:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T07:48:04.000Z (about 1 month ago)
- Last Synced: 2025-03-13T08:33:33.664Z (about 1 month ago)
- Topics: 4d-class, 4d-component, cpdf
- Language: 4D
- Homepage:
- Size: 7.47 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](LICENSE)
### Licensing
* the source code of this component is licensed under the [MIT license](https://github.com/miyako/cpdf/blob/master/LICENSE).
* see [coherentpdf.com](https://www.coherentpdf.com/index.html) for the licensing of **Coherent PDF**.# cpdf
## dependencies.json
```json
{
"dependencies": {
"cpdf": {
"github": "miyako/cpdf",
"version": "latest"
}
}
}
```## Usage
```4d
#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
```