Debian Codegraph @

podofo/tools/podofouncompress/podofouncompress.cpp

raw
1 /**
2 * SPDX-FileCopyrightText: (C) 2005 Dominik Seichter <[email protected]>
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
6 #include "Uncompress.h"
7
8 #include <cstdlib>
9 #include <cstdio>
10
11 using namespace std;
12 using namespace PoDoFo;
13
14 void print_help()
15 {
16 printf("Usage: podofouncompress [inputfile] [outputfile]\n\n");
17 printf(" This tool removes all compression from the PDF file.\n");
18 printf(" It is useful for debugging errors in PDF files or analysing their structure.\n");
19 printf("\nPoDoFo Version: %s\n\n", PODOFO_VERSION_STRING);
20 }
21
22 void Main(const cspan<string_view>& args)
23 {
24 if (args.size() != 3)
25 {
26 print_help();
27 exit(-1);
28 }
29
30 UnCompress unc;
31
32 auto input = args[1];
33 auto output = args[2];
34
35 unc.Init(input, output);
36
37 printf("%s was successfully uncompressed to: %s\n", input.data(), output.data());
38 }
39