Landscape Pdf files are printed in Portrait Mode, So the content of image are not print properly.
Issue: Pdf Image Issue.png (133.3 KB)
Sample Code:
Document _document = new Document(new FileStream(“A4.pdf”, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
TiffSettings options = new TiffSettings();
options.Compression = CompressionType.CCITT4;
Resolution resolutionObj = new Resolution(imageOptions.Resolution);
TiffDevice tiffDevice = new TiffDevice(2500, 3300, resolutionObj, options);
for (int j = 1; j <= document.Pages.Count; j++)
{
try
{
using (FileStream imageStream = new FileStream(string.Format("{0:" + “D6” + “}”, j) + “.tif”), FileMode.Create))
{
tiffDevice.Process(_document, j, j, imageStream);
imageStream.Close();
}
}
catch (Exception ex)
{}
}
Required Files: PDF Orintation.zip (983.6 KB)