summaryrefslogtreecommitdiff
path: root/apps/pdfshow.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-06-21 16:35:52 +0200
committerTor Andersson <tor@ghostscript.com>2010-06-21 16:35:52 +0200
commit81b0ca05fb486e286882c00417885e72eb6e48e2 (patch)
treec9035295dce8d2e579a2d13c673c8735d0e625dc /apps/pdfshow.c
parent57a151c204fed4935a11aa3fb2340df359d9c115 (diff)
downloadmupdf-81b0ca05fb486e286882c00417885e72eb6e48e2.tar.xz
Change pdfshow default to print streams decompressed.
Diffstat (limited to 'apps/pdfshow.c')
-rw-r--r--apps/pdfshow.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/pdfshow.c b/apps/pdfshow.c
index ba2d51f6..e73f0644 100644
--- a/apps/pdfshow.c
+++ b/apps/pdfshow.c
@@ -5,15 +5,15 @@
#include "pdftool.h"
static int showbinary = 0;
-static int showdecode = 0;
+static int showraw = 0;
static int showcolumn;
static void showusage(void)
{
- fprintf(stderr, "usage: pdfshow [-bx] [-p password] <file> [xref] [trailer] [object numbers]\n");
- fprintf(stderr, " -b \tprint streams as raw binary data\n");
- fprintf(stderr, " -x \tdecompress streams\n");
- fprintf(stderr, " -p \tdecrypt password\n");
+ fprintf(stderr, "usage: pdfshow [-bc] [-p password] <file> [xref] [trailer] [object numbers]\n");
+ fprintf(stderr, " -b \tprint streams as binary data (don't pretty-print)\n");
+ fprintf(stderr, " -c \tprint compressed streams (don't decompress)\n");
+ fprintf(stderr, " -p \tpassword for encrypted files\n");
exit(1);
}
@@ -66,10 +66,10 @@ static void showstream(int num, int gen)
showcolumn = 0;
- if (showdecode)
- error = pdf_openstream(&stm, xref, num, gen);
- else
+ if (showraw)
error = pdf_openrawstream(&stm, xref, num, gen);
+ else
+ error = pdf_openstream(&stm, xref, num, gen);
if (error)
die(error);
@@ -125,13 +125,13 @@ int main(int argc, char **argv)
char *password = "";
int c;
- while ((c = fz_getopt(argc, argv, "p:bx")) != -1)
+ while ((c = fz_getopt(argc, argv, "p:bc")) != -1)
{
switch (c)
{
case 'p': password = fz_optarg; break;
case 'b': showbinary ++; break;
- case 'x': showdecode ++; break;
+ case 'c': showraw ++; break;
default:
showusage();
break;