PDF creation

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Fromm603
Posts: 17
Joined: Fri Apr 26, 2019 10:51 pm

PDF creation

Post by Fromm603 » Sat Jul 20, 2019 5:18 am

Can I use VL to create a PDF report? We don't have Integrator (unless somehow that is included in VL).
I want to be able to create a fairly simple item report, with item, some text, and the item image. Basically a checklist of items in a shipment.
If so, is there a sample application that comes with VL? I've looked but no luck finding anything.
Then the trick is, how do I call that from an IBMi program?

atostaine
Posts: 388
Joined: Wed Jan 20, 2016 7:38 am

Re: PDF creation

Post by atostaine » Sat Jul 20, 2019 5:27 am

Fromm603 wrote:
Sat Jul 20, 2019 5:18 am
Can I use VL to create a PDF report? We don't have Integrator (unless somehow that is included in VL).
I want to be able to create a fairly simple item report, with item, some text, and the item image. Basically a checklist of items in a shipment.
If so, is there a sample application that comes with VL? I've looked but no luck finding anything.
Then the trick is, how do I call that from an IBMi program?
If you want to do it with VL, you can find sample programs to write to a word document or Excel, then do a save as a PDF. It works well.

We did a spreadsheet with one line per inventory item. It has columns for price, qty on hand, description, etc, and then an image at the end of the row.

Art
Art Tostaine

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: PDF creation

Post by Stewart Marshall » Sun Jul 21, 2019 9:04 pm

Have a look at PDFMake.Org

I know of others who've wrapped this up in a widget and now produce some brilliant client side PDFs
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

MarkD
Posts: 605
Joined: Wed Dec 02, 2015 9:56 am

Re: PDF creation

Post by MarkD » Mon Jul 22, 2019 11:02 am

There is an example of producing client-side PDF files in the VLF-ONE shipped demonstration.
Capture.PNG
Capture.PNG (87.6 KiB) Viewed 84 times
The example is made for VLF-ONE but most of the code could be used in any VL-Web application.

The main components are VL reusable part DF_T69H30 (Print Sample Invoice) and a VL widget named DF_T69CTO.

There is also a resource file named DF_PrintWidget.js in the VL-Web main folder.

If you don’t have VLF installed in your partition it’s pretty easy to do, just use the partition initialize option on the VL IDE logon screen and tick the VLF option.

Post Reply