Question:We want to be able to print embed those PDF files directly into the print stream so they don't need pre-printed paper, so we need to convert PDF to raster image first. However, there aren't really any good options for rendering a PDF to a raster image. Is there a raster format the PDF could be converted to by some external program without being degraded considering the embedded fonts problem? Is there any solution on VeryPDF?
Answer: According to your needs, you need to VeryPDF PDFPrint Command Line, by which you can to raster image before printing. And this SDK version software allows you to call it together with other applications include VB like C#, .NET, MS Visual Basic, Borland Delphi, VBA (MS Office products such as Access) and C++ via COM, C and C++ via native C. Please check more information of this software on homepage, in the following part, I will show you how to use this software.to raster image first and then run the printing process from VB process. If I understand you right, maybe you can have a free trial of this software:
Step 1. Free download PDFPrint SDK
- By the SDK version, you can integrate the corresponding SOFTWARE into your developed software and redistribute it with royalty-free.
- When downloading finishes, you will find it is a zip file. You need to extract it to some folder then you can call it normally from VB.
Step 2. Convert PDF with embedded fonts to raster image and then print PDF.
- When converting PDF to raster image first and then print it, you may need to use the following parameters:
- When you need to convert PDF to raster and then print it from VB, please refer to the following code template:
-raster : render PDF page to image before printing
-raster2 : render PDF page to image before printing
-raster2center : center the printout when use -raster2
-rasterbitcount <int>: set bitcount for raster image, e.g., 1, 8, 24
-rasterbwtext : disable halftone for color text, for -raster2 only
-preproc : process PDF file before printing, useful for some damaged PDF files
Here are some command line templates:
pdfprint.exe -raster C:\input.pdf
pdfprint.exe -raster2 -rasterbitcount 1 C:\input.pdf
pdfprint.exe -raster2 -rasterbwtext -rasterbitcount 1 -xres 600 -yres 600 C:\input.pdf
Private Sub Command1_Click()
Dim nRet As Long
Dim strCmd As String
strCmd = "pdfprint -$ XXXXXXXXXXXXXXXXXXXX"
strCmd = strCmd & " -raster2 -rasterbwtext -rasterbitcount 1 """
strCmd = strCmd & " """ & C:\input.pdf"""
nRet = VeryPDF_PDFPrint(strCmd)
By this method, you can convert PDF files which can not be printed normally. During the using, if you have any question, please contact us as soon as possible.