Getting page number from a field

Hi, I'm trying to get some specific signature data from a PDF (the page number). I'm iterating the form fields, but I'm unable to find what property / method contains the page number in which the signature is placed. Your help is much appreciated.

var pdfDoc = new PdfLoadedDocument(pdfStream);
var pdfForm = pdfDoc.Form;
if (pdfForm != null)
{
    foreach (PdfLoadedField field in pdfForm.Fields) 
    {
        if (field is PdfLoadedSignatureField signatureField)
        {
            // how to get the page number of this `signatureField`?
        }
    }
} 


5 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team October 1, 2020 12:57 PM UTC

Hi ICT IPB, 

Thank you for using Syncfusion products. 

Yes. We can get the page number of specific signature field is placed in the PDF document. We have to iterate the loaded page one by one and find the page number of specific signature field using a loop. We have created a simple sample for this and shared below for your reference. Kindly try the sample in your end and let us know if it is suites your requirement. 


Please let us know if you need any further assistance with this. 

Regards, 
Gowthamraj K 


Marked as answer

DA Dean Apriana Ramadhan October 2, 2020 01:42 AM UTC

Hi Gowthamraj,

Thank you for your response. Your solution works well. I think it would be better if PdfLoadedPage object has something like PageIndex property for easier access. Just a suggestion from me. Many thanks.


AP Anand Panchamoorthi Syncfusion Team October 2, 2020 01:02 PM UTC

Hi ICT IPB,

Thank you for the update. We glad to know that the issue has been resolved. We will consider your valuable suggestion and we will provide the API to get page number from PdfLoadedDocument in our upcoming product releases.

With Regards,
Anand P


KP Kris Penner March 14, 2022 09:37 AM UTC

  we will provide the API to get page number from PdfLoadedDocument in our upcoming product releases 


Was this ever implemented?


It would be very nice to just do:

field.Page.PageNumber




GK Gowthamraj Kumar Syncfusion Team March 14, 2022 12:52 PM UTC

Hi Kris,

No. We will consider your valuable suggestion and we will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases, at the planning stage of every release cycle, will review all the open features and we will notify you once this support is included. 

Please use the below feedback link to track the status of the feature. 
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon