converting TIFF to PDF & JPG to PDF
Posted: Tue Oct 29, 2013 12:54 pm
Hi,
Our company is currently evaluating the product whether it will cater to our needs.
Our requirements are as follows:
1) Convert TIFF file to PDF using JBIG2 Compression
2) Convert JPG file to PDF using JPEG2000 Compression
When I tried, I get an error message stating that the compression (Jpeg2000 and Jbig2) is not supported now.
Basing on the documentation provided, below is the code for converting TIFF to PDF (using JBIG2):
ImageCollection imageCollection = new ImageCollection();
imageCollection.Add(tiffFileName);
PdfEncoder pdfEncoder = new PdfEncoder(true);
pdfEncoder.Settings.Compression = PdfImageCompression.Jbig2;
pdfEncoder.Settings.Jbig2Settings.Lossy = false;
imageCollection.SaveSync(pdfFileName, pdfEncoder);
pdfEncoder.Dispose();
imageCollection.Dispose();
Below is the code for converting JPG to PDF (using JPEG2000):
ImageCollection imageCollection = new ImageCollection();
imageCollection.Add(jpgFileName);
PdfEncoder pdfEncoder = new PdfEncoder(true);
pdfEncoder.Settings.Compression = PdfImageCompression.Jpeg2000;
pdfEncoder.Settings.Jpeg2000Settings.CompressionType = Vintasoft.Imaging.Codecs.Jpeg2000.Jpeg2000CompressionType.Lossy;
imageCollection.SaveSync(pdfFileName, pdfEncoder);
pdfEncoder.Dispose();
imageCollection.Dispose();
Is there something I should be doing to make this work or is this feature only supported in future versions? Please note that I'm currently using version 7.0.1.1.
Please advise asap.
Thanks.
Best Regards,
Mylene
Our company is currently evaluating the product whether it will cater to our needs.
Our requirements are as follows:
1) Convert TIFF file to PDF using JBIG2 Compression
2) Convert JPG file to PDF using JPEG2000 Compression
When I tried, I get an error message stating that the compression (Jpeg2000 and Jbig2) is not supported now.
Basing on the documentation provided, below is the code for converting TIFF to PDF (using JBIG2):
ImageCollection imageCollection = new ImageCollection();
imageCollection.Add(tiffFileName);
PdfEncoder pdfEncoder = new PdfEncoder(true);
pdfEncoder.Settings.Compression = PdfImageCompression.Jbig2;
pdfEncoder.Settings.Jbig2Settings.Lossy = false;
imageCollection.SaveSync(pdfFileName, pdfEncoder);
pdfEncoder.Dispose();
imageCollection.Dispose();
Below is the code for converting JPG to PDF (using JPEG2000):
ImageCollection imageCollection = new ImageCollection();
imageCollection.Add(jpgFileName);
PdfEncoder pdfEncoder = new PdfEncoder(true);
pdfEncoder.Settings.Compression = PdfImageCompression.Jpeg2000;
pdfEncoder.Settings.Jpeg2000Settings.CompressionType = Vintasoft.Imaging.Codecs.Jpeg2000.Jpeg2000CompressionType.Lossy;
imageCollection.SaveSync(pdfFileName, pdfEncoder);
pdfEncoder.Dispose();
imageCollection.Dispose();
Is there something I should be doing to make this work or is this feature only supported in future versions? Please note that I'm currently using version 7.0.1.1.
Please advise asap.
Thanks.
Best Regards,
Mylene