PDF for Windows different than Mac

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5481
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

PDF for Windows different than Mac

Post by dunbarx » Mon Mar 19, 2018 8:13 pm

I am building a desktop app where I make a pdf of a card. I develop on a Mac, but publish to Windows 7.

In the IDE, the text in small fields looks fine. When I build a standalone, the text in those same fields looks fine in the Mac standalone, but is truncated in the Windows standalone, as if the margins are all screwy. The rightmost portion of text is cut off.

I can make the fields much wider, I suppose, but then I run into other problems.

Is it a setting somewhere? Is it just the way the LC pdf library builds? Why can't we all just learn to live together?

Craig Newman

SparkOut
Posts: 1762
Joined: Sun Sep 23, 2007 4:58 pm

Re: PDF for Windows different than Mac

Post by SparkOut » Mon Mar 19, 2018 9:35 pm

Just a guess... does it make a difference if you set the 'format for printing" to true on the stack for Windows?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5481
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: PDF for Windows different than Mac

Post by dunbarx » Mon Mar 19, 2018 9:50 pm

Hi.

I will try that. Thanks,

Interestingly, the dictionary states, and particular to Windows:
For the best appearance of printed cards in a stack, make sure the stack is closed (and not in memory), then set the stack's formatForPrinting property to true before opening the stack to print it.
Now I have been doing this for a while, and am not sure how I would set that property in a stack that has not yet been opened in the current session. It is not, I believe, a global LC property.

But your point seems, er, on point. So I will include a line that sets that property before printing, and report back.

Craig

SparkOut
Posts: 1762
Joined: Sun Sep 23, 2007 4:58 pm

Re: PDF for Windows different than Mac

Post by SparkOut » Mon Mar 19, 2018 10:07 pm

Not sure if that's (still) strictly accurate. On a Windows machine you can have a stack open, set the format for printing to true or false and see the font metrics change on the screen. When true the screen view looks like a pig which is most probably why trying to do this offscreen is still relevant.
I could be wrong but I also thought the property was saved with a stack so on creation of an offscreen print stack you could set the format for printing to true and save it. Then when you add text to the offscreen stack it should already be set to render correctly when printed.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5481
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: PDF for Windows different than Mac

Post by dunbarx » Tue Mar 20, 2018 12:10 am

Sparkout.

That may just have done it. I set the property just before printing, and reset it right afterwards, since I was warned that the IDE may look odd with it set. Not sure if that is a windows-only thing or not, but better safe than sorry.

Thank you. I will check tomorrow when a half dozen different machines start printing PDF's.

Craig

Post Reply

Return to “Talking LiveCode”