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 / 210 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.


Contact Us for Custom Development Solutions
Response within 24 hours

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.

Contact Us for Custom Development Solutions
Response within 24 hours

Related Posts

  • [Solution] Choosing the Right VeryPDF SDK for SPL-to-PDF Conversion and Print Job Capture
  • 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
  • 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
  • Understanding PCL and SPL File Conversion: Solutions for Managing Spool Files
  • Best SPL to PDF Converter – Convert SPL, Spool, PCL, PCL6, PS, Postscript, XPS and Print Files to PDF (Command Line & SDK)
  • 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
  • How to convert a EMF SPL file to PDF file? why I got "Invalid spooler file" message in my system?
  • How to get correct page count from XPS and .SPL files?
  • VeryPDF SPLParser Command Line – Parse, Convert, and Modify PDF, PCL, PS, SPL, EMF, and XPS Print Spool Files Easily
  • How can I convert from PRN files to PDF files?

Related posts:

Edit pdf page margins of odd number pages using command line
After I get SPL files from HookPrinter SDK, how can I get the information out of the SPL files? Hook...
Streamline Your Document Workflow with VeryPDF Conversion Service
Efficient OCR Software Development with VeryPDF OCR SDK - Affordable and Customizable Solution for D...
[Solution] Custom Development Services for Vertical Markets and AI-Powered Intelligent Document Proc...
DOC to Any Converter Command Line in PHP: Troubleshooting PDF Conversion Errors
[Solution] VeryPDF Document Conversion and Automation Service – Optimize PDF Workflows, Batch ...
Understanding PCL and SPL File Conversion: Solutions for Managing Spool Files
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 Apply User Based DRM Restrictions to PDF Files And Block Sharing Between Different Accounts
Next PostHow to Convert PDF Bank Statements to Excel or CSV Quickly and Accurately for Accounting and Finance Professionals

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.png[Solution] How to Enable “Keep Spooler Files” on Windows Printe…
  • image_thumb.png[Solution] VeryPDF Custom-built Smart Redact Server: AI-Powered PDF Redacti…
  • image_thumb.png[Solution] Choosing the Right VeryPDF SDK for SPL-to-PDF Conversion and Pri…
  • image_thumb.png[Solution] VeryPDF Custom-Built Print Filter for Windows: Add Signatures, C…
  • wlEmoticon-star.png[Solution] VeryPDF Printer Capture Solution – Virtual Port Monitor &a…

Recent Posts

  • image-20250726_115821_3629.pngHow to enforce PDF DRM to protect lecture slides, homework, and paid materi…
  • image-20250501_142011_6864.pngPrevent hackers and unauthorized users from copying, printing, or forwardin…
  • image-20250607_193132_6246.pngHow to stop students from converting protected PDFs to Word, Excel, or imag…
  • image-20250501_143353_6878.pngProtect your lecture slides, homework PDFs, and paid content from piracy, u…
  • image-20250726_112314_9757.pngHow to prevent unauthorized users from bypassing DRM and sharing digital co…

Categories

Archives

Calendar

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