Skip to content

Commit 91d5b7e

Browse files
committed
Task-935636- Addressed feedbacks
1 parent cef8912 commit 91d5b7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Document-Processing/PDF/PDF-Library/NET/Working-with-forms.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5103,7 +5103,7 @@ doc.Close(True)
51035103

51045104
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Forms/Auto-resize-the-text-of-textboxfield-in-a-PDF).
51055105

5106-
## How to Preserve Form Fields While Creating a Template from an Existing PDF That Contains Form Fields
5106+
## Preserve form fields when creating a PDF Template from an existing page
51075107

51085108
When you generate a `PdfTemplate` from an existing page, interactive **AcroForm** fields (textbox, checkbox, etc.) are **not copied** to the template.
51095109
If you still need the visual appearance of those form fields in the final document, you can flatten the form using the [FlattenFields](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.Parsing.PdfLoadedForm.html#Syncfusion_Pdf_Parsing_PdfLoadedForm_FlattenFields) API.
@@ -5114,16 +5114,16 @@ N> Flattening permanently removes interactivity. The resulting PDF shows the fo
51145114

51155115
{% tabs %}
51165116

5117-
{% highlight c# tabtitle="C# [Cross-platform]" %}
5117+
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/Forms/Preserve-Formfields- in-the-Template-created-from-existing-PDF/Preserve-Formfields- in-the-Template-created-from-existing-PDF/Program.cs" %}
5118+
51185119
using Syncfusion.Drawing;
51195120
using Syncfusion.Pdf;
51205121
using Syncfusion.Pdf.Graphics;
51215122
using Syncfusion.Pdf.Parsing;
51225123
using System.IO;
51235124

51245125
//Open the source PDF that contains form fields.
5125-
using FileStream fileStream = new FileStream("Form.pdf", FileMode.Open, FileAccess.Read);
5126-
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileStream);
5126+
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Form.pdf");
51275127

51285128
//Flatten all form fields to make them part of the page graphics.
51295129
PdfLoadedForm loadedForm = loadedDocument.Form;

0 commit comments

Comments
 (0)