feat(Edit): created to handle pdf edit operations fluently
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user