https://github.com/miyako/4d-component-pdftk-java
4D component of pdftk-java
https://github.com/miyako/4d-component-pdftk-java
4d-component
Last synced: 10 days ago
JSON representation
4D component of pdftk-java
- Host: GitHub
- URL: https://github.com/miyako/4d-component-pdftk-java
- Owner: miyako
- Created: 2023-03-08T05:58:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T07:32:26.000Z (about 3 years ago)
- Last Synced: 2025-02-26T04:16:35.432Z (about 1 year ago)
- Topics: 4d-component
- Language: 4D
- Homepage:
- Size: 368 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README


# 4d-component-pdftk-java
4D component of [pdftk-java](https://gitlab.com/pdftk-java/pdftk) `3.3.3`.
### Install
Create a folder named `Java` at the same level as `/PROJECT/`.
Copy the contents of [Java](https://github.com/miyako/4d-component-pdftk-java/releases/tag/Java) to this folder.
Alternatively, modify the [`JDK`](https://github.com/miyako/4d-component-pdftk-java/blob/main/pdftk-java/Project/Sources/Classes/JDK.4dm#L7) class to reference your local `$JAVA_HOME`.
In that case, you don't need the full SDK in your project, just copy `/Java/pdftk-all.jar`.
### Usage
```4d
$JDK:=cs.JDK.new()
$resourcesFolderFullPath:=Folder(Folder(fk resources folder).platformPath; fk platform path)
$one:=$resourcesFolderFullPath.file("1.pdf").path
$two:=$resourcesFolderFullPath.file("2.pdf").path
$out:=Folder(fk desktop folder).file("out.pdf").path
$status:=$JDK.pdftk(New collection($one; $two; "cat"; "output"; $out).join(" "))
```