Hi Tuan,
thanks for providing details about your use case. So basically it would be the generation of a new MS Word document based on a form-like template into which case properties are ingested at certain locations.
I'm aware of a demo asset which we can use that provides similar capabilities. From an architectural PoV it runs as a docker container and provides REST services to create Word and PDF documents based on Word templates in which placeholders are replaced by data provided as payload to the REST call and a BAW toolkit provides the "glue" to use it.
There also exists a description how you can generate PDF document based on a template using a public service API (https://medium.com/sameh-nasef/how-to-generate-pdf-documents-in-ibm-bpm-baw-ad42bfdd8867).
Furthermore, our DACH expert labs team has a commercially offered asset that creates PDF documents based on HTML-5 templates and a JSON payload passed via a REST API call. Again, the document generation service provides a REST API and is delivered as a container which can be hosted on Docker or K8s. The document will be generated from BAW by calling the REST service. If you are interested in learning more about this offering, I can provide a contact in our expert labs team in a private message.
Best regards,
Michael
------------------------------
Michael Kirchner
Sr. Business Automation Partner Technical Specialist
IBM Technology
Germany
------------------------------
Original Message:
Sent: Fri March 24, 2023 01:00 AM
From: Tuan Kubaha
Subject: BAW - Case Features - How to generate a PDF from a View
Hi Michael,
Actually, my use case is the other way round. Instead of data pulled from the scanned document that was processed by ADP or Datacap, and assigned the captured data to case properties, the use case is to fill the fields in the document template located in the repository with the case property values, and expose the filled document to users via a case widget. Then, they can print it out or save as a pdf file.
I don't know if that is possible. If there is a way to do something like this, I am sure that it will solve the problem.
Thanks and best regards,
Tuan
------------------------------
Tuan Kubaha
Original Message:
Sent: Thu March 23, 2023 08:38 AM
From: Michael Kirchner
Subject: BAW - Case Features - How to generate a PDF from a View
Hi Tuan,
your use case is that a structured document (a form) has been stored as PDF and you want to extract data from that document (e.g. field level data in the form like "first name", "last name", etc.) and store this information as case data fields?
If my understanding is correct, I would not recommend trying to do that in a widget. The better approach would be sending the document to e.g. Automation Document Processing (ADP) or Datacap in order to extract the values and return the results. This could be done by using the REST APIs ADP or Datacap provide. However, you need to keep in mind that both ADP and Datacap are working batch oriented, so extracting the values should be a background activity rather than a front end operation happening when a user works on the case in the UI.
Best regards,
Michael
------------------------------
Michael Kirchner
Sr. Business Automation Partner Technical Specialist
IBM Technology
Germany
Original Message:
Sent: Wed March 22, 2023 09:56 PM
From: Tuan Kubaha
Subject: BAW - Case Features - How to generate a PDF from a View
Hi Dave,
I found this question related to my case and I am thinking of using a form template that was created by using Microsoft Word with form fields and saved as a pdf file. Is there a way for a widget to load the this pdf file and populate fields with values of specified variables?
Regards,
Tuan
------------------------------
Tuan Kubaha
Original Message:
Sent: Fri February 05, 2021 11:37 AM
From: DAVE PERMAN
Subject: BAW - Case Features - How to generate a PDF from a View
Hi Martin. As you have found, the pages in the Case Client are not "flat" and as such, are not really suitable for a browser "print" action.
Some options are:
1) in some cases, you can set the size of the page widgets explicitly in the Page Designer if you know s good size that will prevent each widget's internal scrolling from kicking in. The main page itself will then scroll but that should allow it to be printed completely
2) Create a custom script action or custom page widget that generates a browser printable popup that includes the data you want in a nice printable format. And action button on your page will be passed the caseEditable js object and that has all the info about the case, including each property and its value. Your code would basically generate HTML markup and direct it to a new popup window which could then be printed or saved as PDF by the browser.
3) For pixel perfect requirements, there are third party tools that allow the programatic generation of PDFs directly or the population of existing "form like" pdfs with data from the case. These tools often have java or rest APIs.
------------------------------
DAVE PERMAN
Original Message:
Sent: Tue January 26, 2021 05:35 PM
From: Martin Iturbide
Subject: BAW - Case Features - How to generate a PDF from a View
Hi
When the user is working on the workflow (Case features solution / Case Manager), he wants to generate a PDF from a page (using the Case Features Views). If he tries to print the page to create a PDF, the view only shows as the screen and do not print the entire view as a page.
Let me share some images:
- https://i.imgur.com/q47ECuQ.png
- https://i.imgur.com/cLnP525.png
- https://i.imgur.com/BgZdArw.png
Here you can see that on print, the "view" got cut on the print. And I would also like to only print the "View" and not the widgets on the right.
Is there any technique, tips or advice to allow the user to create a PDF from a view he is viewing?
Thanks in advance
------------------------------
Martin Iturbide
Consultant
Next Step C.A.
Quito
------------------------------