PDA

View Full Version : Print the page in LZX


mohan
09-09-2003, 12:06 AM
Hi Antun,

I want to take the Printout of my application content in PDF format .So how can i do that.
In my application i want to take the print out of some of the information which contain in the text area in PDF format.And If i click on the Print PDF button, that content should be print in the PDF format.And also how can i convert lzx files in to PDF format.




Thanks,
Mallesh.

antun
09-09-2003, 08:17 AM
Hey Mallesh

There are no PDF creation APIs in LZX - you can't create a PDF on the client without installing software (such as Adobe Acrobat) on the client machine, and even then then there wouldn't really be a practical way for the Flash client to talk to the PDF software.

Instead, you could generate the PDF on the server (you'd have to have software to do this) and you would have to write some scripts with a CGI interface for the Laszlo app to talk to that would parametarize the document you want to create.

Say for example you had an app where the user could position an image, and some text that the user wrote: You would get the coordinates of the image using the LFC APIs (view.x and view.y), and retrieve the text (text.getText()). You could then send that information using an HTTP GET request to a script on the server, along with the URL of the image, and have that script call whatever PDF generation software you use.

To download it, the best thing to do would be to have a small window popup that allowed the user to retrieve it without navigating away from the app.

-Antun