Skip to content
VeryPDF Knowledge Base

VeryPDF Knowledge Base

Knowledge Base to VeryPDF Products

  • Home
  • Products
    • PDF to Any Converter
      • PDF to Word Converter
      • PDF to Word OCR Converter
      • PDF to Excel Converter
      • PDF to Excel OCR Converter
      • PDF to Text Converter
      • PDF to Text OCR Converter
      • PDF to HTML Converter
      • PDF Extract TIFF
      • PDF to Image Converter
      • PDF to PowerPoint Converter
    • Any to PDF Converter
      • AutoCAD to PDF Converter
      • PCL to PDF Converter
      • Image to PDF Converter
      • Image to PDF OCR Converter
      • HTML to PDF Converter
      • Document Printer
      • Document Converter
      • PowerPoint to Flash Converter
      • PowerPoint Converter
      • Free Text To PDF Converter
      • Metafile To PDF Converter
      • Office to Any Converter
    • PDF Utilities
      • PDFcamp Printer
      • PDF Editor
      • PDF Password Remover
      • Encrypt PDF
      • PDF Stamper
      • PDF Print
      • PDF Form Filler
      • Advanced PDF Tools
      • PDF Split-Merge
      • PDF Size Splitter
      • PDF Manual Splitter
      • PDF Optimizer
      • PDF Crop
      • PDF to PDF/A Converter
      • PDF Batch Print
    • Graphics Tools
      • TIFF Toolkit
      • Raster to Vector Converter
      • PDF to Flash Flip Book Converter
      • Image to Text OCR Converter
    • Business & OCR
      • PDF to Excel Converter
      • PDF to Excel OCR Converter
      • Scan to Excel OCR Converter
      • PDF to Word Converter
      • PDF to Word OCR Converter
      • Scan to Word OCR Converter
      • Office to Any Converter
      • Screen OCR
      • TIFF Toolkit
    • Multimedia
      • Flash to Image Converter
      • PowerPoint to Video Converter
      • Flash to Animated GIF Converter
      • PowerPoint to Flash Converter
      • PowerPoint Converter
    • Virtual Printer
      • PDFcamp Printer
      • Document Printer
      • Document Converter
      • Mini EMF Printer Driver
    • Development
      • Doc Converter COM Component
      • PDF Editor OCX Control
      • PDF to Text Converter SDK
      • Image to PDF Converter SDK
      • Image to PDF OCR Shell
      • HTML Converter Command Line
      • PDF to Image Converter SDK
      • PCL to PDF Converter SDK
      • PDF Password Remover SDK
      • Encrypt PDF SDK
      • PDF Split-Merge SDK
      • PDF Stamp SDK
      • PDF Print SDK
      • PDF Form Filler OCX
      • Advanced PDF Tools SDK
      • PDF Editor Toolkit SDK
      • Document Converter SDK
    • Customization
      • Custom Development Solution
    • More >>
  • Solutions
    • Web Viewer Solution
    • Web Annotator Solution
    • OCR Solution
    • PDF to Office Solution
    • PDF Form Filler Solution
    • Document Security Solution
    • Printer Intercept and Capture
    • PDF Extraction Solution
    • Paperless Printing Solution
    • Document Conversion
    • PDF Digital Signature
    • More >>
  • Blog
    • Advanced PDF Tools
    • docPrint Pro
    • PDFcamp Printer
    • PDF Editor
    • PDF Print
    • OCR Products
    • HTML to PDF Converter
    • PDF to Image Converter
    • Image to PDF Converter
    • PDF to Word Converter
  • Company
    • About Us
    • Contact Us

How to Use ReadInfo.dll in 64-bit Applications with C# (Using VeryPDF FileInfoCOM.exe) to read page count from SPL, PCL, PDF, PS, SPL-EMF, Spool files

Posted on 2025/11/192025/11/19Author VeryPDF / 658 Views

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.

How to Use ReadInfo.dll in 64-bit Applications with C# (Using VeryPDF FileInfoCOM.exe) to read page count from SPL, PCL, PDF, PS, SPL-EMF, Spool files

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:

  1. Open your Visual Studio project
  2. Go to Project → Add Reference
  3. Select the COM tab
  4. Choose FileInfoCOM
  5. 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.

Related Posts

  • [Solution] Choosing the Right VeryPDF SDK for SPL-to-PDF Conversion and Print Job Capture
  • How to Convert Dot Matrix Printer Output to PDF Without Scanning (Easy Invoice Automation Solution)
  • Understanding Windows SPL and SHD Files and How to Convert Them to PDF with VeryPDF SPL to PDF Converter Command Line
  • [Solution] How to Enable “Keep Spooler Files” on Windows Printers and Convert SPL Files to PDF Automatically Using VeryPDF SPL to PDF Converter Command Line
  • [Solution] VeryPDF Printer Capture to PDF or PNG – The Complete Print Job Monitoring and Archiving Solution
  • VeryPDF SPLParser Command Line – Parse, Convert, and Modify PDF, PCL, PS, SPL, EMF, and XPS Print Spool Files Easily
  • [Solution] Capture High-Volume Batch Printing to PDF: Convert a 7,000-Page Print Job Using a Virtual PDF Printer or Print Capture SDK Without Losing Formatting
  • VeryPDF SPLParser Command Line: Extract Comprehensive Print Job Metadata from EMF, WMF, PCL, PCL-XL, Postscript, PS, EPS, PDF, XPS, SPL and More
  • Introducing SPLParser.exe: The Custom-Built Command Line Solution for SPL File Parsing
  • How to Use PDF Editor Toolkit Pro SDK to Merge and Combine Digitally Signed PDF Files Securely
  • How do I capture a spool file from a Windows print queue?
  • Printed Documents Viewer & Printer Viewer & SPL Format Viewer & SPL Format Converter
  • We need more technical information about PCL Page Counter SDK
  • Counting the exact number of pages in any PDF document
  • More technical information needed regarding Page Counter SDK

Related posts:

How to make pdf files opened in continuous view by using the Advanced PDF Tools
We need a software that runs on background to intercept data that will be printed from any applicati...
Introducing VeryPDF Dummy Network Shared Printer Solution
How to Count Black-and-White and Color Pages in PDF Files?
[Solution] VeryPDF Barcode Scanner SDK: Fast, Reliable, and Secure Barcode Scanning for Your App or ...
How to Preserve Bold Fonts When Printing PDFs with VeryPDF PDFPrint Command Line
[Solution] Custom Virtual Printer Workflow Solution with VeryPDF: PDF Capture, Processing, Watermark...
[Solution] Secure Redaction of PII and Sensitive Data from PDFs Without Cloud Uploads
Category: Spool File Page Counter SDK Tag: 32bit compatible, 64bit support, automation tool, code integration, code sample, coding sample, com interface, com object, com wrapper, command reg, csharp code, csharp example, csharp interop, data extract, dev tools, developer sdk, dll wrapper, document info, document process, document reader, document size, dotnet code, dotnet com, emf analyze, emf counter, emf reader, emf spl, file analysis, file convert, file info, file inspector, file parser, file process, file reader, file sdk, file test, fileinfocom exe, install vbs, job counter, job monitor, metadata read, page count, page counter, page detect, page extract, page height, page width, paper name, paper size, parsing library, pcl analyze, pcl counter, pcl files, pcl reader, pdf analyze, pdf counter, pdf files, pdf reader, print backend, print job, print library, print management, print monitor, print sdk, print spool, print system, print tools, printer driver, printer page, printer tools, program example, ps analyze, ps counter, ps files, ps reader, readinfo dll, register com, regserver guide, sdk integration, server tools, spl analyze, spl counter, spl files, spool counter, spool extract, spool files, spool inspector, spool parser, spool reader, spool system, verypdf sdk, windows api, windows spooler, workflow print

Post navigation

Previous PostHow to Restrict PDF Access to Specific Devices Only And Prevent File Sharing Across All Platforms
Next PostWhy Businesses Choose VeryPDF DRM Protector for Secure Virtual Data Rooms When Searching for High-Security Document Sharing With Device Limits and Expiry Controls

Custom Development Services

VeryPDF offers customized development services to meet your unique business needs, including PDF Processing, Document Automation, Document Analysis, Format Conversion, OCR, DRM, Barcode Solutions, Virtual Printer, Digital Signature, AI Integration, and more. Contact us today to get a personalized solution!

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • VeryPDF.com
  • VeryDOC.com
  • VeryUtils.com
  • imPDF.com

Recent Solutions

  • image_thumb.pngPDF/A-3 vs ZUGFeRD: Custom PDF to PDF/A e-Invoice Development with VeryPDF
  • image_thumb.pngCustom PDF to PDF/A-3 + ZUGFeRD Development by VeryPDF (Simple Guide for Bu…
  • image_thumb.png[Solution] VeryPDF Virtual Printer Driver SDK OEM Licensing, Full Source Co…
  • image_thumb.png[Solution] Secure Redaction of PII and Sensitive Data from PDFs Without Clo…
  • image_thumb.png[Solution] VeryPDF AI-Powered Smart Redact Server Solution: Permanently Rem…

Recent Posts

  • image_thumb.pngPrint Management Software Needs PCL Preview? How to Convert PCL to PDF or I…
  • image_thumb.pngVeryPDF Virtual PDF Printer SDK for Windows: Bundle a PDF Virtual Printer I…
  • image_thumb.pngPCL Converter Command Line Developer License FAQ: Can I Redistribute It wit…
  • image_thumb.pngHow to Highlight Part Numbers in Large PDF Drawings Automatically (Mac and …
  • image_thumb.pngHow to Convert DOC and RTF to PDF Without Microsoft Office | DocPrint PDF v…

Categories

Archives

Calendar

November 2025
M T W T F S S
« Sep   Feb »
 12
3456789
10111213141516
17181920212223
24252627282930
© 2026 VeryPDF Knowledge Base / VeryPDF.com / VeryDOC.com / VeryUtils.com / Support
Contact
Us