RAR4 comic with JPEG pages
- Input
- Planet Comics #35 (Fiction House, 1945, public domain), an 18,571,883-byte RAR4 .cbr of 52 JPEG scans.
- Output
- 19,460,543-byte PDF, 52 pages, in 0.9 s; scans embedded unchanged.
CBR → PDF opens the RAR archive in memory and lays the scans out one per page, which matters because phones, tablets and print shops open PDF but rarely RAR.
From real runs
| Element | Result | What happens |
|---|---|---|
| RAR versions | Kept | Both generations opened: Planet Comics #35 is a RAR4 archive of 52 pages and The Travels of Timmy Toodles a RAR5 archive of 28. |
| Files with the wrong extension | Kept | We read the file signature, not the name. A Terrors of the Jungle #21 download called .cbz was really a RAR archive and converted like any CBR. |
| Reading order | Kept | That archive stored page 3 first and page 1 near the end; sorting by number put the cover first and the inside-cover advertisement second, as printed. |
| JPEG scans | Kept | The 52 Planet Comics scans went into the PDF without being decoded or recompressed, so each page holds exactly the pixels of the scan. |
| PNG scans | Changed | PNG pages stay lossless but are recompressed: Timmy Toodles took 18.8 s and its 40.1 MB of page images became a 32.3 MB PDF. |
| Page sizes | Changed | Pages are sized from their pixels at 150 DPI. Planet Comics has a 1024-pixel-wide cover and 800-pixel inside pages, so the cover page is wider than the rest. |
| Checksum and thumbnail files | Lost | The .SFV checksum list in the Terrors archive, Thumbs.db and similar files are not pages and are left out. |
| Password-protected or split archives | Lost | We cannot decrypt RAR files, and the first part of a split set (.part1.rar) would give missing pages, so both are refused with a message. |
Both generations opened: Planet Comics #35 is a RAR4 archive of 52 pages and The Travels of Timmy Toodles a RAR5 archive of 28.
We read the file signature, not the name. A Terrors of the Jungle #21 download called .cbz was really a RAR archive and converted like any CBR.
That archive stored page 3 first and page 1 near the end; sorting by number put the cover first and the inside-cover advertisement second, as printed.
The 52 Planet Comics scans went into the PDF without being decoded or recompressed, so each page holds exactly the pixels of the scan.
PNG pages stay lossless but are recompressed: Timmy Toodles took 18.8 s and its 40.1 MB of page images became a 32.3 MB PDF.
Pages are sized from their pixels at 150 DPI. Planet Comics has a 1024-pixel-wide cover and 800-pixel inside pages, so the cover page is wider than the rest.
The .SFV checksum list in the Terrors archive, Thumbs.db and similar files are not pages and are left out.
We cannot decrypt RAR files, and the first part of a split set (.part1.rar) would give missing pages, so both are refused with a message.
We converted our Comic Book RAR (CBR) sample (4.9 MB) with Image engine on 2026-10-20. It took 186 ms and produced a 4.9 MB PDF file, about the same size as the input. The engine raised no warnings.
Input · sample.cbr · 4.9 MB
5,092,885 bytes
Output · sample.pdf · 4.9 MB
PDF 1.7, 7 pages, no text layer, 7 image objects
bsdtar and img2pdf
mkdir pages && bsdtar -xf comic.cbr -C pages && find pages -type f -iname '*.jpg' -print0 | sort -zV | xargs -0 img2pdf -o comic.pdfbsdtar comes with libarchive and reads RAR4 and most RAR5 files but not encrypted ones. Extract into an empty folder, since an untrusted archive writes files to disk.
unar (The Unarchiver)
unar -o pages comic.cbrAn alternative extractor; version 1.10.1 failed on a solid RAR5 test archive that bsdtar read, so check the page count afterwards.
The HTTP API and the MCP server run the exact engine this page uses (Image engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=cbr&to=pdf.
curl -X POST https://filetypeconverters.com/api/v1/convert \
-H "Authorization: Bearer $FTC_API_KEY" \
-F "file=@input.cbr" -F "from=cbr" -F "to=pdf" \
-F 'options={"width":0}' \
--output output.pdf| Key | Applies to | Type | Default |
|---|---|---|---|
| width | Writing PDF | number | 0 |
| height | Writing PDF | number | 0 |
| fit | Writing PDF | contain · cover · fill | contain |
| quality | Writing PDF | number | 90 |
| background | Writing PDF | string | #ffffff |
| stripMetadata | Writing PDF | boolean | true |
Only the container. CBZ is a ZIP archive of page images and CBR is a RAR archive of the same kind of images. Many CBR files are really ZIPs and many CBZ files are really RARs; we check the signature and handle either.
Our archive reader cannot decrypt RAR files, and the first part of a split RAR set looks complete but has missing data. Both cases stop with a message instead of producing a PDF with blank or missing pages.
JPEG scans are copied into the PDF as they are. PNG pages have to be decoded and compressed again to stay lossless, about two thirds of a second per full-size page in our tests.