I have used aspose.pdf to fill data to the pdf field. After the data is filled in the pdf, and I downloaded the pdf the rates shown in the filed is editable, but it should be readonly. How do I make that field readonly while writing data in it. I have other filed called "Contact me today for
more information"on the same pdf which should be writeable after downloading.
In short: How to make only specific filed of dynamic pdf readonly after writing data in it. Can you please help me with this asap? Thank you.
Here is the code I have used:
public byte FillForm(string IPAddress, string SessionID, string UserName, string pdfPath, IDictionary<string, string> values)
var document = GetPdfDocument(_fileSystem.GetFullPath(pdfPath));
int count = 0;
foreach (var field in document.Form.Fields.Where(x => !string.IsNullOrEmpty(x.FullName)))
var rateMapperSplittedValue = values.ElementAt(count).Value.Split(’;’);
int index = rateMapperSplittedValue.Length - 1;
string labelValue = rateMapperSplittedValue[index];
field.Value = labelValue;
var ms = new MemoryStream();
Here is the downloaded pdf. RatesFilledDownloadedPdf.PDF (1.4 MB)