Create tracking metadata¶
This operation composes the file-name prefix convention that carries tracking metadata (application code, conversion type, imaging intent, and file id) across the PDF platform.
| Field | Value |
|---|---|
| Operation ID | OP-12 |
| Trigger | Caller invokes PdfTrackingMetadata.Create(Guid fileId, string applicationCode = "AUTO", PdfConversionType conversionType = Convert, bool shouldBeImaged = false) |
| Inputs | File id, application code, conversion type, imaging flag |
| Outputs | Populated PdfTrackingMetadata with a composed FilePrefix |
| Primary components | PdfAPI.Core.PdfTrackingMetadata.Create |
| Entry point | PdfAPI.Core\PdfTrackingMetadata.cs |
Steps¶
- Populate
ApplicationCode(default"AUTO"),ConversionType,FileId, andShouldBeImaged. (BR-31) - Compose the file prefix:
"A"when the conversion type isConvert, otherwise"M". (BR-32) - Append
"I"when the file should be imaged, otherwise"E". (BR-33) - Append
{applicationCode}_and then the file id, and assign the result toFilePrefix. (BR-34)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["Create(fileId, appCode,<br>conversionType, shouldBeImaged)"]) --> Populate["Populate fields<br>with defaults"]
Populate --> Type{conversionType<br>== Convert?}
Type -->|Yes| A["'A'"]
Type -->|No| M["'M'"]
A --> Imaged{shouldBeImaged?}
M --> Imaged
Imaged -->|Yes| I["append 'I'"]
Imaged -->|No| E["append 'E'"]
I --> Append["append appCode_fileId"]
E --> Append
Append --> Return([FilePrefix assigned])
Failure and edge-case behavior¶
- No validation of
fileId,applicationCode, or numeric overflow is performed during composition.
Related documentation¶
Sources¶
PdfAPI.Core\PdfTrackingMetadata.cs