my problem:
when i print pdf pages having orientation 'landscape' the printed page is not automatically rotated 90°. Due to this only half of the page is visible on the printout.
this is my code:
Code: Select all
using (FileStream file1 = new System.IO.FileStream(@"c:\Portrait_Landscape.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
{
IacDocument document = new IacDocument(null);
// print to file
document.Open(file1, "");
bool Suc = document.StartPrint("FinePrint", false);
for (int pageIndex = 1; pageIndex <= document.PageCount; pageIndex++)
{
IacPage CurrentPage = document.GetPage(pageIndex);
IacPageFormat Format = CurrentPage.GetPageFormat();
if (Format.Landscape)
{
Console.WriteLine(string.Format("P {0}: landscape", pageIndex));
//document.RotatePage(pageIndex, IacRotatePageOption.acRotatePageRight);
}
else
{
Console.WriteLine(string.Format("P {0}: other", pageIndex));
}
document.PrintPage(document.GetPage(pageIndex));
}
document.EndPrint();
}
as you can see, i already tried to check the format of the page and if this is 'landscape' i rotate the page. But the print result didn't look correct.
How can i print landscape pages so their content is rotated AND the print result looks like the original.
Thank you in advance !