summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2013-08-08 20:39:30 +0200
committerAlbert Astals Cid <aacid@kde.org>2013-08-08 20:39:30 +0200
commit86dbc5f6f850ba3919bed9979386e5a4d0e7dba3 (patch)
treefa2ff169b280cb15b72dfafc0e6fe6991d2ee14c
parent2724a7b9f723789491b4991ce7fe0cfa3e5488c3 (diff)
pdfdetach: don't mention xpdfrc
- drop -cfg command line argument; the old code passed its value to GlobalParams constructor which is the data dir, not a cfg file - remove corresponding lines from pdfdetach.1 - fix '-enc' documentation in pdfdetach.1
-rw-r--r--utils/pdfdetach.123
-rw-r--r--utils/pdfdetach.cc6
2 files changed, 5 insertions, 24 deletions
diff --git a/utils/pdfdetach.1 b/utils/pdfdetach.1
index c80dde72..2bba58b5 100644
--- a/utils/pdfdetach.1
+++ b/utils/pdfdetach.1
@@ -11,14 +11,6 @@ extractor (version 3.03)
.B Pdfdetach
lists or extracts embedded files (attachments) from a Portable
Document Format (PDF) file.
-.SH CONFIGURATION FILE
-Pdfdetach reads a configuration file at startup. It first tries to
-find the user's private config file, ~/.xpdfrc. If that doesn't
-exist, it looks for a system-wide config file, typically
-/usr/local/etc/xpdfrc (but this location can be changed when pdfinfo
-is built). See the
-.BR xpdfrc (5)
-man page for details.
.SH OPTIONS
Some of the following options can be set with configuration file
commands. These are listed in square brackets with the description of
@@ -44,12 +36,8 @@ Set the file name used when saving an embedded file with the "\-save"
switch, or the directory used by "\-saveall".
.TP
.BI \-enc " encoding-name"
-Sets the encoding to use for text output (embedded file names). The
-.I encoding\-name
-must be defined with the unicodeMap command (see
-.BR xpdfrc (5)).
-This defaults to "Latin1" (which is a built-in encoding).
-.RB "[config file: " textEncoding ]
+Sets the encoding to use for text output (embedded file names).
+This defaults to "UTF-8".
.TP
.BI \-opw " password"
Specify the owner password for the PDF file. Providing this will
@@ -58,11 +46,6 @@ bypass all security restrictions.
.BI \-upw " password"
Specify the user password for the PDF file.
.TP
-.BI \-cfg " config-file"
-Read
-.I config-file
-in place of ~/.xpdfrc or the system-wide config file.
-.TP
.B \-v
Print copyright and version information.
.TP
@@ -100,4 +83,4 @@ Cog, LLC.
.BR pdftohtml (1),
.BR pdftoppm (1),
.BR pdftops (1),
-.BR pdftotext (1) \ No newline at end of file
+.BR pdftotext (1)
diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc
index 3fbdfb7e..4f67fd70 100644
--- a/utils/pdfdetach.cc
+++ b/utils/pdfdetach.cc
@@ -14,6 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.org>
+// Copyright (C) 2013 Yury G. Kudryashov <urkud.urkud@gmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -46,7 +47,6 @@ static char savePath[1024] = "";
static char textEncName[128] = "";
static char ownerPassword[33] = "\001";
static char userPassword[33] = "\001";
-static char cfgFileName[256] = "";
static GBool printVersion = gFalse;
static GBool printHelp = gFalse;
@@ -65,8 +65,6 @@ static ArgDesc argDesc[] = {
"owner password (for encrypted files)"},
{"-upw", argString, userPassword, sizeof(userPassword),
"user password (for encrypted files)"},
- {"-cfg", argString, cfgFileName, sizeof(cfgFileName),
- "configuration file to use in place of .xpdfrc"},
{"-v", argFlag, &printVersion, 0,
"print copyright and version info"},
{"-h", argFlag, &printHelp, 0,
@@ -121,7 +119,7 @@ int main(int argc, char *argv[]) {
fileName = new GooString(argv[1]);
// read config file
- globalParams = new GlobalParams(cfgFileName);
+ globalParams = new GlobalParams();
if (textEncName[0]) {
globalParams->setTextEncoding(textEncName);
}