Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/miyako/cpdf
Browse files Browse the repository at this point in the history
  • Loading branch information
miyako committed Nov 29, 2024
2 parents 5109c9c + 4644624 commit 3b6a2b1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,46 @@
* 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": "*"
}
}
}
```

## 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:=cs.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
```

0 comments on commit 3b6a2b1

Please sign in to comment.