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

Black image when converting PDF to TIFF

$
0
0

Hello,

You will find attached a PDF that we are converting to TIFF and the resulting TIFF file.

The TIFF file is completely black, except for the logo.

We are using Aspose.Pdf 7.5.0.0

Here is the code for the conversion:

Aspose.Pdf.

Document pdfDocument = new Aspose.Pdf.Document(StreamHelper.WriteToStream(bytes));

// TIFF Settings

TiffSettings tiffSettings = newTiffSettings();

tiffSettings.Compression = compression; // CCITT4

tiffSettings.Depth = colorDepth; //Format1bpp

tiffSettings.SkipBlankPages =

false;

// Resolution

Resolution r = newResolution(resolution); //400

// TIFF device

TiffDevice tiffDevice = newTiffDevice(r, tiffSettings);

// TIFF

using (MemoryStream outputStream = newMemoryStream())

{

tiffDevice.Process(pdfDocument, outputStream);

pdfDocument.Dispose();

returnStreamHelper.ReadStreamFromBeginning(outputStream);

}


Viewing all articles
Browse latest Browse all 3131

Latest Images

Trending Articles



Latest Images