What are the limitations using "OutputService" over "formService" in AEM to generate pdf ? | Community
Skip to main content
Level 2
January 12, 2023
Solved

What are the limitations using "OutputService" over "formService" in AEM to generate pdf ?

  • January 12, 2023
  • 2 replies
  • 1639 views

Hi team,

Can Some pls provide any resources to Understand the limitations of "OutputService"   over "formService".

Env details - AEM 6.5 (On-Premise) Forms-add-on package (adobe-aemfd-win-pkg-6.0.640.zip), OSGI forms & output service.

I AM facing some issues in java script part of XDP, especially in java script accessing data of table and manipulating the table structure of dynamic table (XML based data).

Pls provide any resources or leads to understand these limitations.

 

thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Monendra_Singh

The Output Service is used to generate PDF, HTML, or print-ready output from an XDP form template. It is built on top of the AEM Forms Document Services, which provides a set of APIs for creating, manipulating, and rendering PDF documents.

The Form Service, on the other hand, is used for form-related functionality such as creating, populating, and validating forms. It also provides APIs for working with data submitted by forms, including data stored in AEM JCR repository.

The limitations of the Output Service over the Form Service will depend on the specific use case and requirements of your application. However, here are some general limitations to keep in mind:

  • Output Service is mainly used for generating output (PDF, HTML, Print-ready) and it's limited to that. It doesn't provide any form-related functionality like form creation, population, validation.

  • The Output Service is primarily used for generating output from an XDP form template and does not provide the same level of granular control over the data and layout of the form as the Form Service.

  • The Form Service provides a more extensive set of APIs for working with form data, including data stored in the JCR repository. It allows you to manipulate data in a more granular way, including working with tables and dynamic table structures.

2 replies

Vijay_Katoch
Community Advisor
Community Advisor
January 12, 2023

Output Service - Typically this service is used to merge XML data with an xdp template or pdf to generate a flattened pdf.

 

Using the instance manager through javascript you can do easy manipulation of data in a dynamic table.

 

 

https://experienceleague.adobe.com/docs/experience-manager-learn/forms/document-services/output-and-forms-services-article-develop.html?lang=en#:~:text=Output%20Service%20%2D%20Typically%20this%20service,from%20and%20into%20PDF%20file.

bhanu2Author
Level 2
January 13, 2023

@vijay_katoch thanks for your response.

The following table I have designed in Livecycle Designer 11 As a dynamic table.

 

Here I am concatenating cell2 & cell3 & cell4 data in cell1 and hiding the cell2 & cell3 & cell4,Rearrange the table widths.

The above function will be invoked on Page1.initilize evenet.

To display data in cell1 of (Address, BuildingNo, locationNo together)

On formready:

/*xfa.resolveNode("Row1[0].Cell1[0]").rawValue=xfa.resolveNode("Row1[0].BuildingNo[0]").rawValue+"-"+xfa.resolveNode("Row1[0].LocationNo[0]").rawValue+" "+xfa.resolveNode("Row1[0].Address[0]").rawValue;

xfa.resolveNode("Row1[1].Cell1[0]").rawValue=xfa.resolveNode("Row1[1].BuildingNo[0]").rawValue+"-"+xfa.resolveNode("Row1[1].LocationNo[0]").rawValue+" "+xfa.resolveNode("Row1[1].Address[0]").rawValue;

xfa.resolveNode("Row1[2].Cell1[0]").rawValue=xfa.resolveNode("Row1[2].BuildingNo[0]").rawValue+"-"+xfa.resolveNode("Row1[2].LocationNo[0]").rawValue+" "+xfa.resolveNode("Row1[2].Address[0]").rawValue;

xfa.resolveNode("Row1[3].Cell1[0]").rawValue=xfa.resolveNode("Row1[3].BuildingNo[0]").rawValue+"-"+xfa.resolveNode("Row1[3].LocationNo[0]").rawValue+" "+xfa.resolveNode("Row1[3].Address[0]").rawValue;*/

 

(OR)

 

this.rawValue=BuildingNo.rawValue+"-"+LocationNo.rawValue+" "+Address.rawValue;

 

  • here Output service failed to load table and table data.
  • But FormService is working fine.

can you please update me the limitations in my script. 

 

 

Thanks

Vijay_Katoch
Community Advisor
Community Advisor
January 13, 2023

Is your form working as expected while you preview it with sample data? 

Monendra_Singh
Monendra_SinghAccepted solution
Level 3
January 12, 2023

The Output Service is used to generate PDF, HTML, or print-ready output from an XDP form template. It is built on top of the AEM Forms Document Services, which provides a set of APIs for creating, manipulating, and rendering PDF documents.

The Form Service, on the other hand, is used for form-related functionality such as creating, populating, and validating forms. It also provides APIs for working with data submitted by forms, including data stored in AEM JCR repository.

The limitations of the Output Service over the Form Service will depend on the specific use case and requirements of your application. However, here are some general limitations to keep in mind:

  • Output Service is mainly used for generating output (PDF, HTML, Print-ready) and it's limited to that. It doesn't provide any form-related functionality like form creation, population, validation.

  • The Output Service is primarily used for generating output from an XDP form template and does not provide the same level of granular control over the data and layout of the form as the Form Service.

  • The Form Service provides a more extensive set of APIs for working with form data, including data stored in the JCR repository. It allows you to manipulate data in a more granular way, including working with tables and dynamic table structures.

bhanu2Author
Level 2
January 12, 2023

@monendra_singh  thanks for your response.

if "formservice" will be used to generate pdf (using .xdp template & xml data).

Which requires adobe reader to open always (bcz of interactive pdf). 

 

  •  lets say if I use FormService to generate PDF having scripting then to make it non-interactive or flat I will need to use OutputService/ AssemblerService? 

thanks.