A Complete Guide for Developers Working with PCL/PS/Spool File Analysis
If you plan to purchase and integrate our ReadInfo.dll technology but are concerned about 64-bit compatibility, this guide explains everything you need to know.
Although ReadInfo.dll itself is a 32-bit native library, we provide a powerful and convenient solution that works perfectly in both 32-bit and 64-bit applications, including modern C#/.NET environments.
To support all architectures, VeryPDF offers a COM-compatible wrapper called FileInfoCOM.exe, which exposes all functionality of ReadInfo.dll through a universal COM interface. This provides full compatibility with x86 and x64 applications, eliminating the limitations of loading a 32-bit DLL
directly into a 64-bit process.
In addition, many of our customers also benefit from our advanced page-counting SDK, which works directly with spool files and printer data streams:
VeryPDF Spool File Page Counter SDK
https://www.verypdf.com/app/hookprinter/spool-file-page-counter-sdk.html
This SDK is ideal for analyzing PCL, PostScript, EMF, SPL, and other print-related file formats.
Why Use FileInfoCOM.exe Instead of ReadInfo.dll?
Direct DLL loading requires matching architectures:
| File Type | x86 App | x64 App |
|---|---|---|
| ReadInfo.dll | ✔ Works | ✖ Cannot load 32-bit DLL |
| FileInfoCOM.exe | ✔ Works | ✔ Works |
Because ReadInfo.dll is compiled as 32-bit, a 64-bit application cannot load it directly through P/Invoke.
FileInfoCOM.exe solves this problem. It exposes all the same functions through COM automation, which can be called from any .NET version, including:
- .NET Framework 2.0 – 4.8
- .NET 5, .NET 6, .NET 7, .NET 8
- Any CPU / x86 / x64 / ARM64 builds
This means you no longer need to worry about DLL architecture or interop complexity.
Step-by-Step Guide: Using FileInfoCOM.exe in C#
Step 1 — Register FileInfoCOM.exe (Administrator Required)
Open a Command Prompt with Administrator privileges and run:
FileInfoCOM.exe /regserver
Alternatively, double-click the provided script:
install.vbs
This registers the COM interface in the Windows registry.
Step 2 — Add COM Reference to C# Project
After registration:
- Open your Visual Studio project
- Go to Project → Add Reference
- Select the COM tab
- Choose FileInfoCOM
- Click OK
Visual Studio will automatically generate an interop assembly (Interop.FileInfoCOM.dll).
Step 3 — Use FileInfoCOM.exe from C#
Below is a complete working example demonstrating how to read PCL file metadata such as:
- Page count (black & white and color)
- Page size (width and height)
- Copy count
- Paper size name
- Rendering behavior
✔ Full Example Code
using System;
using FileInfoCOM;
namespace ParsingTest {
class Program {
static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("Usage:");
Console.WriteLine("test.exe C:\\input.pcl");
Console.WriteLine("test.exe C:\\input.ps");
return;
}
string fileName = args[0];
int bIsRenderToPDF = 0;
int bwPageCount = 0;
int colorPageCount = 0;
int copyCount = 0;
double nPageWidth = 0;
double nPageHeight = 0;
string strPaperSizeName = new string(' ', 300);
FileInfoClass objFileInfo = new FileInfoClassClass();
// Set license key
objFileInfo.com_ReadInfoSetCode("XXXXXXXXXXXXXXXXXX");
// Parse PCL/PS file information
objFileInfo.com_ReadInfoFromPCLFile(
fileName,
bIsRenderToPDF,
ref bwPageCount,
ref colorPageCount,
ref copyCount,
ref nPageWidth,
ref nPageHeight,
ref strPaperSizeName
);
Console.WriteLine($"File: {fileName}");
Console.WriteLine($"Render To PDF: {bIsRenderToPDF}");
Console.WriteLine($"BW Pages: {bwPageCount}");
Console.WriteLine($"Color Pages: {colorPageCount}");
Console.WriteLine($"Copies: {copyCount}");
Console.WriteLine($"Width: {nPageWidth}");
Console.WriteLine($"Height: {nPageHeight}");
Console.WriteLine($"Paper Name: {strPaperSizeName}");
}
}
}
This code runs identically on both 32-bit and 64-bit systems.
Advanced Page Counting for Print Management Systems
If you are analyzing spool files, printer data streams, or building:
- Print accounting systems
- Secure output management tools
- Print job monitoring services
- Billing & metering software
- Workflow automation tools for enterprise printing
You may also need deeper access to SPL, PCL, PostScript, EMF, or XPS print data.
VeryPDF provides a specialized SDK for this purpose:
VeryPDF Spool File Page Counter SDK
https://www.verypdf.com/app/hookprinter/spool-file-page-counter-sdk.html
This SDK supports:
- Accurate page counting without opening the file
- Extraction of color/BW pages
- Duplex/simplex detection
- Paper size, orientation, scaling
- Printer command stream parsing (PCL, PS, PDF, EMF, SPL, XPS)
- Windows print spool monitoring
It integrates perfectly with the ReadInfoCOM workflow and is recommended if you are developing a full print-management or job-accounting system.
Conclusion
Although ReadInfo.dll is 32-bit, you can safely use all of its functions in any 64-bit C# application by calling our COM interface wrapper — FileInfoCOM.exe.
This provides:
- Full x64 compatibility
- Easy integration
- Strong interop reliability
- No need to manage architecture-specific DLL loading
For more advanced page-counting needs, especially for spool file analysis, you may further explore:
VeryPDF Spool File Page Counter SDK
https://www.verypdf.com/app/hookprinter/spool-file-page-counter-sdk.html
If you need additional sample code, guidance, or integration support, feel free to contact us anytime — we are always glad to assist.