Looking at the pdf library but not even sure where to start.
I need to be able to print a card to an 8 1/2 x 11 sheet of paper (and save that pdf, preferably automatically)
The screen is not laid out the same each time. (The position of text boxes may change, etc.)
Is it possible to get the current layout / position and contents of the fields, write that to a pdf, open it and save it. ( I would prefer it to be saved in a folder automatically)
The #1 goal is printing, the #2 goal is saving a copy.
Thanks.
Create, be able to print then save a pdf...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 56
- Joined: Sat Jun 20, 2009 2:41 pm
-
- Posts: 56
- Joined: Sat Jun 20, 2009 2:41 pm
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Hi There,
There is unfortunately no magic 'print this card' command in the library. That's partially because not all of the necessary parts are there (clipping and unicode come to mind) but also because of the inherent complexity of the task: rev controls can have a dazzling combination of properties, some of which even have platform-specific side effects.
That being said, you most certainly can make 'dynamic' layouts by scripting your 'report rendering' process flexibly. Just a few hints:
There is unfortunately no magic 'print this card' command in the library. That's partially because not all of the necessary parts are there (clipping and unicode come to mind) but also because of the inherent complexity of the task: rev controls can have a dazzling combination of properties, some of which even have platform-specific side effects.
That being said, you most certainly can make 'dynamic' layouts by scripting your 'report rendering' process flexibly. Just a few hints:
- in the qrtPDF_CreateDocument function, one of the parameters is the document unit (points, millimeters, centimeters, inches) ; a 'point' is roughly the same as a pixel on screen so using that unit will save you from having to do a unit conversion
-> there are also unit conversion functions if you want to mix different approaches - by using the qrtPDF_GetXY function and the qrtPDF_SetXY command, you can remember positions and jump reltive distances from the current XY text coordinate
- building a full-blown layout builder for end-users is not exactly an easy job but converting a 'layout' stack into a 'rendering' script is certainly achievable and can be simplified by applying conventions and not getting over-ambitious in the special effects department
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com