Skip to main content
April 7, 2021
Question

Pdf generation with grid

  • April 7, 2021
  • 7 replies
  • 0 views

Hi Experts,

Is it possible to generate pdf file with data in in tabular form.

I have a requirement where I need to generate the pdf having tables which contains rows defined dynamically.

7 replies

mikes0011
Brainy
April 7, 2021

Off the top of my head, your best bet may be the "PDF from HTML" Smart Service, found in the Dynamic Document Generator plug-in, since you could probably create an HTML table that would convert reasonably well.  Caveat that I haven't tried this directly, but it would probably be fairly easy to do a proof of concept and check whether the HTML table conversion abilities would be suitable for you.

Also the PDF Tools plug-in has some other advanced PDF creation smart services like "create PDF", but I don't think that has any inherent ability to create tables, though I could be wrong.  You might want to check out its documentation just in case.

April 7, 2021

Hi Ankitas ,

We implemented this recently in our project. Below are the steps followed

1)query the data and convert to the xml format.(output should be with in XML tags)

2)create one empty document as template and also inside the document just provide the ##variable name) .

3)Using the smart service(Create Document from Template) call the above rule and write the output to the document (Map the above rule  output to the ###variable.

4)create XML  XSLfile.  Please look into XML XSL templates(XML stylesheets)

5)Using the  smart service (PDF from XSL FO Transformation), provide the source input file as output from step3 and also place the XML XSL 

template.

By executing the steps , we can create dynamic pdf. 

Also please refer the below link for  sample template

https://community.appian.com/discussions/f/plug-ins/17891/pdf-from-xsl-fo-smart-service

Hope this helps!  please let me know if this works for you

Have a good day!

April 9, 2021

Hi [mention:8b16b01a9461443eae27679fda5d25f2:e9ed411860ed4f2ba0265705b8793d05],

Thanks for your response.

I have few queries on the points you suggested above.

2)create one empty document as template and also inside the document just provide the ##variable name) : What will be the type of document, html of .txt and with ##variable do you mean like the file will have a value ###testVariabl###.

3:Using the smart service(Create Document from Template) call the above rule and write the output to the document (Map the above rule output to the ###variable.: I cant find this Smart service in my environment, do i need to install some plugin for this.?

Thanks n Regards,

Ankita Singh

acaciob0002
April 10, 2021

Hi Ankita,

Let me try to help you with doubts.

  1. The file that you are trying to generate is an XML, therefore its extension must be .xml
  2. The smart service that you are looking for is Appian out of the box, and the name is Text Doc from Template

Regards,

Acacio B.