Many organizations—especially those managing large volumes of scanned documents—often need to embed metadata directly into PDF files. This metadata can include document names, scanning equipment used, software versions, scan timestamps, and contractor details. VeryPDF PDFTools offers a powerful and flexible way to do this via command-line automation.
However, some users may encounter issues where the custom metadata does not appear in Adobe Acrobat or causes corruption warnings in NitroPDF Pro. Let’s walk through a real-world scenario, diagnose the problem, and show you how to add custom fields properly.
A Common Customer Issue
A registered customer of VeryPDF PDFTools recently reached out with the following problem:
“I have created a batch file to add custom fields and data to PDFs. The commands seem to work, but when I open the PDFs in Adobe Acrobat, the custom fields don’t appear. In NitroPDF Pro, I get an error saying the file is corrupted and must be fixed. What’s causing this, and how can I fix it?”
The customer provided a batch file that included commands like the following:
@echo off
pdftools.exe -i "example.pdf" -o "updated\example.pdf" -y "Document Name=JDC-C-36-09267-CALEB,Make of Scanner=nextScan,Model of Scanner=FlexScan,Make of Scanner=nextScan FlexScan,Name of Software Used=Auditor,Date/Time of Scan=2025:7:29 14:0:21,Contractor=VeryPDF Inc."
Everything looked syntactically correct—except one critical detail.
Why This Causes Errors in PDF Viewers
The issue lies in the field name "Date/Time of Scan".
While VeryPDF PDFTools supports custom metadata fields, you must avoid using forward slashes ("/") or other special characters in field names, because these characters are reserved in the PDF specification. Specifically, the forward slash is a delimiter used by the PDF language for naming objects, and using it within a custom key can lead to malformed metadata and viewer compatibility issues.
PDF viewers like NitroPDF or Adobe Acrobat may flag these files as corrupted, refuse to show the metadata, or attempt to repair them—leading to the behavior the customer experienced.
The Correct Way to Add Custom Fields
The solution is simple: replace invalid characters with acceptable alternatives, such as spaces or camel case. For instance:
❌ Date/Time of Scan
✅ DateTime of Scan or Date Time of Scan
Here’s the corrected version of the customer's command:
pdftools.exe -i "example.pdf" -o "updated\example.pdf" -y "Document Name=JDC-C-36-09267-CALEB,Make of Scanner=nextScan,Model of Scanner=FlexScan,Make of Scanner=nextScan FlexScan,Name of Software Used=Auditor,DateTime of Scan=2025:7:29 14:0:21,Contractor=VeryPDF Inc."
This updated command ensures the custom fields are written properly, appear in PDF metadata properties, and do not trigger corruption warnings in third-party viewers.
Additional Tips for Adding Metadata with PDFTools
- Use Descriptive, Safe Field Names
Stick to letters, numbers, and spaces. Avoid characters like/,\,:,*,?,",<,>, and|. - Batch Process Safely
When using batch files to update multiple PDFs, always test with a single file first to ensure the metadata is applied correctly. - Check the Output Files
After processing, open your PDFs in Adobe Acrobat or another standards-compliant viewer and check under:
File → Properties → Additional Metadata (or Description tab) - Avoid Redundant Fields
In your original command, you haveMake of Scanner=nextScanandMake of Scanner=nextScan FlexScan. This repetition may be unnecessary. Consider condensing to:
Make and Model of Scanner=nextScan FlexScan
Full Working Example
@echo off
Z:
cd "Z:\GPO\Jacket_432-389\Fiche\Dept. of Interior NY-OR-2"
md "_updated"
pdftools.exe -i "JDC-C-36-09267-CALEB HYATT HOUSE, SCARSDALE, NY-NA-000036.PDF" -o "_updated\JDC-C-36-09267-CALEB HYATT HOUSE, SCARSDALE, NY-NA-000036.PDF" -y "Document Name=JDC-C-36-09267-CALEB,Scanner Make=nextScan,Scanner Model=FlexScan,Scanner=nextScan FlexScan,Software Used=Auditor,DateTime of Scan=2025:7:29 14:0:21,Contractor=VeryPDF Inc."
Repeat for each file, adjusting field values as needed.
Summary
Adding custom metadata fields to PDF files using VeryPDF PDFTools is a powerful way to keep scanned document archives organized and searchable. But small syntax issues—especially with field names—can result in unexpected viewer errors or metadata not being saved correctly.
Avoid using slashes and special characters in field names, and your metadata will be safely embedded and fully compatible across PDF viewers.
Need Help?
If you encounter any issues or have questions about batch processing, command-line formatting, or PDF field compatibility, our support team is ready to help.
Visit: https://www.verypdf.com/app/advanced-pdf-tools/
Or contact us via the support channel you used to register your product.