feat(Edit): created to handle pdf edit operations fluently

This commit is contained in:
2025-09-24 16:07:51 +02:00
parent 0fa641c15d
commit ed4fd6ce96
3 changed files with 118 additions and 2 deletions

View File

@@ -236,6 +236,18 @@ public class EnvelopeController : ViewControllerBase
canvas.FillStroke();
});
doc.ByteData = doc.ByteData.Edit(doc =>
{
var page = doc.GetFirstPage();
var canvas = new PdfCanvas(page);
canvas.SetStrokeColor(ColorConstants.RED);
canvas.SetFillColor(ColorConstants.CYAN);
canvas.SetFillColorRgb(222, 220, 215);
canvas.SetLineWidth(2);
canvas.Rectangle(100, 500, 200, 100);
canvas.FillStroke();
});
ViewData["DocumentBytes"] = doc.ByteData;
}
else