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: 31
Joined: Fri Apr 26, 2019 10:51 pm

PDF creation

Post by Fromm603 »

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: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: PDF creation

Post by atostaine »

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 »

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: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: PDF creation

Post by MarkD »

There is an example of producing client-side PDF files in the VLF-ONE shipped demonstration.
Capture.PNG
Capture.PNG (87.6 KiB) Viewed 17798 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.
adale
Posts: 210
Joined: Wed Apr 08, 2020 9:18 pm
Location: Poplarville, MS

Re: PDF creation

Post by adale »

I have tried to work with this a bit, and can get it to produce a "report", but it is not a PDF, but rather just an image?
Is there a setting or parm somewhere in the resource, widget, or RUP, where you can specify the output to be PDF?
Arlyn Dale
Servias LLC
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: PDF creation

Post by Dino »

It is a PDF.
itisapdf.png
itisapdf.png (53.57 KiB) Viewed 14086 times
A4 Invoice book.pdf
(155.05 KiB) Downloaded 3628 times
Post Reply