AurysVrV
AurysVrV

Reputation: 107

Trigger javascript function or event inside a PDF

I'm trying to fill a XFA PDF using JavaScript/Java. The PDF is not made by me; I need to download it, fill it and upload back.

The PDF has a button for Import XML which does the work just fine, but I want to do it programmatically for my clients.

Is there any way to execute a JavaScript function inside the PDF or trigger the button event? I've tried to embed the XML as an attachment, but it doesn't trigger anything and the data is unchanged…

The PDF can be found here: https://mfinante.gov.ro/documents/2552173/2552377/02_F1103_Buget_individual_2022_07_07_A2.0.125.pdf/ee988bfb-b7bc-8774-29b5-95b0dc94df7e?t=1657200566548

And a XML example would be:

<f1103 d_rec="0" suma_control="18332934" luna_r="01" an="2025" nume_ip="dsadsadasd" cui_ip="17460640" special="0" tip_bug="I" an_apr="2025">
    <f1103_buget cod_sec_bug="02" cod_prog_bug="0000000000" cod_sfin="A" sect="F">
        <f1103_indicator cf_cap="11" cf_scap="05" cf_par="00" ce_titlu="00" ce_art="00" ce_alin="00" cb_an_0="12312" cb_an_1="124124" cb_an_2="423423" cb_an_3="123" cb_an_ult="312312" ca_an_0="0" limita_ca_an_0="0"/>
    </f1103_buget>
</f1103>

Upvotes: 2

Views: 207

Answers (0)

Related Questions