We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Help Needed with .SaveAsTIFF method

Hi,

With the help of your sample code, I am split a multi-page PDF formatted file into a set of single-page TIFF formatted files without a problem. My code follows:

Dim inFile1 As String = "C:\temp\PDFKit\doc20100203063737.pdf"
Dim pdfEditor As PdfFileEditor = New PdfFileEditor()
Dim fileNum As Integer = 1
Dim outBuffer() As MemoryStream = pdfEditor.SplitToPages(inFile1)
For Each aStream As MemoryStream In outBuffer
Dim outStream As FileStream = New FileStream("C:\temp\PDFKit\Page" + fileNum.ToString() + ".pdf", FileMode.Create)
aStream.WriteTo(outStream)
outStream.Close()
Dim converter As PdfConverter = New PdfConverter()
aStream.Position = 0
converter.BindPdf(aStream)
converter.DoConvert()
converter.SaveAsTIFF("C:\temp\PDFKit\Page" + fileNum.ToString() + ".tif", CompressionType.CCITT4)
fileNum = fileNum + 1
Next

My issue is that the TIFF formatted files are roughly 4x larger than the .pdf file that they were built from. Is there something I can do in my process to render smaller TIFF formatted files. I am not able to attach my source .pdf as it contains certain information protected by federal privacy laws.

Doug Kemp

Hi Douglas,

Can you please share whether the output TIFF image is 4x larger in memory size or dimension? If you meant the dimension then you might need to specify the resolution of the output PDF file; please use the following overload:
SaveAsTIFF Method (String, Int32, Int32, CompressionType)

However, if you think it doesn’t resolve your issue then please share the sample PDF file with us; you can create a similar sample PDF file without private information, which can reproduce the issue at our end.

We’re sorry for the inconvenience.
Regards,

Hi,

Sorry for not supplying enough details initially. The issue was with the memory size of the rendered TIFF file. For example, if the input PDF file was 400KB, the TIFF file would be just under 1200KB. That ratio was the same over 4 or 5 different conversions.

I am working to get the redacted source PDF files and will forward them to you as soon as I get them.

Doug Kemp

Hi Douglas,

Thank you for sharing further details. However, in order to investigate this issue we’ll require the source PDF files, so we’ll be waiting for the files.

We appreciate your cooperation.
Regards,

Hi,

I found one page from my source PDF that I could submit. I have arttached the PDF formatted page and my resulting TIF page. Can you please take a look ath these documents and let me know if there is anything I can do.

Thanks,

Doug

Hi Douglas,

I have reproduced this problem at my end and logged it as PDFKITNET-14784 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once the issue is resolved.

We’re sorry for the inconvenience.
Regards,

The issues you have found earlier (filed as 14784) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.