How do I export a .pdf report?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Linh
Posts: 16
Joined: Sun Mar 27, 2011 2:46 pm

How do I export a .pdf report?

Post by Linh » Sun May 15, 2011 3:10 am

I'm developing my first application in LiveCode. I tried with .csv file, but I want group some common data, .csv file can't do, for example:

Column 1: Product
LiveCode 4.6.1


Column 2: Users
Linh
Trevor
Lee
David

In this example, .csv file will create 4 rows with the same data in first column. Could I export my data in .pdf file with border (and so far, complex structure report)?

Regards,
Linh

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How do I export a .pdf report?

Post by Klaus » Sun May 15, 2011 11:39 am

Hi Linh,

create your card(s) as needed and then use
...
open printing to PDF "filename/goes/here.pdf"
print cd "xyz"
...
to print your card(s) into a PDF file, check the dictionary for more info.


Best

Klaus

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: How do I export a .pdf report?

Post by Janschenkel » Sun Jun 05, 2011 11:54 am

LiveCode's built-in 'print to pdf file' feature, added in version 4.5, is great if you already have the data displayed on-screen, in the format that you want it printed. It gets a little more complicated to script if your data is spread over multiple pages, but it is certainly convenient.

<tooting my own horn>
You could take a look at Quartam PDF Library: it offers a command to 'print' data in a tabular format.
It is a free / open source software project, available under the trms of the Affero GNU Public License (AGPL).
For more information, visit the Quartam Software website: www.quartam.com.
As an aside, it also works on LiveCode Server; here's a demo page which shows off its features.
</tooting my own horn>

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Post Reply