Commit 86dbc5f6 authored by Yury G. Kudryashov's avatar Yury G. Kudryashov Committed by Albert Astals Cid

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
parent 2724a7b9
......@@ -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)
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment