Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

PDF to TIFF conversion is too slow on larger documents

$
0
0
I am converting a 45 page pdf to tiff and taking a long time.

This is the code I am using
Dim pdfDocument As New Aspose.Pdf.Document(file)
        'Create Resolution object
        Dim resolution As New Resolution(300)
        Dim imagefilename As String
        'Create TiffSettings object
        Dim tiffSettings As New TiffSettings()
        tiffSettings.Compression = CompressionType.CCITT4
        tiffSettings.Depth = ColorDepth.Default
        tiffSettings.SkipBlankPages = False
        tiffSettings.Depth = ColorDepth.Format8bpp   'Format8bpp
        'Create TIFF device
        Dim tiffDevice As New TiffDevice(resolution, tiffSettings)

        Try
            imagefilename = Program.imagepath + System.IO.Path.GetFileNameWithoutExtension(file) + Guid.NewGuid().ToString + ".TIFF"
            tiffDevice.Process(pdfDocument, imagefilename)
            Program.NoOfPages = pdfDocument.Pages.Count
        Catch ex As System.Exception
            MsgBox(ex.Message)
        End Try


I also tried this and the image it produced was too small to read
        'create PdfConverter object and bind input PDF file
        'Dim pdfConverter As New PdfConverter()
        'pdfConverter.Resolution = New Aspose.Pdf.Devices.Resolution(300)
        'pdfConverter.BindPdf(file)
        'pdfConverter.DoConvert()
        ''create TiffSettings object and set ColorDepth
        'Dim tiffSettings As New TiffSettings()
        ''tiffSettings.Depth = ColorDepth.Format1bpp
        'tiffSettings.Compression = CompressionType.None
        'tiffSettings.Depth = ColorDepth.Default
        'tiffSettings.SkipBlankPages = False
        'tiffSettings.Depth = ColorDepth.Format8bpp

        'convert to TIFF image
        'pdfConverter.SaveAsTIFF(imagefilename, 300, 300, tiffSettings)
        'pdfConverter.Close()


Thank you for your help.


Viewing all articles
Browse latest Browse all 3131

Trending Articles