4 \page dcm2pdf Extract PDF file from DICOM encapsulated PDF
6 \page dcm2pdf dcm2pdf: Extract PDF file from DICOM encapsulated PDF
9 \section synopsis SYNOPSIS
12 dcm2pdf [options] dcmfile-in pdffile-out
15 \section description DESCRIPTION
17 The \b dcm2pdf utility reads a DICOM file of the Encapsulated PDF Storage SOP
18 Class (\e dcmfile-in), extracts the embedded PDF document and writes it to an
19 output file (\e pdffile-out). Optionally a command can be executed after the
20 creation of the PDF file.
22 \section parameters PARAMETERS
25 dcmfile-in DICOM input filename
27 pdffile-out PDF output filename
30 \section options OPTIONS
32 \subsection general_options general options
35 print this help text and exit
38 print version information and exit
41 print expanded command line arguments
44 quiet mode, print no warnings and errors
47 verbose mode, print processing details
50 debug mode, print debug information
52 -ll --log-level [l]evel: string constant
53 (fatal, error, warn, info, debug, trace)
54 use level l for the logger
56 -lc --log-config [f]ilename: string
57 use config file f for the logger
60 \subsection input_options input options
65 read file format or data set (default)
71 read data set without file meta information
73 input transfer syntax:
76 use TS recognition (default)
78 -td --read-xfer-detect
79 ignore TS specified in the file meta header
81 -te --read-xfer-little
82 read with explicit VR little endian TS
85 read with explicit VR big endian TS
87 -ti --read-xfer-implicit
88 read with implicit VR little endian TS
90 parsing of odd-length attributes:
92 +ao --accept-odd-length
93 accept odd length attributes (default)
95 +ae --assume-even-length
96 assume real length is one byte larger
98 handling of undefined length UN elements:
101 read undefined len UN as implicit VR (default)
104 read undefined len UN as explicit VR
106 handling of defined length UN elements:
109 retain elements as UN (default)
112 convert to real VR if known
114 automatic data correction:
116 +dc --enable-correction
117 enable automatic data correction (default)
119 -dc --disable-correction
120 disable automatic data correction
122 bitstream format of deflated input:
124 +bd --bitstream-deflated
125 expect deflated bitstream (default)
128 expect deflated zlib bitstream
131 \subsection execution_options execution options
133 -x --exec [c]ommand: string
134 execute command c after PDF extraction
139 Option \e --exec allows for the execution of a certain command line after the
140 creation of the PDF document. The command line to be executed is passed to
141 this option as a parameter. The specified command line may contain the
142 placeholder '\#f', which will be replaced by the PDF filename at run time.
143 The specified command line is executed in the foreground, i.e. \b pdf2dcm will
144 be blocked until the command terminates.
146 \section logging LOGGING
148 The level of logging output of the various command line tools and underlying
149 libraries can be specified by the user. By default, only errors and warnings
150 are written to the standard error stream. Using option \e --verbose also
151 informational messages like processing details are reported. Option
152 \e --debug can be used to get more details on the internal activity, e.g. for
153 debugging purposes. Other logging levels can be selected using option
154 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
155 very severe error events, the application will usually terminate. For more
156 details on the different logging levels, see documentation of module "oflog".
158 In case the logging output should be written to file (optionally with logfile
159 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
160 can be used. This configuration file also allows for directing only certain
161 messages to a particular output stream and for filtering certain messages
162 based on the module or application where they are generated. An example
163 configuration file is provided in <em><etcdir>/logger.cfg</em>).
165 \section command_line COMMAND LINE
167 All command line tools use the following notation for parameters: square
168 brackets enclose optional values (0-1), three trailing dots indicate that
169 multiple values are allowed (1-n), a combination of both means 0 to n values.
171 Command line options are distinguished from parameters by a leading '+' or '-'
172 sign, respectively. Usually, order and position of command line options are
173 arbitrary (i.e. they can appear anywhere). However, if options are mutually
174 exclusive the rightmost appearance is used. This behaviour conforms to the
175 standard evaluation rules of common Unix shells.
177 In addition, one or more command files can be specified using an '@' sign as a
178 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
179 is replaced by the content of the corresponding text file (multiple
180 whitespaces are treated as a single separator unless they appear between two
181 quotation marks) prior to any further evaluation. Please note that a command
182 file cannot contain another command file. This simple but effective approach
183 allows to summarize common combinations of options/parameters and avoids
184 longish and confusing command lines (an example is provided in file
185 <em><datadir>/dumppat.txt</em>).
187 \section environment ENVIRONMENT
189 The \b dcm2pdf utility will attempt to load DICOM data dictionaries specified
190 in the \e DCMDICTPATH environment variable. By default, i.e. if the
191 \e DCMDICTPATH environment variable is not set, the file
192 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
193 into the application (default for Windows).
195 The default behaviour should be preferred and the \e DCMDICTPATH environment
196 variable only used when alternative data dictionaries are required. The
197 \e DCMDICTPATH environment variable has the same format as the Unix shell
198 \e PATH variable in that a colon (":") separates entries. On Windows systems,
199 a semicolon (";") is used as a separator. The data dictionary code will
200 attempt to load each file specified in the \e DCMDICTPATH environment variable.
201 It is an error if no data dictionary can be loaded.
203 \section see_also SEE ALSO
207 \section copyright COPYRIGHT
209 Copyright (C) 2007-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.