Formatwerk
pdf compress to size
Measures the largest placed size of every image XObject from the page content (pdf-lib 1.17.1 plus own content interpreter) and derives its effective resolution. Lossless steps come first: uncompressed streams are Flate-compressed, page thumbnails optionally dropped, unreachable objects removed and objects packed into object streams. If the file is still above target_bytes, 8-bit Gray/RGB images (JPEG or Flate, PNG predictors supported) are resampled with Lanczos in sharp/libvips along fixed.
POST https://format.halowerk.com/v1/pdf-compress-to-sizeInputs
| Field | Type | Required | Description |
|---|---|---|---|
| content_base64 | string | No | The PDF as base64 (a data: prefix and whitespace are tolerated); at most 10 MB decoded. |
| url | string | No | Public http(s) URL of the PDF (at most 10 MB). Private, local and reserved addresses are refused. |
| target_bytes | integer | Yes | Desired maximum file size in bytes. |
| min_ppi | integer | No | Readability limit: images are never resampled below this effective resolution. |
| min_jpeg_quality | integer | No | Readability limit: JPEG quality (libjpeg scale) is never set below this value. |
| lossy | boolean | No | Allow converting lossless (Flate) images to JPEG when that is smaller. |
| drop_thumbnails | boolean | No | Remove embedded page thumbnails (viewers regenerate them). |
Show full input schema
{
"type": "object",
"additionalProperties": false,
"required": [
"target_bytes"
],
"properties": {
"content_base64": {
"type": "string",
"minLength": 8,
"maxLength": 13981016,
"description": "The PDF as base64 (a data: prefix and whitespace are tolerated); at most 10 MB decoded."
},
"url": {
"type": "string",
"format": "uri",
"maxLength": 2048,
"description": "Public http(s) URL of the PDF (at most 10 MB). Private, local and reserved addresses are refused."
},
"target_bytes": {
"type": "integer",
"minimum": 1000,
"maximum": 10485760,
"description": "Desired maximum file size in bytes."
},
"min_ppi": {
"type": "integer",
"minimum": 72,
"maximum": 600,
"default": 150,
"description": "Readability limit: images are never resampled below this effective resolution."
},
"min_jpeg_quality": {
"type": "integer",
"minimum": 40,
"maximum": 95,
"default": 60,
"description": "Readability limit: JPEG quality (libjpeg scale) is never set below this value."
},
"lossy": {
"type": "boolean",
"default": true,
"description": "Allow converting lossless (Flate) images to JPEG when that is smaller."
},
"drop_thumbnails": {
"type": "boolean",
"default": true,
"description": "Remove embedded page thumbnails (viewers regenerate them)."
}
}
}Published input example
{
"content_base64": "JVBERi0xLjcKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvQWNyb0Zvcm08PC9GaWVsZHNbNCAwIFIgNSAwIFJdPj4+PgplbmRvYmoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbMyAwIFJdL0NvdW50IDE+PgplbmRvYmoKMyAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50IDIgMCBSL01lZGlhQm94WzAgMCAzMDAgMjAwXS9Bbm5vdHNbNCAwIFIgNSAwIFJdPj4KZW5kb2JqCjQgMCBvYmoKPDwvVHlwZS9Bbm5vdC9TdWJ0eXBlL1dpZGdldC9GVC9UeC9UKG5hbWUpL1RVKEZ1bGwgbmFtZSkvTWF4TGVuIDQwL0ZmIDIvUmVjdFsyMCAxNTAgMjIwIDE2OF0vUCAzIDAgUj4+CmVuZG9iago1IDAgb2JqCjw8L1R5cGUvQW5ub3QvU3VidHlwZS9XaWRnZXQvRlQvQ2gvVChjb3VudHJ5KS9GZiAxMzEwNzIvT3B0WyhERSkoQVQpKENIKV0vVihERSkvRFYoREUpL1JlY3RbMjAgMTIwIDgwIDEzOF0vUCAzIDAgUj4+CmVuZG9iagp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMDkgMDAwMDAgbiAKMDAwMDAwMDA4NyAwMDAwMCBuIAowMDAwMDAwMTM4IDAwMDAwIG4gCjAwMDAwMDAyMjMgMDAwMDAgbiAKMDAwMDAwMDM0MSAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgNi9Sb290IDEgMCBSPj4Kc3RhcnR4cmVmCjQ3MwolJUVPRgo=",
"target_bytes": 100000
}Result & documentation
Machine-readable documentation of this hub
Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.
More endpoints in this hub
- Formatwerk0.004 USDC
accounting csv unify
POSThttps://format.halowerk.com/v1/accounting-csv-unifyDATEV booking batch files (EXTF/DTVF, category 21) are read by their documented field positions: amount and S/H become a signed amount relative to the account, Belegdatum TTMM is resolved within the fiscal year from the header. Other export
- Formatwerk0.005 USDC
avv checklist
POSThttps://format.halowerk.com/v1/avv-checklistChecklist after Art. 28 GDPR (Regulation (EU) 2016/679 Art. 28 (GDPR), https://eur-lex.europa.eu/eli/reg/2016/679/oj, German and English text retrieved from the EU Publications Office 2026-11-01): Art. 28(3) sentence 1 (subject-matter, dura
- Formatwerk0.004 USDC
bagit package
POSThttps://format.halowerk.com/v1/bagit-packageCreate: files go to data/, manifest-<alg>.txt and tagmanifest-<alg>.txt are written for SHA-256 (default), SHA-512 or legacy SHA-1/MD5, bag-info.txt gets your metadata plus Bagging-Date, Bag-Size and Payload-Oxum; paths are checked (no abso