Page 1 of 1

PDF creation

Posted: Sat Jul 20, 2019 5:18 am
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?

Re: PDF creation

Posted: Sat Jul 20, 2019 5:27 am
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

Re: PDF creation

Posted: Sun Jul 21, 2019 9:04 pm
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

Re: PDF creation

Posted: Mon Jul 22, 2019 11:02 am
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 17794 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.

Re: PDF creation

Posted: Thu Nov 10, 2022 5:44 am
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?

Re: PDF creation

Posted: Wed Nov 16, 2022 10:02 am
by Dino
It is a PDF.
itisapdf.png
itisapdf.png (53.57 KiB) Viewed 14082 times
A4 Invoice book.pdf
(155.05 KiB) Downloaded 3627 times