Working with PostScript (PS) files is common in many Windows printing environments.
Often, organizations need to convert these PS files into more portable formats like PDF,
and then enhance them by adding barcodes or QR codes for tracking, authentication, or identification purposes.
This article introduces two professional solutions from VeryPDF that can help you achieve this workflow in just two steps:
- Convert PostScript (PS) to PDF
- Add barcode/QR code (or any image/text stamp) to the resulting PDF
Both solutions are available as command line tools and SDKs,
making them suitable for automation, batch processing, or integration into custom applications (such as a C# project).
Step 1: Convert PS to PDF with VeryDOC Postscript to PDF Converter
Product link: VeryDOC Postscript to PDF Converter
VeryDOC Postscript to PDF Converter is a reliable tool for converting PostScript (PS) and Encapsulated PostScript (EPS)
files into high-quality PDF documents. It is designed to run as a standalone application without requiring third-party software.
Key Features:
- Fast and accurate conversion from PS/EPS to PDF.
- Support for encryption, password protection, and metadata editing.
- Page range selection and rotation options.
- Ability to merge multiple PDFs into one.
- SDK available for integration into software projects.
Command Line Examples:
ps2pdf.exe C:\input.ps
ps2pdf.exe C:\input.ps C:\output.pdf
ps2pdf.exe -firstpage 1 -lastpage 20 C:\input.ps C:\output.pdf
ps2pdf.exe -subject "subject" C:\in.ps C:\out.pdf
ps2pdf.exe -producer "producer" C:\in.ps C:\out.pdf
ps2pdf.exe -creator "creator" C:\in.ps C:\out.pdf
ps2pdf.exe -ownerpwd owner -keylen 2 -encryption 3900 C:\in.ps C:\out.pdf
ps2pdf.exe -mergepdf "C:\1.pdf|C:\2.pdf|C:\3.pdf" C:\out.pdf
ps2pdf.exe -burstpdf C:\input.pdf C:\output.pdf
ps2pdf.exe -rotate 90 C:\input.ps C:\output.pdf
ps2pdf.exe -pdf2ps C:\input.pdf C:\output.ps
ps2pdf.exe -noempty C:\input.ps C:\output.pdf
Step 2: Add Barcode/QR Code with VeryPDF PDF Stamp
Product link: VeryPDF PDF Stamp Command Line
Once you have a PDF file, you can use the VeryPDF PDF Stamp tool to insert images (such as barcodes or QR codes) into the document.
This utility supports precise placement, rotation, scaling, transparency, and even multiple stamps on the same page.
Key Features:
- Add images (JPG, PNG, BMP, etc.) as stamps.
- Insert text with custom fonts, colors, and sizes.
- Flexible positioning (top, bottom, left, right, center).
- Support for multiple stamps on a single page.
- Full control via command line and SDK.
Command Line Examples:
Image Stamp Example (barcode/QR in top-right corner):
pdfstamp.exe -PDF "output.pdf" -o "final.pdf" -AI "qrcode.png" -p2 -mlr-30 -mtb30
Step 3: Automating with C#
Since both tools are command line based, you can easily integrate them into your C# applications
using the System.Diagnostics.Process class.
Here’s a simple example that first converts a .ps file into .pdf,
and then stamps a QR code image into the top-right corner of the PDF:
using System;
using System.Diagnostics;
class Program
{
static void RunCommand(string exePath, string arguments)
{
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = exePath,
Arguments = arguments,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};
using (Process process = new Process())
{
process.StartInfo = psi;
process.Start();
string output = process.StandardOutput.ReadToEnd();
string error = process.StandardError.ReadToEnd();
process.WaitForExit();
Console.WriteLine("Output: " + output);
if (!string.IsNullOrEmpty(error))
{
Console.WriteLine("Error: " + error);
}
}
}
static void Main()
{
string ps2pdfPath = @"C:\verypdf\ps2pdf.exe";
string pdfstampPath = @"C:\verypdf\pdfstamp.exe";
string inputPs = @"C:\input.ps";
string outputPdf = @"C:\output.pdf";
string finalPdf = @"C:\final.pdf";
string qrCodeImage = @"C:\qrcode.png";
// Step 1: Convert PS to PDF
RunCommand(ps2pdfPath, $"\"{inputPs}\" \"{outputPdf}\"");
// Step 2: Stamp QR Code in top-right corner
RunCommand(pdfstampPath, $"-PDF \"{outputPdf}\" -o \"{finalPdf}\" -AI \"{qrCodeImage}\" -p2 -mlr-30 -mtb30");
Console.WriteLine("Process completed successfully!");
}
}
How this works:
- ps2pdf.exe converts the PostScript file into a PDF.
- pdfstamp.exe places the QR code image in the top-right corner of the PDF.
- The
RunCommandhelper function handles command execution and captures output/errors.
Conclusion
For organizations that need to convert PostScript files to PDF and
add barcodes or QR codes to the resulting documents, VeryPDF provides a simple and robust solution:
- VeryDOC Postscript to PDF Converter for reliable PS → PDF conversion.
- VeryPDF PDF Stamp for adding barcode/QR codes, images, or text into PDFs.
Both products support command line execution and SDK integration,
making them easy to embed in automated workflows or custom software projects.
Learn more and try them here:
With these tools, you can build a complete workflow to process your PS files,
convert them into secure PDFs, and enhance them with barcodes or QR codes for your business needs.