At VeryPDF, we are always grateful for the support of our loyal users. We recently received an inquiry from a dedicated user who encountered an issue when printing PDF documents using the pdfprint method with the useembedfont parameter. Despite enabling this setting, the printed document did not reflect the bold effect of the fonts in the original PDF; all text appeared with the same thickness. Since their usage scenario was urgent, they sought a solution to ensure that the printed output matched the PDF's original font thickness.
https://www.verypdf.com/app/pdf-print-cmd/
Understanding the Issue
When printing PDFs, font rendering can sometimes differ depending on how fonts are embedded and processed. The useembedfont parameter helps ensure that the printer utilizes the fonts within the PDF, but certain font effects—such as bold—may not always transfer correctly. This discrepancy can be due to the printer's font handling capabilities or the way the PDF is structured.
Solution: Use the -raster2
Parameter
To address this issue, we recommend adding the -raster2 parameter to the command line. This setting converts the document to a raster image before sending it to the printer, ensuring that all font styles, including bold effects, are faithfully reproduced in the printed output.
Suggested Command:
pdfprint.exe -raster2 D:\test.pdf
Why -raster2
Works
The -raster2 parameter will render all PDF pages to image files within the Windows system first, and then print these images to the printer. This process eliminates inconsistencies caused by printer drivers and ensures that the printed document accurately represents the original PDF, including the bold effect and other text attributes. Since the text is transformed into a high-quality image format before printing, any font rendering issues related to printer font substitution or processing differences are completely avoided.
How to Call pdfprint.exe
from Your Own Program
If you want to integrate VeryPDF PDFPrint Command Line into your own application, you can call pdfprint.exe
using different programming languages such as C++, C#, Python, or Java. Here are a few examples:
Using C++:
#include <iostream>
#include <cstdlib>
int main() {
system("pdfprint.exe -raster2 D:\\test.pdf");
return 0;
}
Using C#:
using System.Diagnostics;
class Program {
static void Main() {
Process process = new Process();
process.StartInfo.FileName = "pdfprint.exe";
process.StartInfo.Arguments = "-raster2 D:\\test.pdf";
process.Start();
}
}
Using Python:
import subprocess
subprocess.run(["pdfprint.exe", "-raster2", "D:\\test.pdf"])
Using Java:
import java.io.IOException;
public class PrintPDF {
public static void main(String[] args) throws IOException {
Process process = new ProcessBuilder("pdfprint.exe", "-raster2", "D:\\test.pdf").start();
}
}
Additional Support
If you are still experiencing issues after using the -raster2
parameter or need help integrating pdfprint.exe
into your own application, feel free to reach out to us. Our team is always here to assist with optimizing your PDF printing experience.
For more information about VeryPDF PDFPrint Command Line, please visit: VeryPDF PDFPrint Command Line Home Page
We appreciate your continued trust in VeryPDF and look forward to helping you achieve the best printing results!