PeachDrawing.PDF.PdfPageSource

PdfPageSource.GetFormFields(int, double, Func<string,string>) Method

The interactive form fields (text fields, check boxes, radio buttons and choice fields) with widgets on a page, ready to add to a page of a document with AddField(PdfComposerPage, PdfFormFieldDefinition). Each field is drawn by the appearance stream of its own widget, so it looks as it did in the file; a push button or signature field has no definition here and is drawn by Paint(int, Canvas, PdfAnnotationPaint, PdfTagSession) with ExceptFormFields instead.

public System.Collections.Generic.IReadOnlyList<PeachDrawing.PDF.PdfFormFieldDefinition> GetFormFields(int pageIndex, double pixelsPerPoint=1.0, System.Func<string,string>? rename=null);

Parameters

pageIndex System.Int32

the zero-based page number

pixelsPerPoint System.Double

the layout units per point of the canvas the fields’ appearances are drawn at

rename System.Func<System.String,System.String>

maps a field’s name in the file to the name it is to have, for when the same page is added more than once; it is called once per widget with the field’s full name, so the buttons of a radio group, which share a name, must be given the same answer

Returns

System.Collections.Generic.IReadOnlyList<PdfFormFieldDefinition>
the fields, with positions in points from the top-left corner of the page as it is shown