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

Free Support Forum - aspose.com

XPS to Tiff using AsposePdf

Hi I am trying to confirm xps file to tiff using below code. File is getting generated but images are not getting converted. Please see attached Zip file for input and output. Text is getting converted correctly.1.zip (393.3 KB)

using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fileDetail.FileInfo.FullName,new Aspose.Pdf.MhtLoadOptions()))
{
Aspose.Pdf.Devices.Resolution resolution = new Aspose.Pdf.Devices.Resolution(300);
// Create TiffSettings object
Aspose.Pdf.Devices.TiffSettings tiffSettings = new Aspose.Pdf.Devices.TiffSettings();
tiffSettings.Compression = Aspose.Pdf.Devices.CompressionType.LZW;
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format8bpp;
tiffSettings.SkipBlankPages = false;

                Aspose.Pdf.Devices.TiffDevice tiffDevice = new Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings);
                tiffDevice.Process(pdfDocument, fileDetail.OutputPath);
            }

@atyagi39

We used the below code snippet to test the scenario in our environment using Aspose.PDF for .NET 21.10:

Document pdfDocument = new Document(dataDir + "1.xps", new XpsLoadOptions());
Resolution resolution = new Resolution(300);
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.LZW;
tiffSettings.Depth = ColorDepth.Format8bpp;
//tiffSettings.Shape = ShapeType.Landscape;
tiffSettings.SkipBlankPages = false;
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
tiffDevice.Process(pdfDocument, dataDir + "AllPagesToTIFF_out.tif");

We were able to notice the the image was not complete in output .tif file. Therefore, an issue as PDFNET-50858 has been logged in our issue tracking system for the sake of correction. We will further look into its details and keep you informed about its resolution status. Please be patient and spare us some time.

We are sorry for the inconvenience.