Hi,
We are looking for the SDK capable of converting TIFF to PDF with JBIG2 compression. I have downloaded the PDF OCR Compressor Toolkit (SDK) evaluation, but I cannot see there the code sample that performs the conversion I need. The documentation does not contain the list of possible conversion options, and there is nothing there in sample project besides the "-pidpi 300" .
I will be very grateful if you can send me the code sample that performs the TIFF/PDF conversion similar to what I saw in the test-pdf-jbig2.bat. We are using c# for development.
Thank you in advance,
Customer
--------------------------------------------
You can use " -bwimg 2" parameter to convert a scanned PDF and TIFF file to JBIG2 compressed PDF file, for example,
pdfocrjb2sdk.exe bw.tif bw-pdf-g4.pdf
pdfocrjb2sdk.exe -bwimg 2 bw-pdf-g4.pdf bw-pdf-jbig2.pdf
pdfocrjb2sdk.exe -ocr 1 bw.tif bw-g4-ocr.pdf pdfocrjb2sdk.exe -ocr 1 -bwimg 2 bw.tif bw-jbig2-ocr.pdf
pdfocrjb2sdk.exe -ocr 1 -dpi 300 -skewcorrect -despeckle -chkbwcolor skew_test.tif skew_test-g4-ocr.pdf
pdfocrjb2sdk.exe -ocr 1 -dpi 300 -bwimg 2 -skewcorrect -despeckle -chkbwcolor skew_test.tif skew_test-jbig2-ocr.pdf
VeryPDF
--------------------------------------------
I need to do these conversions programmatically; that is why I'm performing the SDK evaluation.
Can you please give me the relevant c# example ?
Customer
--------------------------------------------
You can run following command line with administrator privilege to register pdfocrcom.exe first,
pdfocrcom.exe /regserver
after you registered pdfocrcom.exe, you can add a reference to it from your C# project, then you can call "PDFOCRCOM" from your C# code to convert scanned PDF or TIFF file to JBIG2 compressed PDF file by com_PDFOCRCmd() method,
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PDFOCRCOM;
namespace CSharp_COM_Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
PDFOCRCOMClass pdfocr = new PDFOCRCOMClass();
long ret = pdfocr.com_PDFOCRCmd(
"-ocr 1 D:\\temp\\test.pdf D:\\temp\\2_out.pdf");
long ret = pdfocr.com_PDFOCRCmd(
"-bwimg 2 D:\\bw-pdf-g4.pdf D:\\bw-pdf-jbig2.pdf");
long ret = pdfocr.com_PDFOCRCmd(
"-ocr 1 -dpi 300 -bwimg 2 -skewcorrect -despeckle
-chkbwcolor D:\\skew_test.tif D:\\skew_test-jbig2-ocr.pdf");
}
}
}
After you registered pdfocrcom.exe COM interface, you can compile and run "CSharp_COM_Test" project, you can modify its source code to convert TIFF and PDF files to new JBIG2 compressed PDF file easily.
You can download "Image to PDF OCR Converter SDK for .NET Developers" package from following URL,
https://www.verypdf.com/dl2.php/image2pdfocrsdk.zip
https://www.verypdf.com/app/image-to-pdf-ocr-converter/try-and-buy.html#buy-ocr-sdk-for-net
See Also:
VeryPDF Image to PDF OCR SDK for .NET,
https://www.verypdf.com/app/image-to-pdf-ocr-converter-cmd/sdk-for-net.html
Image to PDF OCR Converter SDK for .NET Developers,
https://www.verypdf.com/app/image-to-pdf-ocr-converter/try-and-buy.html#buy-ocr-sdk-for-net
Image2PDF OCR Engine,
https://www.verypdf.com/wordpress/201107/image2pdf-ocr-engine-1247.html