Expand my Community achievements bar.

SOLVED

extract xml data from pdf form

Avatar

Former Community Member

Hello,

what are the conditions to be able to extract data from a pdf form ? I have thought, that it is required to have XML Schema data connection and that all the form fields must be bind to this data connection.

But today I found, that the fields can use just "Use name (FieldName)" connection, that is something default - and no explicit data connection is therefor needed.

What is the common approach for designing forms, that should be extracted by LC processFormSubmission ?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Any data that is extracted from an XFA designed form will be in an xml format. The question then becomes how to control the format of the data that is produced. By default the xml structure will follow that of the hierarchy (this is the use Fieldname binding or Normal binding). If you want the data to follow a particular structure (so that you can use it with other systems that have a defined format) then that is when you woudl use sample XML or a schema in the data connection. Then by binding nodes in the data connection to the fields, the form knows how to create the structure that you want. If structure is unimportant then simply stick with Normal bindings and no data connection is needed.

Hope that helps

Paul

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

Any data that is extracted from an XFA designed form will be in an xml format. The question then becomes how to control the format of the data that is produced. By default the xml structure will follow that of the hierarchy (this is the use Fieldname binding or Normal binding). If you want the data to follow a particular structure (so that you can use it with other systems that have a defined format) then that is when you woudl use sample XML or a schema in the data connection. Then by binding nodes in the data connection to the fields, the form knows how to create the structure that you want. If structure is unimportant then simply stick with Normal bindings and no data connection is needed.

Hope that helps

Paul

Avatar

Former Community Member

Thanks for perfectly clear explanation Paul.

Is the concept the same with filling forms ? When using e.g. renderPDFForm, is it possible to just follow the Normal/default binding structer in xml-input variable and so to fill the form without creating xml-schema and binding the form fields with it?

(I did test with this and it does not work for me, but I probably have error in xpath).

Avatar

Former Community Member

Yes it is possible ...just beware that the engine probably expects an XDP format so the root level structure might be different than you expect.

paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----