More Hebrew Problems
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
More Hebrew Problems
So... I am having more Hebrew problems.
I am trying to print a card to pdf, but the print fails if there is Hebrew in a field on the page. It prints in English until it gets to the Hebrew and then it terminates the print job. But, if I there is no Hebrew on the page, it prints without a hitch.
Any ideas at all? Is there some other way to print? It seems to me like this is a bug in Livecode's print to pdf.
I am trying to print a card to pdf, but the print fails if there is Hebrew in a field on the page. It prints in English until it gets to the Hebrew and then it terminates the print job. But, if I there is no Hebrew on the page, it prints without a hitch.
Any ideas at all? Is there some other way to print? It seems to me like this is a bug in Livecode's print to pdf.
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: More Hebrew Problems
Well, I would suppose you have tried printing an image of the field?
This is odd as I have successfully exported Sanskrit text, using non-standard glyphs
in the Unicode Personal Private Use Area.
This is odd as I have successfully exported Sanskrit text, using non-standard glyphs
in the Unicode Personal Private Use Area.
Last edited by richmond62 on Thu Jul 02, 2020 11:27 am, edited 1 time in total.
Re: More Hebrew Problems
No, I probably haven't. This is what I am doing:
What does it mean to print an image of a card?open printing to pdf prntPath
if the result is "Cancel" then
answer warning "Printing Canceled"
else
repeat with i=1 to 34 -- number of students
put "print"&i into printi
if cd fld "studentName" of cd printi of stack "printMenus" is not empty then
print card printi of stack "printMenus" into 0,50,575,750
print break
end if
end repeat
end if
close printing
launch document prntPath
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: More Hebrew Problems
Hi.
You are saying that the actual contents of the card terminates the printing process??? I cannot imagine how this could be.
Others will have to chime in. I am only here to ask what you meant by "print break". Oh, and you must be an old Hypercard user, because the phrase "cd fld" is no longer required: there is only one kind of field object in LC.
Craig
You are saying that the actual contents of the card terminates the printing process??? I cannot imagine how this could be.
Others will have to chime in. I am only here to ask what you meant by "print break". Oh, and you must be an old Hypercard user, because the phrase "cd fld" is no longer required: there is only one kind of field object in LC.
Craig
Re: More Hebrew Problems
Yes, cd fld is definitely a habit / relic from my Supercard days (remember that?) But still works. Basically I have not programmed since then so that gives you a sense of how long it has been since I have touched programming.
print break is apparently the command to print a page break.
print break is apparently the command to print a page break.
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: More Hebrew Problems
As far as I know, one can only export to PDF from Macintosh . . .
- -
- -
Code: Select all
on mouseUp
ask file "Save as:" with "Print.pdf"
put it into tFileName
if tFileName is empty then exit to top
set the printerOutput to "file:" & tFileName
revShowPrintDialog false, false
revPrintField the long name of fld "ff"
end mouseUp
- Attachments
-
- Chiam.livecode.zip
- Here's the stack.
- (1.01 KiB) Downloaded 164 times
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: More Hebrew Problems
Whoops: I overlooked that you were trying to print the whole card to PDF.I am trying to print a card to pdf
Is that strictly necessary?
Why not 'just' export a screenshot of the card?
Re: More Hebrew Problems
No, with LC 9.6 it works for mac, windows, linux, ios and androidrichmond62 wrote: ↑Thu Jul 02, 2020 3:08 pmAs far as I know, one can only export to PDF from Macintosh . . .
Because in a PDF file text in fields remains text and can be copied.richmond62 wrote: ↑Thu Jul 02, 2020 3:10 pmWhoops: I overlooked that you were trying to print the whole card to PDF.I am trying to print a card to pdf
Is that strictly necessary?
Why not 'just' export a screenshot of the card?
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: More Hebrew Problems
Very good to know.No, with LC 9.6 it works for mac, windows, linux, ios and android
And will my code work cross-platform for that?
Indeed it does . . .Because in a PDF file text in fields remains text and can be copied.
Although go back about 15 years and you'd be hard put to copy from a PDF as
at that point there was no embedded text layer.
Last edited by richmond62 on Thu Jul 02, 2020 4:14 pm, edited 3 times in total.
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: More Hebrew Problems
I don't know HOW one can expect to export a "PDF" of a card from a stack as this
would involve decomposing the card into pictorial components with text-embedded bits as well.
- -
would involve decomposing the card into pictorial components with text-embedded bits as well.
- -
- Attachments
-
- Leah.livecode.zip
- Here's the stack.
- (1.31 KiB) Downloaded 144 times
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: More Hebrew Problems
Aha. That actual string is not in the dictionary, even the glossary, only as a part of the discussion of the "print" command. Good to know.print break is apparently the command to print a page break.
Yes, LC has retained legacy HC and SC syntax as long as there is no conflict with the current state of the language. The important thing to know, which I am sure you do, is that there is no background object type, so there is no distinction between "cd fld" and either of "fld" or "bg fld".Yes, cd fld is definitely a habit / relic from my Supercard days (remember that?) But still works
Craig
Re: More Hebrew Problems
Thank you all for the idea of snapShot -- a new command to me.
I have been playing with it, and the quality of the snapshot is low. Writing and graphics are all pixelated. Is there a setting to increase the quality? there seems to be something called metaData but I cannot find any examples of how to use this or if it is even relevant. Thoughts?
I have been playing with it, and the quality of the snapshot is low. Writing and graphics are all pixelated. Is there a setting to increase the quality? there seems to be something called metaData but I cannot find any examples of how to use this or if it is even relevant. Thoughts?
Re: More Hebrew Problems
Well, the first thing I wondered is if you had come across this article in Max's excellent wiki?
For instance....
Frankly, I don't see that you would need to use the metadata unless you were including information in the picture file that isn't the picture itself. I'm also curious as to why you would see any pixelation at all. For instance, I set up a card with this picture in it - And then exported it with this command from the message box ...
...and it produced this snapshot...
...which looks pretty clean to me ?
For instance....
The dictionary says much the same, but doesn't include Richard's excellent tip on the bottom of the page linked too.egolombek wrote: ↑Fri Jul 03, 2020 6:16 am...there seems to be something called metaData but I cannot find any examples of how to use this or if it is even relevant.The Wiki wrote: metadata - The metadata is an array of metadata. Currently the only key supported is "density" with a value in pixels per inch (ppi).
Frankly, I don't see that you would need to use the metadata unless you were including information in the picture file that isn't the picture itself. I'm also curious as to why you would see any pixelation at all. For instance, I set up a card with this picture in it - And then exported it with this command from the message box ...
Code: Select all
export snapshot from this card to file "/home/bogs/Desktop/File1.png" as PNG
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: More Hebrew Problems
All.
Have we glossed over the fact that printing itself stopped simply because Hebrew characters were present in the text? How do it know? I would expect, and I am a newbie with all this unicode stuff, that at worst, some default "box" character would appear in place of chars that the printer could not understand.
But NOT that the print job itself would terminate.
Hmmm?
Craig
Have we glossed over the fact that printing itself stopped simply because Hebrew characters were present in the text? How do it know? I would expect, and I am a newbie with all this unicode stuff, that at worst, some default "box" character would appear in place of chars that the printer could not understand.
But NOT that the print job itself would terminate.
Hmmm?
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: More Hebrew Problems
I was wondering about the font too. There are many free fonts available on the web, maybe one of those would work better. Or maybe a different printer would work. One thing MC used to stress was that you need the latest print driver, so that would be another thing to check.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com