我尝试动态创建并静默打印文档。 问题是我需要缩放文档以适应页面。我尝试使用PrintTicket.PageScalingFactor但它不起作用:当打印机打印文档时,PageScalingFactor = 50和PageScalingFactor = 250之间没有区别。 PageScalingFactor不会影响任何内容。 这是一段代码片段: 创建PrintTickets:
PrintTicket tkt = new PrintTicket();
tkt.Collation = Collation.Uncollated;
tkt.CopyCount = 1;
tkt.DeviceFontSubstitution = DeviceFontSubstitution.On;
tkt.Duplexing = Duplexing.OneSided;
tkt.InputBin = InputBin.AutoSelect;
tkt.OutputColor = OutputColor.Monochrome;
tkt.PageMediaSize = new PageMediaSize(PageMediaSizeName.ISOA9);
tkt.PageMediaType = PageMediaType.Unknown;
tkt.PageOrder = PageOrder.Standard;
tkt.PageOrientation = PageOrientation.Portrait;
tkt.PageResolution = new PageResolution(PageQualitativeResolution.Draft);
tkt.PageScalingFactor = 40;
tkt.PagesPerSheet = 1;
tkt.TrueTypeFontMode = TrueTypeFontMode.DownloadAsOutlineFont;
StackPanel myPanel = new StackPanel();
myPanel.Margin = new Thickness(15);
设置PrintQueue并使用数据填充StackPanel无关紧要 印刷:
myPanel.Measure(new Size(dialog.PrintableAreaWidth,
dialog.PrintableAreaHeight));
myPanel.Arrange(new Rect(new Point(0, 0),
myPanel.DesiredSize));
dial2.PrintVisual(myPanel, "A Great Image.");
我设置PageScalingFactor 40,100,250 - 输出是一样的。 我该怎么办?
答案 0 :(得分:0)
PageScaling功能是否设置为CustomSquare?