Clever document by livecode generator

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
user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Contact:

Clever document by livecode generator

Post by user#606 » Mon Dec 10, 2012 6:16 pm

Hi,
Imagine a comparison chart, where you have apartment numbers down the left and the features along the top.
This can be achieved with livecode using the basic grid so that the cell value, if clicked on, can take you to the card/page that expands the explanation of the cell value.

Now, Adobe will allow clicking on the cell (suitably formatted as a link) to take the user to the appropriate page. Obviously not the paper printout, just the computer screen representation of the chart/page.

The question is, is it possible to generate such a pdf (assuming a proper implementation of pdf generation) from livecode.
If so, has anyone advice or indicative code snippet for the cell so it can produce Adobe pdf links and function.

I look forward to your opinions.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Clever document by livecode generator

Post by Mark » Mon Dec 10, 2012 7:29 pm

Hi,

Perhaps you can do this with Qartam's PDF lib, but I never tried this.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Clever document by livecode generator

Post by jacque » Tue Dec 11, 2012 7:04 pm

Take a look at the dictionary entry for "print link". This lets you assign a clickable link when printing to PDF. I've never used it but apparently it's for exactly what you want to do.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Contact:

Re: Clever document by livecode generator

Post by user#606 » Wed Dec 12, 2012 5:21 pm

Thanks jacque
I had already looked at that and in conjunction with a lesson, found that the explanation was beyond me.
I see RTF and other markup systems inply you can create a link, but fail to explain.
I expected the word or phrase that is the visible link in the text to ahve a code at the start, perhaps the link address in brackets and a closing code.
Perhaps this is impossible to do!
What is the point of the Link tickbox on the menu bar -> Text . All it does is format the selected text with colour and underline. Another blind ally!
Are there any users out there that can provide help on this issue, with a snippet of workable code?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Clever document by livecode generator

Post by sturgis » Wed Dec 12, 2012 5:47 pm

Have you looked at this lesson? http://lessons.runrev.com/s/lessons/m/4 ... g-livecode Might help you get a better grasp on printing to pdf.

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Contact:

Re: Clever document by livecode generator

Post by user#606 » Wed Dec 12, 2012 6:03 pm

Yes, this is the lesson I referred to.
Having worked past the bits that dont work, I concluded this was a sledge hammer to crack a nut, when I reached "Bookmarks". If Livecode cannot do it simply, then it is a waste of time.
I experimented with a simple word doc and can reproduce the results I expected from Livecode, when printed as a pdf. So, I know that it is a viable solution to my task. Only Livecode stands in my way.
Thanks for your input.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Clever document by livecode generator

Post by jacque » Wed Dec 12, 2012 7:19 pm

According to the docs, LiveCode does do what you want. Setting the textstyle to "link" formats the selection with an underline and a color, and will treat it as linked area.

Note that the automatic behavior is to treat the text itself as the reference you want to jump to. That means you can't use text that says one thing and have it link to some unrelated text in the field. If you do want that behavior then you need to script a very precise print handler that manually sets up all the rectangles and references.

So this text in a field should work automatically:

As we mention in Section 2, blah blah blah.

Clicking "Section 2" would anchor to some section of your document called "Section 2". It won't link to text called "Chapter II" unless you write a print handler that specifically tells it to. I'm going by the docs, I haven't ever had to do this, but that's my understanding of it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply