PDF saving Card hidding/jaming at some characters ?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

PDF saving Card hidding/jaming at some characters ?

Post by liveme » Thu Mar 25, 2021 10:03 pm

Hi ppl,

While saving my Card into a Pdf file, how can one avoid :
- Label Text to almost completely disapear from the printed doc ?
>> "T"...???
- 1rst DG line Date number being shifted on the right side ?
"Mars 2 82021" ???

*left, side : form with PDF print button.
*right side : printed document (I'm hidding the two buttons, back and pdf print until card is "pdf saved")
Thanks for any tricks !
PDF non showing characters.png

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

Re: PDF saving Card hidding/jaming at some characters ?

Post by dunbarx » Fri Mar 26, 2021 12:07 am

Hi.

Do I have this backwards? The problem is the right side, correct? But you said that was the "printed" side, not the "PDF" side.

Craig

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: PDF saving Card hidding/jaming at some characters ?

Post by liveme » Fri Mar 26, 2021 1:31 am

hmm, yes, the 2 default are visible on the Right side...whichshows the "printed" result. (exactely, its only a saved pdf file on the HD, not really printed on paper)
that sides only show the 1rst letter of a much longer title... :shock:

on the Left side : this is the Form/Card as it displays...with a one click a button on that card to print itself.
(that's how the Docs shows it can be done, printing the card itself.)

..so it "Should" be printed with the Title fully displayed...as well as all lines - correctly formated - of the DG line content below. :|
I am only hiding the print button itself before it creates the PDF on HD., and then restore it after its over.

I was thinking of looking for to save/print in a pdf just the DG frame only, but its convenient to have the Title just above.

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: PDF saving Card hidding/jaming at some characters ?

Post by liveme » Fri Mar 26, 2021 2:03 am

I've replaced the fld LABEL for a TEXT imput fld.
That seems to print the content correctly :!:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: PDF saving Card hidding/jaming at some characters ?

Post by jacque » Fri Mar 26, 2021 8:08 pm

Label fields are right-aligned by default, which might be what caused the problem. You can change the alignment in the property inspector. Or just use a normal text field as you did.

The misplaced date on the first line looks like there may be an invisible character inserted. The "8" at the end has a tail on the lower-left. Try re-typing that entry. It might be a unicode character that is not displayed in a LC field but is printed to PDF.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: PDF saving Card hidding/jaming at some characters ?

Post by liveme » Fri Mar 26, 2021 9:27 pm

Ok, thanks. I will test the Label use.

As for the Date, They are autogenerated by a script adding X days each time at every new line.
All results being calculated from a single input field manualy entered : 28/03/2021
...though since the Title got "fixed" I can't reproduce an error with this line, so its working by now.

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: PDF saving Card hidding/jaming at some characters ?

Post by liveme » Sat Mar 27, 2021 7:04 am

Code: Select all

 repeat for each line daguy in field "listev" of card 1
      
      put daguy into mevol
      convert zisday to abbr date
      put zisday into tData[i]["Date"]
maybe a field input text sanitizing could get rid of the hidden bug char. though I don't see how a char could be somehow inserted
betweeb a "." and a "," ... ( while input is just 28/03/2021 )
:roll:

see latest eratic date display...
worse.png
worse.png (16.39 KiB) Viewed 3402 times

liveme
Posts: 240
Joined: Thu Aug 27, 2015 5:22 pm
Location: down under

Re: PDF saving Card hidding/jaming at some characters ?

Post by liveme » Sat Mar 27, 2021 8:18 am

last trick, I did not "improove", textencode or sanitize the input field.
- came to think that mayyyybe having buttons above the Datagrid could coze this jam...
moved the "pdf print" buttons below the DG (still hiding them when necessary)
..As for now, it solves the 1rst line problem...date output prints "normaly"
(as well as do the one on lines below)
Having "stuff" ahead of a Datagrid while sending a card to be PDF printed could be one reason...or not.

to beat or to to beat the "g..uB " !
:mrgreen:

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”