https://forum.pdf-xchange.com/ ... ins#p23971
The issue in a nutshell is that if I manually set all of the print options up and then print without the UI, not all options will be honored. The biggest problem being ReduceToMargins.
I have reproduced the problem using the C# Full Demo code. Inside the routine "private void b_Print_Click(object sender, EventArgs e)", I have added the following code right before the call to print the document:
Code: Select all
try
{
// Start of my code
axCoPDFXCview1.SetProperty("Print.ScaleSimple.AutoRotate", 1);
axCoPDFXCview1.SetProperty("Print.ScaleSimple.AutoCentre", 1);
axCoPDFXCview1.SetProperty("Print.Copies", 1);
axCoPDFXCview1.SetProperty("Print.Collate", 1);
axCoPDFXCview1.SetProperty("Print.PrintSpec", "DocumentAndMarkups");
axCoPDFXCview1.SetProperty("Print.NotesAndPopups", 1);
axCoPDFXCview1.SetProperty("Print.ScaleType", "ReduceToMargins");
// End of my code
axCoPDFXCview1.PrintDocument(nActiveDocID, (int)PXCVA_Flags.PXCVA_NoUI);
}
catch (Exception ex)
{
ShowErrorMessage(System.Runtime.InteropServices.Marshal.GetHRForException(ex));
}
--When printed interactively with the Printer UI showing, everything works great!
--When printed Without UI, no scaling occurs and the bottom of the page is truncated on the printed page.
Viewer version is 2.5.195.
Win7, 64-bit.
FullDemo compiled as 32-bit app not that it should matter.