【发布时间】:2021-09-29 17:49:14
【问题描述】:
我刚刚将我的 PDFsharp 包从 1.32 更新到 1.50,现在我收到了无法将 System.Drawing.Rectangle 转换为 PdfSharp.Drawing.XRect 的错误。我有什么遗漏或者我需要根据新包更改此方法吗?
protected void DrawVerticalLines(XGraphics graphics, double pageWidth, double pageHeight, int marginX, int marginY, int topMarginY)
{
XPen pen = new XPen(XColors.Black, 0.5);
graphics.DrawRectangle(pen, new Rectangle(marginX, topMarginY, (int)(pageWidth - marginX * 2), (int)(pageHeight - marginY * 2 - topMarginY)));
}
【问题讨论】: