Aspose.PDF for .NET looking for example code using OnReleaseMouseBtn

I have a PDF template where I’m setting a select list ID programmatically. Problem is, another field is populated by a mouse up action. I’m looking for an example of how to do this using OnReleaseMouseBtn. Thank you.

@uberknot

Can you please share a bit more details like code snippet and the sample PDF? We will test the scenario in our environment and address it accordingly.

Code snippet:

using Aspose.Pdf;
public PDFDocument(PDFTemplate e, string templatePath)
{
doc = new Aspose.Pdf.Facades.Form();
doc.BindPdf(Path.Combine(templatePath, TEMPLATE_FILE_NAME));
PopulateDocument(e);
}
//This is where we assign values to text fields, dropdowns, checkboxes, etc…
private void PopulateDocument(PDFTemplate e)
{
//Dropdown field
doc.FillField(“FieldNameA”, e.DropdownInt);
}

Yes, I can provide a code snippet. See next reply. Thank you!

@uberknot

Looks like there is an Action set inside PDF JavaScript that is executed on OnReleaseMouseBtn event and you are trying to execute it using the API in the code. Are we getting it right? Can you please share the sample PDF as well so that we can investigate whether it is possible or not?

Yes, that is what I’m wanting to do. I will have to ask my customer if I can share the PDF. Are there any generic examples of setting that action programmatically? I could not find any in the API documentation.

@uberknot

You are asking to modify an existing JavaScript action inside PDF document using the API. We need to analyze if it is possible. Please take your time to gather a sample PDF document so that we can log an investigation ticket in our issue tracking system for this scenario. We will then share the ticket ID with you.

1 Like

See Section 1. We programmatically set the select list item but the text box to the right only populates by user action when select list mouse button is released. We wish to accomplish this action programmatically so the text box to the right populates without user interaction. Thank you.
DON_Cyber_Workforce_Coding_Sheet_Oct_2023.pdf (1.3 MB)

@uberknot

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56752

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you Asad.