Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Is it possible to load a xdp file into a subform?

Avatar

Former Community Member

Is it possible to load a xdp file into a subform?

7 Replies

Avatar

Level 10

At runtime in Acrobat or Reader? Nope, the template is a read only thing.

In Designer you can use either fragments or style sheets to load prepared forms or objects into your template.

Avatar

Former Community Member

In Designer i have a subform wich i'd like to fill with the xdp file content.

I can either use the xdp file or just pass the file content as string?

Can i do this?

Tnks

Avatar

Level 10

Select the subform, click right to open the context menu and select "Insert Fragment".

Then navigate to that XDP you wish to embed.

Avatar

Former Community Member

That worked with an existing fragment.

What i'm tryin to do is generate a xdp file like (which i can open in the designer as preview pdf correctly), and insert this as subform.

<?xml version="1.0" encoding="UTF-8"?>

<xfa>

   <template xmlns="http://www.xfa.org/schema/xfa-template/2.8/">

      <subform name="TopmostSubform">

         <pageSet name="PageSet">

            <pageArea name="MasterPage1" id="p1">

               <contentArea name="ContentArea" x="0pt" y="0pt" w="595.3pt" h="841.9pt"/>

               <medium stock="a4" short="595.3pt" long="841.9pt" orientation="portrait" imagingBBox="none"/>

            </pageArea>

            <pageArea name="MasterPage2" id="p2">

               <contentArea name="ContentArea" x="0pt" y="0pt" w="595.3pt" h="841.9pt"/>

               <medium stock="a4" short="595.3pt" long="841.9pt" orientation="portrait" imagingBBox="none"/>

            </pageArea>

         </pageSet>

         <subform name="Page1" w="595.3pt" h="841.9pt">

            <draw name="Text" x="59.25pt" y="117pt" minW="400.25pt" minH="12pt">

               <ui>

                  <textEdit multiLine="1"/>

               </ui>

               <value>

                  <exData contentType="text/html">

                     <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="text-align:justify;font-family:Verdana;font-size:10pt">Assunto: Ap&#xf3;lice n&#xba; #MC_Apolice_MC# - Actualiza&#xe7;&#xe3;o de Condi&#xe7;&#xf5;es 2012/2013</p></body>

                  </exData>

               </value>

               <para/>

            </draw>

            <draw name="Text" x="59.25pt" y="141pt" minW="88.25pt" minH="12pt">

               <ui>

                  <textEdit multiLine="1"/>

               </ui>

               <value>

                  <exData contentType="text/html">

                     <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="text-align:justify;font-family:Verdana;font-size:10pt">Estimado Cliente,</p></body>

                  </exData>

               </value>

               <para/>

            </draw>

            <draw name="Text" x="59.25pt" y="165.75pt" w="490.25pt" minH="24pt">

               <ui>

                  <textEdit multiLine="1"/>

               </ui>

               <value>

                  <exData contentType="text/html">

                     <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="text-align:justify;font-family:Verdana;font-size:10pt">Aproximando-se a data de renova&#xe7;&#xe3;o do seu seguro de sa&#xfa;de Multicare, vimos inform&#xe1;-lo das altera&#xe7;&#xf5;es que ocorrer&#xe3;o na sua ap&#xf3;lice a partir de #MC_Dt.Inicio_MC#.</p></body>

                  </exData>

               </value>

               <para/>

            </draw>

            <draw name="Text" x="59.25pt" y="201.75pt" minW="155pt" minH="12pt">

               <ui>

                  <textEdit multiLine="1"/>

               </ui>

               <value>

                  <exData contentType="text/html">

                     <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p style="text-align:justify;font-family:Verdana;font-size:10pt;font-weight:bold">Refor&#xe7;&#xe1;mos a sua prote&#xe7;&#xe3;o</p></body>

                  </exData>

               </value>

               <para/>

            </draw>

         </subform> 

      </subform>

   </template>

</xfa>

Avatar

Former Community Member

Just noticed ... it's a XFA file ...i'm new to adobe livecycle, and this is overwhelming

Avatar

Level 10

Then you have to create a fragment of an existing subform first.

Open that form you want to create a fragment from.

Select the subform, click right to open the context menu and select "Fragments" > "Create Fragment".

Enter a description and save it.

Then, open the other form to embed this fragment.

Here's a tutorial about fragments:

http://www.adobe.com/devnet/livecycle/articles/fragment_tutorial.edu.html

Avatar

Former Community Member

Thank you for your help, but i'm gonna do the report using a simpler report tool.