BPM, Workflow, and Case

 View Only
Expand all | Collapse all

BAW - Case Features - How to generate a PDF from a View

  • 1.  BAW - Case Features - How to generate a PDF from a View

    Posted Tue January 26, 2021 05:36 PM
    Edited by Martin Iturbide Tue January 26, 2021 06:21 PM
    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
    ------------------------------


  • 2.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Wed February 03, 2021 08:55 AM
    Any help?
    I know nobody likes a "needy person" but I would love some opinions of experienced developers :)

    Regards

    ------------------------------
    Martin Iturbide
    Consultant
    Next Step C.A.
    Quito
    ------------------------------



  • 3.  RE: BAW - Case Features - How to generate a PDF from a View

    IBM TechXchange Speaker
    Posted Thu February 04, 2021 07:38 AM
    Martin, Thanks for posting. I will reach out to my old friends on the Case team and try to get you an answer asap.

    ------------------------------
    DAVID Jenness
    ------------------------------



  • 4.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Fri February 05, 2021 11:38 AM
    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
    ------------------------------



  • 5.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Mon February 08, 2021 11:53 AM
    Thank you very much Dave.

    Possible the #2 options will be the one that fits more my needs. If you have more documentation, pointers, samples or links that can help me with that I would appreciate it.

    Regards


    ------------------------------
    Martin Iturbide
    Consultant
    Next Step C.A.
    Quito
    ------------------------------



  • 6.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Wed March 22, 2023 09:56 PM

    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
    ------------------------------



  • 7.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Thu March 23, 2023 08:39 AM

    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
    ------------------------------



  • 8.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Fri March 24, 2023 01:00 AM

    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
    ------------------------------



  • 9.  RE: BAW - Case Features - How to generate a PDF from a View

    IBM Champion
    Posted Fri March 24, 2023 04:28 AM

    Hi Tuan,

    we have implemented a similar use case for one of our customers via a custom ICN PluginService:
    The customer creates a PDF form, the form fields are named accoding to the SymbolicNames of the attributes. The PluginService loads the form and iterates over the existing form fields and sets the values. After that the form is flattened.
    For this we work with apache pdf box.

    The layout is very limited here, because it is predefined by the PDF form. In the customer's UseCase this fits and he can configure the output completely via the provided PDF form.

    Not very comfortable but serves its purpose...

    Regards,

    Christoph



    ------------------------------
    Christoph Sünderkamp
    ------------------------------



  • 10.  RE: BAW - Case Features - How to generate a PDF from a View

    Posted Fri March 24, 2023 06:01 AM

    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
    ------------------------------