When attempting to convert the attached 5 page PDF to a multi-page tiff, the first page renders correctly but he other 4 pages are blank. I am using vb.net (3.5 .Net framework) and version 11.8.0.0 of the Aspose.PDF.dll. I have tried using both the TiffDevice and PDFConverter classes but the results are the same. I don’t know if there is something malformed about the PDF document, if there is some security in the PDF preventing page extraction, or if I am not using the objects correctly. Here is some sample code I am using.
Private Sub UseTiffDeviceMethod()
Dim pdfDocument As New Aspose.Pdf.Document(My.Application.Info.DirectoryPath & “\test.pdf”)
pdfDocument.Flatten()
pdfDocument.Form.Flatten()
'create Resolution object
Dim resolution = New Aspose.Pdf.Devices.Resolution(300)
'create TiffSettings object
Dim tiffSettings As New Aspose.Pdf.Devices.TiffSettings()
tiffSettings.Compression = Aspose.Pdf.Devices.CompressionType.CCITT4
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp
tiffSettings.SkipBlankPages = False
'create TIFF device
Dim tiffDevice As New Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings)
tiffDevice.Process(pdfDocument, My.Application.Info.DirectoryPath & “\test1.tif”)
End Sub
Private Sub UsePDFConverterMethod()
Dim dataDir As String = My.Application.Info.DirectoryPath
Dim pdfConverter As New Aspose.Pdf.Facades.PdfConverter()
Dim resolution As New Aspose.Pdf.Devices.Resolution(300)
pdfConverter.Resolution = resolution
pdfConverter.BindPdf(dataDir & “\test.pdf”)
pdfConverter.DoConvert()
Dim tiffSettings As New Aspose.Pdf.Devices.TiffSettings()
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp
pdfConverter.SaveAsTIFF(dataDir & “\test2.tif”, Aspose.Pdf.Devices.CompressionType.CCITT4)
pdfConverter.Close()
End Sub
Hi Steven,
Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for .NET 12.0.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNET-41445 and also linked your request to it. We will keep you updated via this thread regarding the issue status.
We are sorry for the inconvenience caused.
The issues you have found earlier (filed as PDFNET-41445) have been fixed in Aspose.PDF for .NET 18.9.