[PAID] ๐Ÿ› ๏ธ PdfCompress - Shrink a PDF on the device by re-encoding pages. No internet and no file upload

PdfCompress

[PAID] :heavy_dollar_sign: :hammer_and_wrench: PdfCompress

Shrink a PDF on the device by re-encoding pages. No internet and no file upload.

Open store


:clipboard: Extension specifications

Package in.sarthakdev.pdfcompress
Version 1.0
Price $7.99 USD
Category Tools
Updated 18 September 2026
Platforms MIT App Inventor, Kodular, Niotron, Android Builder, Thunkable
Built using FAST
Store PdfCompress Extension - Tools Extension for MIT App Inventor, Kodular, Niotron | SarthakDev.in

Paid buyers get this AIX by email after checkout. Import it from Projects โ†’ Import extension.

:open_book: About

Re-encode PDF pages on the device. No internet permission and no file upload.

:sparkles: Features

  • On-device PDF shrink with PdfRenderer and PdfDocument
  • No INTERNET permission and no upload
  • Rejects http(s) paths โ€” local files only
  • Quality 1-100 and DPI 36-300 as designer properties
  • Background thread with GotCompressed byte counts
  • Requires Android 5.0 (API 21) or newer

:puzzle_piece: Blocks

PdfCompress blocks

:bell: Events

Got Compressed

Fired when the smaller PDF has been written locally.

GotCompressed

  • outputPath (text)
  • originalBytes (number)
  • compressedBytes (number)

Error Occurred

Fired when the file cannot be read or written.

ErrorOccurred

  • message (text)

:wrench: Methods

Compress

Compress sourcePdf into outputPdf on a background thread. Paths are local files only.

Compress

  • sourcePdf (text)
  • outputPdf (text)

:gear: Properties

Quality

JPEG quality 1-100 used when re-encoding each page. Default 60.

Quality

Type: number ยท Default: 60

Dpi

Render DPI 36-300. Lower means a smaller file. Default 110.

Dpi

Type: number ยท Default: 110


:shopping_cart: Get the AIX

Paid extension. Buy it on the store, then import from Projects โ†’ Import extension.


Built by Sarthak Gupta ยท hi@sarthakdev.in ยท sarthakdev.in

Local filesystem paths only. Both sourcePdf and outputPdf go through the same check.

Works

  • Absolute path: /storage/emulated/0/Download/invoice.pdf
  • ASD / app files: /storage/emulated/0/Android/data/<your.package>/files/out.pdf
  • file:// prefix โ€” it is stripped: file:///storage/emulated/0/Download/invoice.pdf
  • Whatever File / FilePicker / Activity Starter gives you if it is a real file path

Does not work

  • content://โ€ฆ (SAF / modern picker URIs)
  • http:// / https://
  • any other scheme:// URI
  • empty string (output then errors with โ€œOutput path is empty.โ€)

Source must already be a file on disk. Outputโ€™s parent folder is created if needed. GotCompressed returns the absolute path that was written.