I have this sample code (I simulate getting the byte array from the db ):
byte[] pdfData = null;
pdfData = File.ReadAllBytes(@"c:\LastPDFRender.pdf");
if (pdfData != null)
{
PdfDocument pdfDocument = new PdfDocument(pdfData);
if (pdfDocument != null && pdfDocument.Form != null && pdfDocument.Form.Fields != null)
{
MergeOptions options = new MergeOptions(true);
MergeDocument mergeDocument = new MergeDocument(pdfDocument, options);
for (int i = 0; i < mergeDocument.Form.Fields.Count; i++)
{
mergeDocument.Form.Fields[i].Value = "Yes";
mergeDocument.Form.Fields[i].IsReadOnly = true;
}
mergeDocument.Draw(@"c:\test123.pdf");
}
}
When I run this code and set the checkboxes to ReadOnly mode, the border of the checkbox is not visible and it's hard to tell where a checkbox should be.
Is there a way to solve this ?
Invisble Checkbox when set to read only
Re: Invisble Checkbox when set to read only
Support · Nov 6, 2007Hello,
If the CheckBox has no borders then it will not be visible after making it as ReadOnly. You can see the check box by adding a reactangle in the place of the checkbox with the same width and height of the check box. You can get the X, Y, width and height of the checkbox by using the GetX, GetY, Width and Height properties of the PdfFormField.
Thanks,
ceTe Software Support Team.
Re: Invisble Checkbox when set to read only
Forum member · Nov 6, 2007Thank you very much ! setting a border to the checkboxes at creation time worked perfectly.