how to use dcm2pdf ?

91 views
Skip to first unread message

Tatsuaki

unread,
Sep 1, 2021, 7:00:53 PM9/1/21
to dcm4che
Hello,

I tried pdf2dcm, but getting this error.

C:\Users\tatsu>pdf2dcm -m PatientID=123456789 -m PatientSex=M -- C:\Users\tatsu\OneDrive\Desktop\PDF2DCM_TEST.pdf C:\Users\tatsu\OneDrive\Desktop\PDF2DCM_TEST.dcm
pdf2dcm: 123456789
java.lang.IllegalArgumentException: 123456789
        at org.dcm4che3.tool.common.CLIUtils.toTag(CLIUtils.java:670)
        at org.dcm4che3.tool.common.CLIUtils.toTags(CLIUtils.java:660)
        at org.dcm4che3.tool.common.CLIUtils.addAttributes(CLIUtils.java:788)
        at org.dcm4che3.tool.pdf2dcm.Pdf2Dcm.createStaticMetadata(Pdf2Dcm.java:199)
        at org.dcm4che3.tool.pdf2dcm.Pdf2Dcm.initialize(Pdf2Dcm.java:188)
        at org.dcm4che3.tool.pdf2dcm.Pdf2Dcm.main(Pdf2Dcm.java:98)

What am I wrong?
PDF2DCM_TEST.pdf

Gunter Zeilinger

unread,
Sep 2, 2021, 9:55:44 AM9/2/21
to dcm4che
Guess Windows command line processor treats '=' as argument delimiters. Try to quote PatientID=123456789 and PatientSex=M, e.g.


pdf2dcm -m 'PatientID=123456789' -m 'PatientSex=M' -- C:\Users\tatsu\OneDrive\Desktop\PDF2DCM_TEST.pdf C:\Users\tatsu\OneDrive\Desktop\PDF2DCM_TEST.dcm



Tatsunidas

unread,
Sep 8, 2021, 8:46:40 AM9/8/21
to dcm...@googlegroups.com
I stole your time...Sorry.
Now, I could create a dcm file (then, create a pdf from that, and could show it on JPanel.).

Thank you.

2021年9月2日(木) 22:55 'Gunter Zeilinger' via dcm4che <dcm...@googlegroups.com>:
--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/GumrsU0vHx4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/5898fadc-1ced-4864-9733-8d62a1f6eee0n%40googlegroups.com.


--
==========================================
Tatsuaki KOBAYASHI
==========================================
Reply all
Reply to author
Forward
0 new messages