1GDCMPDF(1)                    DICOM Manipulation.                   GDCMPDF(1)
2
3
4

NAME

6       gdcmpdf - Tool to convert PDF to PDF/DICOM.
7

SYNOPSIS

9           gdcmpdf [options] file-in file-out
10

DESCRIPTION

12       The gdcmpdf tool convert a PDF file (any PDF version) into an
13       encapsulated PDF/DICOM file. By default it will try to read the PDF
14       meta information stored in the PDF and convert this information to some
15       specific DICOM fields (see below). However it may fails (eg. wrong
16       password on encrypted PDF file) in which case empty value are used.
17

PARAMETERS

19           file-in   PDF input filename
20
21           file-out  DICOM output filename
22

OPTIONS

24   general options
25             -h   --help
26                    print this help text and exit
27
28             -v   --version
29                    print version information and exit
30
31             -V   --verbose
32                    verbose mode (warning+error).
33
34             -W   --warning
35                    warning mode, print warning information
36
37             -E   --error
38                    error mode, print error information
39
40             -D   --debug
41                    debug mode, print debug information
42

USAGE EXAMPLE

44           $ wget http://gdcm.sourceforge.net/gdcm.pdf
45           $ gdcmpdf gdcm.pdf gdcm.dcm
46
47       To re-extract the encapsulated PDF file:
48
49            $ gdcmraw -i gdcm.dcm -t 42,11 -o gdcm.dcm.pdf
50            $ diff gdcm.pdf gdcm.dcm.pdf
51

PDF INFO MAPPING

53       Here is how the PDF info is mapped to DICOM information (typical
54       pdfinfo output):
55
56           Title:          GDCM Reference Manual
57           Subject:        Grassroots DICOM API reference
58           Keywords:       GDCM,DICOM,JPEG,Lossless JPEG,JPEG-LS,J2K,JPEG 2000,RLE
59           Author:         Mathieu Malaterre and co.
60           Creator:        LaTeX with hyperref package
61           Producer:       pdfeTeX-1.21a
62           CreationDate:   Tue Apr 28 15:34:26 2009
63           Tagged:         no
64           Pages:          1188
65           Encrypted:      no
66           Page size:      612 x 792 pts (letter)
67           File size:      13756841 bytes
68           Optimized:      yes
69           PDF version:    1.4
70
71       Converted to DICOM this leads to:
72
73           # Dicom-Data-Set
74           # Used TransferSyntax: Little Endian Explicit
75           (0008,0005) CS [ISO_IR 100]                             #  10, 1 SpecificCharacterSet
76           (0008,0012) DA [20090428]                               #   8, 1 InstanceCreationDate
77           (0008,0013) TM [182550.302631]                          #  14, 1 InstanceCreationTime
78           (0008,0016) UI =EncapsulatedPDFStorage                  #  30, 1 SOPClassUID
79           (0008,0018) UI [1.2.826.0.1.3680043.2.1143.776842935192792959289022034349197114] #  64, 1 SOPInstanceUID
80           (0008,0020) DA [20090428]                               #   8, 1 StudyDate
81           (0008,0023) DA [20090428]                               #   8, 1 ContentDate
82           (0008,002a) DT [20090428153437.000000]                  #  22, 1 AcquisitionDateTime
83           (0008,0030) TM [182550.302160]                          #  14, 1 StudyTime
84           (0008,0033) TM [153426.000000]                          #  14, 1 ContentTime
85           (0008,0050) SH (no value available)                     #   0, 0 AccessionNumber
86           (0008,0060) CS [OT]                                     #   2, 1 Modality
87           (0008,0064) CS [WSD]                                    #   4, 1 ConversionType
88           (0008,0070) LO [LaTeX with hyperref package]            #  28, 1 Manufacturer
89           (0008,0090) PN (no value available)                     #   0, 0 ReferringPhysiciansName
90           (0010,0010) PN [Mathieu Malaterre and co.]              #  26, 1 PatientsName
91           (0010,0020) LO (no value available)                     #   0, 0 PatientID
92           (0010,0030) DA (no value available)                     #   0, 0 PatientsBirthDate
93           (0010,0040) CS (no value available)                     #   0, 0 PatientsSex
94           (0018,1020) LO [pdfeTeX-1.21a]                          #  14, 1 SoftwareVersions
95           (0020,000d) UI [1.2.826.0.1.3680043.2.1143.1868121832223417351654232480755123133] #  64, 1 StudyInstanceUID
96           (0020,000e) UI [1.2.826.0.1.3680043.2.1143.1330099150825746617507846107663964311] #  64, 1 SeriesInstanceUID
97           (0020,0010) SH (no value available)                     #   0, 0 StudyID
98           (0020,0011) IS [1]                                      #   2, 1 SeriesNumber
99           (0020,0013) IS [1]                                      #   2, 1 InstanceNumber
100           (0028,0301) CS [YES]                                    #   4, 1 BurnedInAnnotation
101           (0040,a043) SQ (Sequence with explicit length #=0)      #   0, 1 ConceptNameCodeSequence
102           (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
103           (0042,0010) ST [GDCM Reference Manual]                  #  22, 1 DocumentTitle
104           (0042,0011) OB 25\\50\\44\\46\\2d\\31\\2e\\34\\0a\\25\\e7\\f3\\cf\\d3\\0a\\33\\32\\30\\37\\37\\20\\30... # 13756842, 1 EncapsulatedDocument
105           (0042,0012) LO [application/pdf]                        #  16, 1 MIMETypeOfEncapsulatedDocument
106
107           $ stat gdcm.pdf
108             File: `gdcm.pdf'
109             Size: 13756841        Blocks: 26912      IO Block: 4096   regular file
110           Device: fe01h/65025d    Inode: 2675750     Links: 1
111           Access: (0644/-rw-r--r--)  Uid: ( 1002/mmalaterre)   Gid: ( 1002/mmalaterre)
112           Access: 2009-04-28 16:05:00.000000000 +0200
113           Modify: 2009-04-28 15:34:37.000000000 +0200
114           Change: 2009-04-28 16:05:00.000000000 +0200
115
116       Explanation for the different Date/Time mappings:
117
118       •   Study Date/Time, Instance Creation Date/Time are both equal to the
119           current time gdcmpdf tool was run,
120
121       •   Acquisition Date Time is set to the Modify Time of the actual PDF
122           file,
123
124       •   Content Date/Time are set from the actual PDF header info:
125           CreationDate.
126
127

SEE ALSO

129       gdcmconv(1), gdcmraw(1), pdfinfo(1)
130

AUTHOR

132       Mathieu Malaterre
133           Main developer
134
136       Copyright © 2006, 2011 Mathieu Malaterre
137
138
139
140GDCM 3.0.12                       08/02/2022                        GDCMPDF(1)
Impressum