How to add a new Detail row into AcroForm Document

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
apx
User
Posts: 25
Joined: Tue Sep 12, 2017 1:43 pm

How to add a new Detail row into AcroForm Document

Post by apx »

Hi,
I have a PDF form which has several detail areas. I wonder how I proceed correctly when I want to fill out the form.
If I get the field names of the form from pDoc.AcroForm, I get the following names.

Code: Select all

F[0].P2[0].KK[0].maengel[0].wartung_detail[0].Beschreibung[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[0].Mangelart[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[0].cb_add[0] <-- That is a Button in the Form that adds a new row to wartung_detail
F[0].P2[0].KK[0].maengel[0].wartung_detail[0].cb_del[0] <-- That is a Button in the Form that deletes the current row from wartung_detail
F[0].P2[0].KK[0].maengel[0].wartung_detail[1].Beschreibung[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[1].Mangelart[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[1].cb_add[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[1].cb_del[0]
F[0].P2[0].KK[0].maengel[0].wartung_detail[2].Beschreibung[0]
F[0].P2[0].KK[0].maengel[0].wartung_detail[2].Mangelart[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[2].cb_add[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[2].cb_del[0] 
As you can see from the field names, "F[0].P2[0].KK[0].maengel[0].wartung_detail[2]" is the detail area I want to add a new one (wartung_detail[3]).

How do I use IPXC_AcroForm::CreateField correctly?
Do I need to add

Code: Select all

F[0].P2[0].KK[0].maengel[0].wartung_detail[3].Beschreibung[0]
F[0].P2[0].KK[0].maengel[0].wartung_detail[3].Mangelart[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[3].cb_add[0] 
F[0].P2[0].KK[0].maengel[0].wartung_detail[3].cb_del[0] 
?
And how should I know the pRect of the fields?

Any help would be nice.

tia
Alex
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: How to add a new Detail row into AcroForm Document

Post by Ivan - Tracker Software »

Taking field names into account it looks like your form is XFA and you cannot add fields or widgets to this kind of form.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
apx
User
Posts: 25
Joined: Tue Sep 12, 2017 1:43 pm

Re: How to add a new Detail row into AcroForm Document

Post by apx »

But reading is supported and not a coincidence?
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: How to add a new Detail row into AcroForm Document

Post by Ivan - Tracker Software »

Yes, you right.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Post Reply