gpt4 book ai didi

c# - 为什么 PageScalingFactor 不影响任何东西?

转载 作者:行者123 更新时间:2023-11-30 13:03:22 25 4
gpt4 key购买 nike

我尝试动态创建并静默打印文档。问题是我需要缩放文档以适合页面。我尝试使用 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 - 输出相同。我该怎么办?

最佳答案

PageScaling 功能是否设置为 CustomSquare?

关于c# - 为什么 PageScalingFactor 不影响任何东西?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13193834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com