Re: Best solution for printing Enterable PDF docs from 4D v15

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Best solution for printing Enterable PDF docs from 4D v15

4D Tech mailing list
Ingo,

 

Thanks for your response.

 

Can you point me to any documentation that will explain what tools I need to
use to implement the workflow you described in your response?

 

Are you able to generate the Enterable PDF forms within 4D?  OR Do you have
to create the PDF with Adobe Acrobat first?

 

If you can generate the PDF within 4D, please direct me to documentation
specific to that process.

 

Thanks so much,

 

Chuck Morris

Impossible Solutions, Inc.

[hidden email] <mailto:[hidden email]>

407-342-1300

 

-----------

On Wed, 14 Jun 2017 16:25:49 +0200

Ingo Wolf <[hidden email] <mailto:[hidden email]> > wrote.

 

Hello,

 

we do exactly what you describe via xdp-files. That are pdf forms
encapsulated in some xml. The forms are created with Adobe Acrobat and
enhanced with Livecycle Designer. The pdf is then converted to Base64 and
embedded in a xdp, wich is xml following some specs from adobe. From 4D we
set the values of certain xml tags (via PROCESS 4D TAGS), which have the
same names as the form fields of the pdf form. Adobe Acrobat Reader then
feeds these values automatically into the corresponding form fields (upon
opening the .xdp-file). The maybe changed form field values are then sent
via email as xml file to 4D and imported back into the database records. For
linking with the original records we have xml tags containig the primary
keys.

 

HTH

Ingo Wolf

 

[hidden email] <mailto:[hidden email]>  schrieb
am Wed, 14 Jun 2017 00:47:18 -0700:

>I have a project where my client wants me to generate Enterable PDF forms

>within 4D that would be populated by variable data but also have form
fields

>that would be enterable by the customer.  

>

>

>

>Then my 4D App would email the form directly to the customer to be
completed

>and then emailed back to my client.

>

>

>

>It would then be best for automation if my 4D App could parse the PDF

>returned and populate data in 4D with the customer's completed form data.

 

 

--

 

 

 

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Best solution for printing Enterable PDF docs from 4D v15

4D Tech mailing list
Chuck,

we create the PDFs with Adobe Acrobat, not from within 4D. Here's an example of an xdp file:

<?xml version='1.0' encoding='UTF-8'?>
<?xfa generator='AdobeDesigner_V7.0' APIVersion='2.2.4333.0'?>
<xdp:xdp xmlns:xdp='http://ns.adobe.com/xdp/'>
    <xfa:datasets xmlns:xfa='http://www.xfa.org/schema/xfa-data/1.0/'>

        <xfa:data>
                <Tabelle>Firmenakte</Tabelle>
                <PrimaryKey>$PrimaryKey$</PrimaryKey>
          <Formular1>
                 <Kundenname>$Kundenname$</Kundenname>
                 <Strasse>$Strasse$</Strasse>
                 <Ort>$Ort$</Ort>
                 <PLZ>$PLZ$</PLZ>
                 <PictureField xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:contentType="image/gif"><!--4DVAR PIC_GetBase64(v_PictureField;".gif")--></PictureField>
          </Formular1>
        </xfa:data>

    </xfa:datasets>
    <pdf xmlns="http://ns.adobe.com/xdp/pdf/"><document>
       <chunk></chunk>
    </document></pdf>
</xdp:xdp>

Table name and primary key are right after <xfa:data>. These tags will be returned 1:1. All xml tags between <Formular1> and </Formular1> correspond to form fields in the pdf form (case sensitive). If the same form field has to appear multiple times in the pdf form, the corresponding xml tag has to appear the same number of times in the xdp (and can have different values!). Use CDATA, when the content of the field can have "xml forbidden" characters (e.g. "&", "<", ">"). These tags will be returned with whatever content the user has entered in the pdf form. You can even fill picture fields (BASE64 encoded).
The pdf file (converted to BASE64) itself has to be placed between <chunk> and </chunk>.
In Adobe Lifecycle Designer we add a button to the pdf form with the action "send via email". This sends the form fields as xml (xdp, can even include the pdf with user modified form fields as BASE64) to a predefined mail address, where a 4D process periodically checks the mails and parses the xml attachments for updating the records. In Adobe Lifecycle Designer one can also add validation code (javascript), e.g. for the email button to be hidden until all required fields have been entered.

Sorry, no documentation links at hand, most of this found out by trial&error.

HTH
Ingo Wolf

[hidden email] schrieb am Tue, 20 Jun 2017 08:59:58 -0700:

>Ingo,
>
>Thanks for your response.
>
>Can you point me to any documentation that will explain what tools I need to
>use to implement the workflow you described in your response?
>
>Are you able to generate the Enterable PDF forms within 4D?  OR Do you have
>to create the PDF with Adobe Acrobat first?
>
>If you can generate the PDF within 4D, please direct me to documentation
>specific to that process.
>
>Thanks so much,
>
>Chuck Morris


--
ViELMAC Ingo Wolf
Rheinhessenring 53A
D 55597 W├Âllstein
Tel. +49 (0)6703 3070320
Fax  +49 (0)6703 3070321
e-mail [hidden email]
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************