From 8be16ea5ea22aef3921937b026792ed2d5eb7a49 Mon Sep 17 00:00:00 2001 From: Srihariharan Date: Thu, 11 Jan 2024 16:24:02 +0530 Subject: [PATCH 1/2] 864918: Update proper save method. --- File-Formats/PDF/Working-with-PDF-Templates.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/File-Formats/PDF/Working-with-PDF-Templates.md b/File-Formats/PDF/Working-with-PDF-Templates.md index 26d11d78b..f6c1b5471 100644 --- a/File-Formats/PDF/Working-with-PDF-Templates.md +++ b/File-Formats/PDF/Working-with-PDF-Templates.md @@ -225,8 +225,9 @@ graphics.DrawPdfTemplate(template, Syncfusion.Drawing.PointF.Empty, new Syncfusi //Save the document into stream. MemoryStream stream = new MemoryStream(); -loadedDocument.Save(stream); +document.Save(stream); //Close the document. +document.Close(true); loadedDocument.Close(true); {% endhighlight %} From 055453f41ce4a0c6e12af1b9c878a0112acb8668 Mon Sep 17 00:00:00 2001 From: Srihariharan Date: Thu, 11 Jan 2024 17:38:21 +0530 Subject: [PATCH 2/2] 864918 : Remove the margin size. --- File-Formats/PDF/Working-with-PDF-Templates.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/File-Formats/PDF/Working-with-PDF-Templates.md b/File-Formats/PDF/Working-with-PDF-Templates.md index f6c1b5471..81ae76131 100644 --- a/File-Formats/PDF/Working-with-PDF-Templates.md +++ b/File-Formats/PDF/Working-with-PDF-Templates.md @@ -214,8 +214,6 @@ PdfTemplate template = loadedPage.CreateTemplate(); //Create a new PDF document. PdfDocument document = new PdfDocument(); -//Set the document margin. -document.PageSettings.SetMargins(2); //Add the page. PdfPage page = document.Pages.Add(); //Create the graphics. @@ -243,8 +241,6 @@ PdfTemplate template = loadedPage.CreateTemplate(); //Create a new PDF document. PdfDocument document = new PdfDocument(); -//Set the document margin. -document.PageSettings.SetMargins(2); //Add the page. PdfPage page = document.Pages.Add(); //Create the graphics. @@ -271,8 +267,6 @@ Dim template As PdfTemplate = loadedPage.CreateTemplate() 'Create a new PDF document Dim document As New PdfDocument() -'Set the document margin -document.PageSettings.SetMargins(2) 'Add the page Dim page As PdfPage = document.Pages.Add() 'Create the graphics