extractbb, ebb β extract bounding box information from graphics files
| Use Case | Command | Description |
|---|---|---|
| Extract bounding box from JPEG/PNG/PDF | extractbb file.jpg |
Creates .xbb file with bounding box info |
| Verbose output | extractbb -v file.jpg |
Print detailed progress |
| Quiet output | extractbb -q file.jpg |
Suppress all messages |
| Write output to stdout | extractbb -O file.jpg |
Send bounding box data to standard output |
Output in dvipdfm (.bb) format |
extractbb -m file.jpg |
Use legacy ebb format |
Output in dvipdfmx (.xbb) format |
extractbb -x file.jpg |
Default format, also used by pdfTeX |
extractbb [-v|-q] [-O] [-m|-x] file...
For each JPEG, PNG, or PDF file given on the command line, extractbb extracts the bounding box information and writes it into a file with extension .xbb, together with some header information. These files can then be used by dvipdfmx or other programs. For PDF files, the number of pages and the PDF version number are reported as well. The input filename extension may be in upper or lower case.
If called as ebb, the output is written in the βbbβ format (and with extension .bb) as used by dvipdfm. Xbb may be defined as a synonym for extractbb on your system.
-vBe verbose.
-qBe quiet.
-OWrite output to standard output.
-mWrite output in dvipdfmβs βbbβ format.
-xWrite output in dvipdfmxβs βxbbβ format (default), which is the same as that used by pdfTeX.
Here are more details about the bb and xbb formats:
The original ebb (from dvipdfm) ignored density information in bitmap images, and generated bounding boxes with 100px = 72bp = 1in. Unfortunately, screenshots (especially) tend to look bad with this approach.
So, extractbb (from dvipdfmx) uses density information if present. Otherwise, it generates bounding box with 100px = 100bp. This is what pdfTeX does.
There is currently no way to specify which bounding box is taken for PDF files. It will always be the first one from the following list: ArtBox, TrimBox, BleedBox, MediaBox. (Often only MediaBox is defined.) Moreover, the reported bounding box always refers to the first page in a PDF file.
extractbb was written by the DVIPDFMx project team <dvipdfmx AT ktug.kr>, based on the program ebb by Mark A. Wicks.
This manual page was also written by the DVIPDFMx project team, based on a manual page Frank KΓΌster <frank AT kuesterei.ch> wrote for the Debian GNU/Linux system. It may be used, modified, and/or redistributed by others without contacting the authors.
20120420 20 April 2012 EXTRACTBB(1)
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-05 01:21 @216.73.217.1
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)