Attaching PDFs and images to a DICOM study in Orthanc: when it is worth doing
Orthanc can wrap a signed report, scanned referral or clinical photo as a DICOM instance through its REST API, so the document is stored, indexed and retrieved alongside the imaging study it belongs to. This is worth doing when the document has to reach the people and systems that already open the study in DICOM viewers, and when keeping a separate file share would leave two copies that drift apart. It is a poor fit when the document is only needed by staff who work in a records system, because wrapping it adds a second copy and a new identifier that someone must maintain.
The Orthanc Book is the reference for this work, and it documents the REST routes that create a DICOM instance from an encapsulated file, along with the fields the request must carry. Before you script anything, confirm the route name, accepted file types and required tags against the documentation for the exact Orthanc version you run. The core rewrote storage access and DICOM parsing and transcoding in 1.13.0, released on 2026-08-15, so a wrapping script you tested on 1.12.11 should be retested on 1.13.0 before you rely on its output. Record the version in your change request so the auditor and the next engineer know what produced the file.
The result also depends on the viewers and receivers in use, and a wrapped document does not display the same way everywhere. Viewers can differ in whether they open an encapsulated PDF, display it as an image or skip it, and a downstream PACS, modality or teleradiology platform may reject, strip or re-label the object. Before you commit, open the study in each viewer your radiologists use, send the instance through every route you plan to use, and check that the study still loads and the document still appears on the far side. Ask each viewer vendor and receiver administrator in writing how they handle encapsulated documents, and decide who owns the wrapped copy if a correction is needed later.
Which document format and linking approach fits your studies
This table compares three ways to attach a report, scanned form or photo to an imaging study in Orthanc: an encapsulated PDF, an image object, and a reference to a file kept in a document system. Read each column as one option and each row as one question to answer before you build. The main takeaway is that the first two options keep the document inside the study, while the reference option keeps it outside, which changes what viewers and PACS can show.
| Criterion | Encapsulated PDF instance | Image object (JPEG or scan) | Document system with reference |
|---|---|---|---|
| What the viewer and PACS must display | The viewer and PACS must render encapsulated PDF; confirm this with each system before relying on it | Any viewer that displays the image; content appears as a picture, not as selectable text | The viewer shows only a pointer, so it needs access to the document system to open the file |
| Editable or fixed | Fixed once stored; a correction needs a new instance and a clear replacement rule | Fixed pixels; a correction means a new image object, and burned-in text cannot be edited | Editable in the document system, so the study can point to a changing file; define version control |
| Identifier matching | Patient and study identifiers must be set in the DICOM header to match the study before storage | Patient and study identifiers must be set in the DICOM header; text in the pixels does not link the image | The stored reference must carry the patient and study keys, and both systems must resolve them the same way |
| Maintenance effort | A conversion step per document plus header checks; low ongoing effort once the routine works | A conversion step per image and a chosen image format; effort grows with the number of scans | Two systems to keep in sync, access rules and link checks; the highest ongoing effort |
| Version dependence | Confirm the document storage class and required tags for your Orthanc version | Confirm the upload route and required tags for your Orthanc version | Confirm the reference fields and any metadata routes for your Orthanc version |
Every attached document passes an identifier check before it joins the study
The path starts at a scanner or source system that sends a PDF or JPEG to a script or client on the Orthanc host. That client authenticates to the Orthanc REST API, which wraps the file as a DICOM instance. Before storage, Orthanc compares the patient and study identifiers on the new instance with the existing patient and study. A mismatch can be rejected or held for review, so check the identifier rules before you automate uploads. Once stored, the study can be forwarded to viewers or peers. The boundary around the Orthanc host and the authenticated API client marks where access controls and audit logging must apply.
Document path from source system through the authenticated API client to the study.
Identifier and tag decisions that decide where the document lands
A PDF or image joins a study only when its identifiers, dates and tags agree with what the PACS and RIS already hold. Each of the six decisions below controls whether the document lands on the right patient, appears in the report workflow and stays readable after it is stored.
Patient identifier matching
The PatientID, together with its issuer, is the key the PACS uses to decide whether an incoming PDF or image belongs to an existing patient. If the value carries stray spaces, dropped leading zeros or a different issuer, the document creates a duplicate patient that clinicians never open. Confirm with the RIS which identifier it sends, whether the PACS treats the issuer as part of the match key, and how the source system formats its numbers before the first document is pushed.
Study Instance UID and accession number
The new instance has to join the study the radiologist is reading, so it must reuse that study's Study Instance UID. Generating a fresh UID creates a second study, and that is the usual cause of a document invisible to the report workflow. Matching on the accession number alone is fragile because the same number can appear on several orders after a correction. Ask the RIS which accession number is authoritative and confirm the PACS links the study to the order it displays.
Series number for the new instance
The PDF or image needs its own series, identified by a SeriesNumber that does not collide with any series already in the study. Reusing an existing number may merge the new instance into an unrelated series, or overwrite it on re-send, depending on how the receiving system keys instances. Confirm the numbering convention the site uses for scanned documents, and check how the viewer orders series so the new series appears where clinicians expect it.
Private tags for source and document type
Standard DICOM attributes have no clean place for the source system name or the document type, so teams often store them in private tags under a private creator identifier. If two integrations claim the same private group and element, one silently overwrites the other, and filters on document type return the wrong set. Agree the private creator string and element layout with the PACS team in writing, and confirm that the PACS, any anonymization step and any export keep these tags intact.
Date and time values
The dates written to the new instance decide where it sorts in the study list and in reports. A content date written in the source system's local time, read by a PACS in another time zone, can move a scanned report to the previous day. An empty or malformed time attribute can push it to the top or bottom of the list. Confirm the time zone the RIS and source system use, which date the PACS displays, and the exact format each system expects.
Character set for patient names
The SpecificCharacterSet attribute tells every receiving system how to decode patient names, and it must match the bytes actually written. A name with accents or non-Latin characters declared under the wrong character set arrives as garbled names, and the PACS may fail to match it to the existing patient. Confirm which character set the RIS sends, whether the source system transliterates names, and test one accented name end to end in a staging PACS before production use.
How to set up document attachment step by step
This sequence takes a lab Orthanc instance from a version check to a production flow that attaches PDFs and images to the correct patient and study. Each step closes with a check you can repeat, so the conversion client, identifier rules and access controls are proven before any patient document reaches the archive.
Confirm the Orthanc version and route
Your platform team confirms which Orthanc release the lab instance runs, then reads the Orthanc Book documentation for that release to find the REST route that creates DICOM instances from a document. Record the version and route in the change ticket, because the request format should be checked against the documentation for your specific release. Done when the lab instance reports the expected version and the route accepts a test request that returns an identifier for a new instance.
Agree identifier mapping with each source
The imaging informatics lead and each source system owner agree which metadata field supplies the patient identifier, which supplies the accession or study identifier, and which issuer applies to each. They also agree which private tags record the source system and document type, and what happens when an identifier is missing or does not match. Write the mapping as a table and have both owners sign it. Done when a sample record from each source maps to exactly one patient and one study, and unmatched records go to a review queue and are not attached.
Create a service account for conversion
Your identity team creates a dedicated Orthanc user for the conversion client, stores its credential in your secrets manager, and grants access only to the operations the client needs. If you use the advanced authorization plugin, confirm its rules for this account. Keep routes that run system commands or overwrite files disabled, as the Orthanc Book security FAQ advises. Done when the account can create instances in the lab instance, and a request with a missing or wrong credential is refused.
Test with a non-patient sample document
The conversion engineer converts a sample document that contains no patient data, such as a blank form or a generated test page, through the creation route. Use one JPEG and one PDF so both paths are covered. Record the returned identifiers and the stored DICOM tags, including the modality and SOP class the instance receives. Done when the file opens in a DICOM viewer, the document renders correctly, and the tags hold no unexpected patient data.
Verify placement under the expected study
The conversion engineer and a radiology informatics reviewer check that the test instance appears under the patient and study chosen by the identifier mapping. Use synthetic identifiers for this check, and view the result in Orthanc Explorer 2 or another viewer that reads the same server. Compare patient name, identifier, study date and accession with the source record, then repeat the test with a record that has a missing identifier. Done when every test record lands in the expected study and the unmatched record appears in the review queue, with results written to the test log.
Configure HTTPS and authentication
Your platform team enables authentication on the Orthanc server, defines the registered users, and places the API behind HTTPS. When the server is reachable beyond localhost, a reverse proxy is a common way to terminate TLS, and the Orthanc Book security FAQ recommends HTTPS for any Internet exposure. Confirm the certificate chain against the conversion client's trust store. Done when an unauthenticated request is refused and the conversion client completes a test conversion over HTTPS with a valid certificate.
Pilot with a small batch of documents
The team selects a small set of documents from one source system, chosen together with that system's owner, and converts them using the production configuration. Clinical and records staff review that each document sits in the expected study, and the conversion log holds an entry for every input. Compare the counts of input documents, created instances and review-queue items. Done when the counts reconcile for every document and reviewers sign off on placement, with any mapping defects fixed and retested before the next step.
Roll out to remaining source systems
The team extends the conversion client to the remaining source systems in the order agreed with each owner, reusing the same mapping table, service account and HTTPS configuration. Operations sets up monitoring of the conversion log, the review queue and Orthanc's own logs, and assigns a named owner for unmatched records. Done when each source system has a signed mapping, the reconciliation check passes for each source, and the review queue has an owner and a documented response process.
Why receiving viewers and PACS decide whether the attachment is useful
A stored PDF or image helps only if the systems that read the study display it or pass it on. Start with the viewers. Confirm whether each one renders encapsulated documents, since a viewer may list the object without opening it or skip it entirely. Then check each peer PACS: its storage SCP must accept the SOP class of the new instance, or the transfer fails or the object is dropped. Finally, review how queries and retrievals treat the new instance. Study-level C-FIND results, series counts, and C-MOVE or C-GET retrievals can change once a non-image object joins the study, and some receivers filter on modality or series description. The Orthanc plugins page lists the official web viewers, a useful starting point for your own viewer checks.
Confirm each vendor's behavior with that vendor, in writing where possible. The DICOM conformance statement lists the SOP classes and transfer syntaxes a system accepts, and viewer support often depends on the software version, so record the exact version you tested. Ask specifically about encapsulated PDF and JPEG objects, and whether they appear in study-level queries. Then run a test transfer to every receiver before go-live. Send one encapsulated PDF and one JPEG-based object, open each on every viewer, confirm that patient and study identifiers match the parent study, and run a C-FIND from each receiver to see whether the new series is listed. Keep the results with the change record, because a receiver that rejects an object may not report the failure back to the sender.
Security controls to set before documents reach patient studies
Orthanc is safe to run for attachments only after a few settings are fixed, and most of them are decided before the first PDF is uploaded. The cards below cover the access, transport, routing, identity and forwarding choices that determine who can reach patient studies and what an upload can do to the server. Each card names the decision to make and the check to run before go-live.
Remote access and authentication
By default, Orthanc accepts HTTP connections only from localhost, so remote access is a deliberate change. Setting RemoteAccessAllowed to true opens the REST API to the network, and the Security FAQ expects AuthenticationEnabled to be true with each user defined in RegisteredUsers. Decide which people and services need API access before you open the port. Remove any sample user from the copied configuration, then confirm from another network location that unauthenticated requests are refused.
Security FAQHTTPS through a reverse proxy
The Security FAQ recommends HTTPS and a reverse proxy when Orthanc is exposed to the Internet, and the same reasoning applies to shared hospital networks where credentials cross the wire. Terminate TLS at the proxy and make sure Orthanc itself is reachable only through that proxy. Limit the proxy to the routes your clients use. Confirm that Orthanc Explorer 2 and the REST API both work through the proxy, and record who owns the certificate and how it is renewed.
Disable script and export routes
The /tools/execute-script route can let a malicious user run any system command on the host, and the export route can overwrite files. Keep both disabled in production, and confirm that your attachment workflow does not call either one. Recheck the disabled state after every upgrade and container rebuild, because a copied configuration can re-enable them without notice. Test with an authenticated client that each route refuses the request.
Dedicated service account for conversion
The conversion client should authenticate with its own Orthanc user, with no shared administrator login. A separate account limits what a leaked credential can do, and it lets you trace each attachment to the process that created it. Decide whether the account can read every study or only the studies it writes. You can also add the advanced authorization plugin, which forwards each request's token to an external service that returns HTTP 403 when access is denied. Store the account password in your secrets manager.
Authorization plugin docsPatient data in private tags and file names
Matching a PDF or photo to a study means writing identifiers into the new instance, and the same values can leak through file names, log lines and the tags that viewers display. Decide which values go in standard DICOM attributes and which go in private tags, and document the creator of each private tag. Keep patient names and identifiers out of uploaded file names. Check that each attachment carries the same patient and study identifiers as the study it joins, and plan how private tags are handled when studies are later anonymized.
DICOM TLS for forwarding
Orthanc supports DICOM TLS for inter-site exchanges, which protects attachments sent to a PACS or peer from being read in transit. TLS must be configured on both ends, and each side has to trust the other's certificate, so this is a joint task with the receiving site. Decide which peers must use TLS, who issues and renews the certificates, and how failed handshakes are reported. Send one test attachment over TLS before enabling the route for routine traffic.
- DICOM TLS from
- 1.9.0
What buyers ask before attaching documents to DICOM studies
What makes document attachment to imaging studies take more effort?
Effort depends mainly on four drivers: the number of document types, identifier mapping complexity, viewer and PACS testing, and documented validation. Each document type (scanned reports, photos, multi-page PDFs) needs its own encapsulation rule and metadata set. Identifier mapping is often the largest driver: if the source system uses different patient or accession numbers than the PACS, every rule needs a lookup that someone has tested. Viewer and PACS testing adds time because a file can store correctly yet fail to display in the viewer radiologists actually use. Documented validation is the last driver, since clinical and compliance reviewers will ask how each mapping was checked. Ask any partner to break its quote down by these four drivers so you can compare like with like.
Can an in-house team build this from the Orthanc Book and REST API?
Often yes, if your team already runs Orthanc and has people comfortable with DICOM attributes and scripting against the REST API. The Orthanc Book and API reference cover the building blocks, and a proof of concept on a test server is a sensible first step. The harder work sits outside the documentation: deciding which identifiers link a document to a study, handling conflicts and missing values, confirming which viewers display the result, and keeping the process working after Orthanc and plugin upgrades. Teams new to DICOM tend to underestimate the validation evidence that clinical and compliance reviewers request. Build your internal estimate against the same list of tasks a partner would quote, then decide where your staff are the better fit and where outside help reduces risk.
What do we need to provide before an Orthanc document project starts?
Start with sample documents: a set covering every document type, including poor scans, unusual page sizes and documents with missing identifiers. Provide the identifier rules that match documents to patients and studies, and state which system is authoritative when identifiers disagree. Give the team access to a test PACS and to the viewers your clinicians use, so display can be checked outside production. Name a clinical owner who approves which document types are allowed and signs off test results. Confirm who may handle sample documents, because scanned reports contain patient data and need the same access controls as production. Your IT team should also confirm change windows and backup arrangements for the Orthanc server before build work starts.
How long does an Orthanc document attachment project usually take?
Duration depends on scope, so no single figure applies to every organization. The main variables are how many document types are involved, how many identifier rules must be built and tested, how many viewers and PACS need checks, and how much validation evidence your clinical and compliance teams require. One document type going into one tested viewer is a much smaller job than several types feeding multiple sites. Your inputs also set the pace: sample documents, identifier rules and a named clinical owner must arrive before build and testing can finish. Ask any partner for a schedule tied to written milestones, with the assumptions listed beside each one, so you can see which of your inputs would move the date.
Does Orthanc charge a license fee for attaching documents to studies?
No, Orthanc has no paid edition, so there is no license fee to buy for the core server. The Orthanc core is licensed GPLv3 or later, while scalability and cloud plugins, such as the PostgreSQL and web viewer plugins, are licensed AGPLv3 or later. Those licenses may carry obligations of their own, such as source-sharing duties for modified versions, so have your legal team review them against how you plan to run the system. The costs you do pay are for people: your engineers' time, or services from Orthanc Team SRL, which sells deployment, configuration and development work, including pre-paid dedicated support hours valid for 12 months, quoted on request. Check the Orthanc Book licensing FAQ before you finalize your plan.
What does a fixed-scope engagement cover for Orthanc document attachment?
A fixed-scope engagement covers the scope, deliverables and timeline agreed in writing before work starts. For this topic, that scope should name the document types, the identifier mapping rules, the Orthanc configuration and integration work, the viewer and PACS tests, the validation records and the handover documents. DeployOpen plans, implements, integrates, documents and supports self-hosted open-source platforms inside your own infrastructure, so the Orthanc server, its data and its credentials stay in your environment. Work outside the written scope, such as extra document types or additional viewers, should be quoted as a change. A quote follows from the written scope, and DeployOpen does not publish a price list. Ongoing support, upgrades and continuous testing are available as retainers.
How should we test attached documents before clinicians rely on them?
Test each document type from intake through matching, storage, retrieval and display in every viewer your clinicians use. Include negative cases, such as documents with missing or conflicting identifiers, and confirm they are held for review and never attached silently. Record each result with the document type, test date, tester and the clinical owner's sign-off, so compliance reviewers can trace every decision. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue any audit report or certification. Repeat the test after each Orthanc or plugin upgrade, because a version change can alter matching or display. Keep the script execution and export routes disabled while testing runs, as the Orthanc security FAQ advises.
Limits to confirm in your environment before go-live
Encapsulated PDFs and images behave differently in each viewer, PACS and source system, and Orthanc's behavior depends on the release you deploy. The six checks below cover the version, the receiving systems, the source files, identifiers, private tags and lifecycle, and each one is best confirmed on your own test set before anything reaches production.
Orthanc version in use
Orthanc 1.13.0 was released on 2026-08-15 with a rewrite of storage-area access and DICOM parsing and transcoding, so behavior around stored files may differ from 1.12.11. Read the NEWS file for every release between your current version and the one you plan to run. Pin the exact version in your Docker image or package, and rerun the attachment tests after every upgrade, because a change in parsing can alter how an encapsulated file reads back.
Orthanc NEWS fileViewer and PACS support
An encapsulated PDF is stored as a DICOM instance, and some viewers and PACS will display or forward it while others will not. Test each viewer you use, including Orthanc Explorer 2, Stone Web or OHIF if you run them, and each downstream archive that receives your studies over C-STORE or DICOMweb. For each system, record whether the document opens, appears in the series list and survives a round trip. Ask every vendor in writing which encapsulated document types they accept.
Orthanc plugins listSource file limits and throughput
Attaching a file costs time and storage in proportion to its size, so the limits you set must match what your departments produce. Measure the largest and most common PDFs and images from each source, including page count, pixel dimensions and color mode. Run a batch at your expected daily volume on the test set, time each stage from upload to storage, and compare the results with your timeout settings and free disk. Size hardware from these measurements.
Scalability FAQIdentifier quality in source systems
An attached document is useful only when its patient and study identifiers match the images already in Orthanc. Pull a sample of reports from each source system and check for leading zeros, trailing spaces, transliterated names, changed issuer values and missing accession numbers. Decide in advance what happens to a mismatch, whether that is holding it, rejecting it or routing it to a reviewer, and test that identifier mismatch rule with deliberately broken identifiers. Ask each source system owner to confirm the identifier format in writing.
Private tag conventions across vendors
Other vendors write private DICOM tags under their own private creator names, and an attached document can collide with or overwrite those tags. List the private creators present in your sample studies and check whether your anonymization or modification scripts keep or strip them. Confirm that your attachment tags use a private creator reserved for this purpose. Ask each modality and PACS vendor for its private tag documentation, then verify on the test set that no existing tag changes after attachment.
Retention and deletion of attachments
The attached document is stored as a normal instance, so its lifetime follows the study it belongs to unless your retention rules treat it separately. Confirm how a delete propagates to the index, storage area, replicas, backups and peers that received the instance. Check whether your legal hold or retention policy requires the original PDF to be kept unchanged next to the DICOM copy. Test a full delete on the test set and verify that no copy remains anywhere in the chain.
How DeployOpen scopes and delivers document attachment in Orthanc
DeployOpen treats PDF and image attachment as a defined change to your Orthanc deployment, planned against your existing identifier rules, access model and archive. We agree the scope in writing before work starts, then build the conversion and upload path in your infrastructure, test it against your data and hand over the documentation your team needs to run it.
How we scope
- The written scope names the file types, such as PDF and JPEG, and the source of each document.
- It sets how each attachment finds its patient and study, including the identifier rules you already use.
- Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts.
How we build
- We build the conversion and upload path in a test Orthanc instance before it touches production archives.
- Encapsulated PDFs and images are checked for the right SOP class, patient and study keys, and series numbering.
- Scripts and REST calls are kept in your version control and tested against the Orthanc version you run.
How we hand over
- Handover covers the upload script, configuration, identifier mapping and a runbook for your imaging staff.
- We document how each attachment is stored, queried and shown in viewers, based on the tests we ran.
- Your team receives the evidence of tests run on your data, ready to share with internal reviewers.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, including Orthanc version upgrades.
- Attachment rules are reviewed when your identifier policy, viewers or Orthanc version change.
- Ask which Orthanc release, plugins and database back end the retainer covers before signing.

