Re: Open printing to pdf
GEORGE WOOD wrote: > Here is on example of what I tried: > > on mouseup > put “/Desktop/test files/Test.pdf” into temp > open printing to pdf temp > print cd 1 from (topleft of cd 1) to (bottomright of cd 1) > close printing > put the result > end mouseup "the result" returns exception info for the last command executed. In that case it's the "close printing" command. Move it a line up and it'll tell you what's happening with the print command. But add an error-check just after "open printing..." and I'll bet you'll find the culprit: You path begins with "/", which signifies the root of the volume. But "Desktop" is in the root, it's in the user's Home folder at (assuming Mac): /Users//Desktop/ Using specialFolderPath("Desktop") will always return the correct path on all platforms with a Desktop. But in your case, you can do something even simpler: put "~/Desktop/test files/Test.pdf" into temp The leading "~" is shorthand for the current user's folder. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to pdf
What happens if you remove the space from the file path? Does it still behave the same? Phil Davis On 5/12/20 4:23 PM, GEORGE WOOD via use-livecode wrote: Here is on example of what I tried: on mouseup put “/Desktop/test files/Test.pdf” into temp open printing to pdf temp print cd 1 from (topleft of cd 1) to (bottomright of cd 1) close printing put the result end mouseup ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis 503-307-4363 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Open printing to pdf
Here is on example of what I tried: on mouseup put “/Desktop/test files/Test.pdf” into temp open printing to pdf temp print cd 1 from (topleft of cd 1) to (bottomright of cd 1) close printing put the result end mouseup ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open Printing to PDF
Not all my doing. Got help from a number of people on this list who I am too senile to recall now. ;-) Bob S > On Apr 23, 2019, at 11:35 , General 2018 via use-livecode > wrote: > > Very nice ! > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open Printing to PDF
That should read: sample: put cleanASCII("This is a test!<>?", "uppercase,lowercase,custom", "?" > On Apr 23, 2019, at 11:24 , Bob Sneidar via use-livecode > wrote: > > sample: put cleanASCII("This is a test!<>?", "uppercase,lowercase", "?" ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Open Printing to PDF
Very nice ! -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Bob Sneidar via use-livecode Sent: 23 April 2019 19:24 To: How to use LiveCode Cc: Bob Sneidar Subject: Re: Open Printing to PDF This may help to clean up all kinds of badness in text used for a number of things: function cleanASCII pString, pModeList, pCustomList /* pModeList is a comma delimited list that may contain the following values: "lowercase,uppercase,numbers,tabs,newlines,returns,spaces,symbols,custom" If custom is used, then a third paramaeter containing allowed characters must be supplied. sample: put cleanASCII("This is a test!<>?", "uppercase,lowercase", "?" returns: "This is a test?" */ if pModeList is empty then put " 0-9a-zA-Z" into tAllowedChars end if repeat for each item pMode in pModeList put word 1 of pMode into pMode switch break case "tabs" is in pMode put "\t" after tAllowedChars break case "newlines" is in pMode put "\n" before tAllowedChars break case "returns" is in pMode put "\r" before tAllowedChars -- currently not working break case "spaces" is in pMode put " " after tAllowedChars break case "numbers" is in pMode put "0-9" after tAllowedChars break case "lowercase" is in pMode put "a-z" after tAllowedChars break case "uppercase" is in pMode put "A-Z" after tAllowedChars break case "symbols" is in pMode put "!#$%&'()*+,./:;<=>?@[\\_`{|}~^-" after tAllowedChars break case pMode is "custom" put pCustomList after tAllowedChars break end switch end repeat put "[" & tAllowedChars & "]" into tMatchText repeat for each character theChar in pString if matchtext(theChar, tMatchText) is true then put theChar after cleanString end if end repeat return cleanString end cleanASCII > On Apr 23, 2019, at 11:00 , General 2018 via use-livecode > wrote: > > Not a bug - my fault !! > > The part of the heading text for the pdf is used for the saved filename which > cannot be ">" ! of course ... > > The issue was the file save naming not open printing to pdf command , your > replies made me look for odd characters. > > Regards > Cam ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open Printing to PDF
This may help to clean up all kinds of badness in text used for a number of things: function cleanASCII pString, pModeList, pCustomList /* pModeList is a comma delimited list that may contain the following values: "lowercase,uppercase,numbers,tabs,newlines,returns,spaces,symbols,custom" If custom is used, then a third paramaeter containing allowed characters must be supplied. sample: put cleanASCII("This is a test!<>?", "uppercase,lowercase", "?" returns: "This is a test?" */ if pModeList is empty then put " 0-9a-zA-Z" into tAllowedChars end if repeat for each item pMode in pModeList put word 1 of pMode into pMode switch break case "tabs" is in pMode put "\t" after tAllowedChars break case "newlines" is in pMode put "\n" before tAllowedChars break case "returns" is in pMode put "\r" before tAllowedChars -- currently not working break case "spaces" is in pMode put " " after tAllowedChars break case "numbers" is in pMode put "0-9" after tAllowedChars break case "lowercase" is in pMode put "a-z" after tAllowedChars break case "uppercase" is in pMode put "A-Z" after tAllowedChars break case "symbols" is in pMode put "!#$%&'()*+,./:;<=>?@[\\_`{|}~^-" after tAllowedChars break case pMode is "custom" put pCustomList after tAllowedChars break end switch end repeat put "[" & tAllowedChars & "]" into tMatchText repeat for each character theChar in pString if matchtext(theChar, tMatchText) is true then put theChar after cleanString end if end repeat return cleanString end cleanASCII > On Apr 23, 2019, at 11:00 , General 2018 via use-livecode > wrote: > > Not a bug - my fault !! > > The part of the heading text for the pdf is used for the saved filename which > cannot be ">" ! of course ... > > The issue was the file save naming not open printing to pdf command , your > replies made me look for odd characters. > > Regards > Cam ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Open Printing to PDF
Not a bug - my fault !! The part of the heading text for the pdf is used for the saved filename which cannot be ">" ! of course ... The issue was the file save naming not open printing to pdf command , your replies made me look for odd characters. Regards Cam -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of General 2018 via use-livecode Sent: 23 April 2019 18:50 To: How to use LiveCode Cc: General 2018 Subject: Open Printing to PDF Scott , Craig It would not save the pdf and the text was different for each stack. The failing stack had ">" within the text , once removed the pdf saved !! cheers guys . Is this a bug ? Regards Cam -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of dunbarxx via use-livecode Sent: 23 April 2019 13:56 To: use-revolut...@lists.runrev.com Cc: dunbarxx Subject: Re: Open Printing to PDF Hi. Are you saying the "open printing to pdf" command itself does not work, or that you get blank output? In other words, in the stack that does NOT work, what happens if you: open printing to pdf "yourFilePathHere/xxx.pdf" revPrintText "Hello world" close printing This will eliminate any of the issues Scott mentioned, since you are using simple text. But does a pdf appear on the desktop, and does it contain "Hello World"? Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Open Printing to PDF
Scott , Craig It would not save the pdf and the text was different for each stack. The failing stack had ">" within the text , once removed the pdf saved !! cheers guys . Is this a bug ? Regards Cam -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of dunbarxx via use-livecode Sent: 23 April 2019 13:56 To: use-revolut...@lists.runrev.com Cc: dunbarxx Subject: Re: Open Printing to PDF Hi. Are you saying the "open printing to pdf" command itself does not work, or that you get blank output? In other words, in the stack that does NOT work, what happens if you: open printing to pdf "yourFilePathHere/xxx.pdf" revPrintText "Hello world" close printing This will eliminate any of the issues Scott mentioned, since you are using simple text. But does a pdf appear on the desktop, and does it contain "Hello World"? Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open Printing to PDF
Hi. Are you saying the "open printing to pdf" command itself does not work, or that you get blank output? In other words, in the stack that does NOT work, what happens if you: open printing to pdf "yourFilePathHere/xxx.pdf" revPrintText "Hello world" close printing This will eliminate any of the issues Scott mentioned, since you are using simple text. But does a pdf appear on the desktop, and does it contain "Hello World"? Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open Printing to PDF
Hello Camm, Are they all printing the same text? If I recall correctly, Open Printing to PDF is where the fail occurs when certain Unicode characters are encountered. Emojis are one example where characters will render in a field but not print to a PDF. Hmmm... I wasn’t able to turn up a bug report number but I’m pretty confident that the problem exists -- Scott Morrow > On Apr 22, 2019, at 12:42 PM, General 2018 via use-livecode > wrote: > > Hi , > > I have 3 separate stacks each containing the same code for printing to pdf. > > One of those stacks will not open printing to pdf in dev or runtime. The > other 2 work fine - Head scratching ?? > > All items are in the same path / folder. > > Regards > Camm > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Open Printing to PDF
Hi , I have 3 separate stacks each containing the same code for printing to pdf. One of those stacks will not open printing to pdf in dev or runtime. The other 2 work fine - Head scratching ?? All items are in the same path / folder. Regards Camm ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
On Thu, Apr 26, 2018 at 9:36 AM Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > I have a user who ran into the error "printing: Unknown destination: > (Line 0, column 0)" when executing a line in my code that was "Open > printing to PDF " Try testing a filename that has accented characters in it and see if that triggers the error. — Trevor DeVore ScreenSteps > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
On 4/26/2018 5:22 PM, Mark Wieder via use-livecode wrote: > On 04/26/2018 09:46 AM, Paul Dupuis via use-livecode wrote: > >> Presumably the folder exists since it was just selected by the user via >> the 'answer file' command. > > I assume that was just a typo, but just in case... you really meant > 'answer folder' there, right? > Actually, I meant 'ask file ...' to prompt the user for a standard *save* file dialog to get the file path for the 'open printing to pdf tFile' And by folder exists, I mean the containing folder in the path returned by the 'ask file' dialog. When I am typing fast (like in email posts) I get my ask and answers transposed! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
On 04/26/2018 09:46 AM, Paul Dupuis via use-livecode wrote: Presumably the folder exists since it was just selected by the user via the 'answer file' command. I assume that was just a typo, but just in case... you really meant 'answer folder' there, right? -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
Yeah, error messages can be misleading sometimes. Often the command is simply returning a message the OS or API passed back to it, and that message can be less than helpful. For example, on copiers, when using StartTLS for encryption in SMTP communications, the server may reject the connection for a number of security reasons, but the error the copier always reports is "Login Failure" when in reality, the login information is correct. This can lead the uninitated down a rabbit hole if they try to change the password to what they think it might be. I was having fits getting a newly installed copier to scan to a customer's NAS file server. The error reported was "Login Failure". I verified credentials, did packet captures, sent them off to Konica, etc. Everyone was completely stumped. Turns out the top IT guy for the enterprise had decided to enable ACL's on the NAS devices, and he hadn't entered the MAC addresses for the new copiers yet. One other example: If Outlook attempts to connect to an Exchange server that is currently offline, it will present a login dialog. What percentage of end users do you think will STILL attempt to guess at their logins and passwords, even after telling them numerous times NOT TO GUESS. :-) So this is a problem with virtually everything that is going to interact with someone else's systems. Bob S > On Apr 26, 2018, at 09:46 , Paul Dupuis via use-livecode > <use-livecode@lists.runrev.com> wrote: > > The file path is selected by the user through a standard 'answer file > ... ' dialog. The code does not currently check to see if the folder the > user selected for the file is writable, but tests of trying to save to a > read-only (non writable) folder on Windows results in a controlled error > dialog being presented by the 'open printing to pdf' statement rather > than an code execution error. > > Presumably the folder exists since it was just selected by the user via > the 'answer file' command. Obviously, I can wrap this part of the code > in a TRY ... END TRY block to catch any error and present a graceful > message of something like "exporting to PDF failed", but I was hoping > someone (perhaps a LiveCode employee???) might actually know what the > error message of 'printing: Unknown destination' meant. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
The file path is selected by the user through a standard 'answer file ... ' dialog. The code does not currently check to see if the folder the user selected for the file is writable, but tests of trying to save to a read-only (non writable) folder on Windows results in a controlled error dialog being presented by the 'open printing to pdf' statement rather than an code execution error. Presumably the folder exists since it was just selected by the user via the 'answer file' command. Obviously, I can wrap this part of the code in a TRY ... END TRY block to catch any error and present a graceful message of something like "exporting to PDF failed", but I was hoping someone (perhaps a LiveCode employee???) might actually know what the error message of 'printing: Unknown destination' meant. On 4/26/2018 11:01 AM, Bob Sneidar via use-livecode wrote: > NVM you provide a file path. You may want to check that the folder exists > before writing the pdf. Do you ask the end user where they want to put the > file first, or do you assume a destination folder? > > Bob S > > >> On Apr 26, 2018, at 07:57 , Bob Sneidar via use-livecode >> <use-livecode@lists.runrev.com> wrote: >> >> Just a guess, check the current default folder. It may have permissions set, >> or may no longer exist. >> >> Bob S > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
NVM you provide a file path. You may want to check that the folder exists before writing the pdf. Do you ask the end user where they want to put the file first, or do you assume a destination folder? Bob S > On Apr 26, 2018, at 07:57 , Bob Sneidar via use-livecode >wrote: > > Just a guess, check the current default folder. It may have permissions set, > or may no longer exist. > > Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Open printing to PDF error
Just a guess, check the current default folder. It may have permissions set, or may no longer exist. Bob S > On Apr 26, 2018, at 06:36 , Paul Dupuis via use-livecode > <use-livecode@lists.runrev.com> wrote: > > I have a user who ran into the error "printing: Unknown destination: > (Line 0, column 0)" when executing a line in my code that was "Open > printing to PDF " > > This error (in fact NO ERRORs) are listed under the "open printing to > PDF" entry in the dictionary. If 'the result is "cancel" ' is the only > dictionary entry reference to an error code. > > I assume this is some kind of permissions error? However, attempts to > replicate (say by trying to save to a read only folder) have proven in > effective. Does anyone know what this error is for real? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Open printing to PDF error
I have a user who ran into the error "printing: Unknown destination: (Line 0, column 0)" when executing a line in my code that was "Open printing to PDF " This error (in fact NO ERRORs) are listed under the "open printing to PDF" entry in the dictionary. If 'the result is "cancel" ' is the only dictionary entry reference to an error code. I assume this is some kind of permissions error? However, attempts to replicate (say by trying to save to a read only folder) have proven in effective. Does anyone know what this error is for real? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
AW: regression bug: corrupt filename at open printing to pdf
Hi Mark, I filed it at: http://quality.livecode.com/show_bug.cgi?id=20656 I am still trying to build a recepie stack, but up to now it only happens with my live stack (see QC) Thanks Tiemo -Ursprüngliche Nachricht- Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von Mark Waddingham via use-livecode Gesendet: Donnerstag, 9. November 2017 17:21 An: How to use LiveCode <use-livecode@lists.runrev.com> Cc: Mark Waddingham <m...@livecode.com> Betreff: Re: regression bug: corrupt filename at open printing to pdf On 2017-11-09 11:01, Tiemo Hollmann TB via use-livecode wrote: > Hello, > > LC 8.1.6 and 8.1.7 on Windows: > > I create PDFs with "open printing to pdf myFile.pdf". That works fine > as far the filename doesn't contains Umlaute. > > If the filename contains Umlaute 2 PDF files are created (yes 2 > files!). The first file has the correct filename with Umlaute, but 0 > KB. The second file has a filename without the Umlaut (no strange > replacement char, just one char less) and the correct content. When > debugging, the filename within LC looks correct with Umlaut. When > printing a PDF without Umlaute in the filename, everything works fine. > > I didn't found any bug in the QC, or am I the first one, using > printing to pdf with European characters? Is there a workaround, > anything with Unicode conversion for the filename? If you could file a bug, that would be great. On Windows, the PDFPrinter has to do a little dance with files so that it passes a file that cairo will open correctly... However, it sounds like in your case (perhaps due to WIndows version, or formatting of the target drive) that the dance is not working correctly. We'll need to patch cairo a little to get this to work correctly I suspect. Warmest Regards, Mark. P.S. For now, if you output the PDF to a temp file in the same folder, then 'rename' then all should be well. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: regression bug: corrupt filename at open printing to pdf
On 2017-11-09 11:01, Tiemo Hollmann TB via use-livecode wrote: Hello, LC 8.1.6 and 8.1.7 on Windows: I create PDFs with "open printing to pdf myFile.pdf". That works fine as far the filename doesn't contains Umlaute. If the filename contains Umlaute 2 PDF files are created (yes 2 files!). The first file has the correct filename with Umlaute, but 0 KB. The second file has a filename without the Umlaut (no strange replacement char, just one char less) and the correct content. When debugging, the filename within LC looks correct with Umlaut. When printing a PDF without Umlaute in the filename, everything works fine. I didn't found any bug in the QC, or am I the first one, using printing to pdf with European characters? Is there a workaround, anything with Unicode conversion for the filename? If you could file a bug, that would be great. On Windows, the PDFPrinter has to do a little dance with files so that it passes a file that cairo will open correctly... However, it sounds like in your case (perhaps due to WIndows version, or formatting of the target drive) that the dance is not working correctly. We'll need to patch cairo a little to get this to work correctly I suspect. Warmest Regards, Mark. P.S. For now, if you output the PDF to a temp file in the same folder, then 'rename' then all should be well. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
regression bug: corrupt filename at open printing to pdf
Hello, LC 8.1.6 and 8.1.7 on Windows: I create PDFs with "open printing to pdf myFile.pdf". That works fine as far the filename doesn't contains Umlaute. If the filename contains Umlaute 2 PDF files are created (yes 2 files!). The first file has the correct filename with Umlaute, but 0 KB. The second file has a filename without the Umlaut (no strange replacement char, just one char less) and the correct content. When debugging, the filename within LC looks correct with Umlaut. When printing a PDF without Umlaute in the filename, everything works fine. I didn't found any bug in the QC, or am I the first one, using printing to pdf with European characters? Is there a workaround, anything with Unicode conversion for the filename? Thanks Tiemo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MORE HELP with: open printing for pdf... SOLVED
I've seen this happen with Copiers when scanning to file. Since the credentials being used are valid, a placeholder for the file is created by the system, but when the write of the data is attempted, it fails, either due to UAC or some sandboxing issue. This has the effect of leaving a 0 byte file in place with nothing in it. Bob S On Aug 1, 2016, at 09:05 , Dan Friedman> wrote: The file was being created, but it was 0 bytes. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MORE HELP with: open printing for pdf... SOLVED
Hello again! In case you were following along, I finally figured this out... In an attempt to deliver my application as easily as possible, I have my customers download only the exe from my site -- just this one file. All extra files (extra stacks, images, dlls, etc.) are the downloaded by the exe at runtime. Works perfectly! In this case however, there was a problem downloading the "revpdfprinter.dll" file. The file was being created, but it was 0 bytes. So, when the app checked to see if the file was there, it was -- but it was invalid. So, I put in an extra check to verify that the size of the dll is exactly 753664 bytes. If it's not we download it again. If it fails again, then I point them to a web page that has the file and instructions. Problem solved. Time for a fresh cup of coffee. -Dan > Hi Dan, > > i am using revPrintText in my printing to PDF. i.e. > > open printing to pdf tFile > revPrintText theHTMLText > close printing > > where theHTMLText is basically 'the htmlText" or a target field. This is > working for me in *most* cases. Our field content that gets converted to > a PDF ranges from plain text to very rich content, including embedded > images in the field (via the imageSource of char x). This produces a > single, properly paged, PDF. However with some content - we have yet to > figure out what field content triggers it - we get a script execution > error in revPrintText > > Object: property is not an integer: 4294907844 (Line 0, column 0) > Chunk: can't set property: (Line 162, column 22) > Object: can't set object property: 4294907844 (Line 162, column 7) > set: can't set property: 4294907844 (Line 162, column 1) > repeat: error in statement: (Line 141, column 1) > Handler: error in statement: revPrintText (Line 141, column 1) > Object ID: stack "revprintlibrary > > > So, we may have to change to using print card or something else. I have > no experience at using open printing for PDF with anything other than > revPrintText, so I am sorry, but I don't know what may be the cause of > the problem you've run into. > > -- Paul > > On 7/28/2016 2:11 PM, Dan Friedman wrote: >> Monte (and Paul), >> >> Thanks for reporting your findings. I have been struggling with this issue >> for some time (with LC 7.0.1). Adding the default folder to the path to the >> DLL fixed the problem. >> >> However, now that it's PDFing, a new problem exists. If I "open printing to >> pdf" and then run multiple "print card" commands, each print comes out as a >> separate document and I am asked to select a location to save the output for >> each page. I haven't issues a "close printing" command yet, but it's still >> outputting separate PDFs. It works fine in the IDE, it works fine in the >> Mac Standalone, but I get this odd behavior on with the Windows standalone. >> >> One note... I "open printing to pdf" in stack A. Then, I open stack B and >> do the "print card" commands. Then, I close stack B and stack A issues the >> "close printing" command. I then repeat as needed. I don't think this >> matters as it works in the IDE and on the Mac. >> >> >> Any thoughts? >> >> Thank you in advance! >> -Dan >> >> >>> On 27 Jul 2016, at 4:43 PM, Paul Dupuis <p...@researchware.com> wrote: >>> >>> Monte, >>> >>> Thank you so much - exactly that - so for LC6.x I added the follow which >>> address the problem whether in the IDE or standalone >>> >>> put the defaultFolder into tSaveDefaultFolder >>> if (the environment is "development") then -- IDE >>> set the defaultFolder to specialFolderPath("engine") >>> else -- standalone >>> set the defaultFolder to appPath() >>> end if >>> >>> -- do my PDF printing >>> >>> set the defaultFolder to tSaveDefaultFolder >>> >>> If I every see you at a LiveCode Conference (I have to attend Edinburgh >>> via webcast this year), I owe you drinks or a meal or both! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MORE HELP with: open printing for pdf...
Hi Dan, i am using revPrintText in my printing to PDF. i.e. open printing to pdf tFile revPrintText theHTMLText close printing where theHTMLText is basically 'the htmlText" or a target field. This is working for me in *most* cases. Our field content that gets converted to a PDF ranges from plain text to very rich content, including embedded images in the field (via the imageSource of char x). This produces a single, properly paged, PDF. However with some content - we have yet to figure out what field content triggers it - we get a script execution error in revPrintText Object: property is not an integer: 4294907844 (Line 0, column 0) Chunk: can't set property: (Line 162, column 22) Object: can't set object property: 4294907844 (Line 162, column 7) set: can't set property: 4294907844 (Line 162, column 1) repeat: error in statement: (Line 141, column 1) Handler: error in statement: revPrintText (Line 141, column 1) Object ID: stack "revprintlibrary So, we may have to change to using print card or something else. I have no experience at using open printing for PDF with anything other than revPrintText, so I am sorry, but I don't know what may be the cause of the problem you've run into. -- Paul On 7/28/2016 2:11 PM, Dan Friedman wrote: > Monte (and Paul), > > Thanks for reporting your findings. I have been struggling with this issue > for some time (with LC 7.0.1). Adding the default folder to the path to the > DLL fixed the problem. > > However, now that it's PDFing, a new problem exists. If I "open printing to > pdf" and then run multiple "print card" commands, each print comes out as a > separate document and I am asked to select a location to save the output for > each page. I haven't issues a "close printing" command yet, but it's still > outputting separate PDFs. It works fine in the IDE, it works fine in the Mac > Standalone, but I get this odd behavior on with the Windows standalone. > > One note... I "open printing to pdf" in stack A. Then, I open stack B and > do the "print card" commands. Then, I close stack B and stack A issues the > "close printing" command. I then repeat as needed. I don't think this > matters as it works in the IDE and on the Mac. > > > Any thoughts? > > Thank you in advance! > -Dan > > >> On 27 Jul 2016, at 4:43 PM, Paul Dupuis <p...@researchware.com> wrote: >> >> Monte, >> >> Thank you so much - exactly that - so for LC6.x I added the follow which >> address the problem whether in the IDE or standalone >> >> put the defaultFolder into tSaveDefaultFolder >> if (the environment is "development") then -- IDE >> set the defaultFolder to specialFolderPath("engine") >> else -- standalone >> set the defaultFolder to appPath() >> end if >> >> -- do my PDF printing >> >> set the defaultFolder to tSaveDefaultFolder >> >> If I every see you at a LiveCode Conference (I have to attend Edinburgh >> via webcast this year), I owe you drinks or a meal or both! > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
MORE HELP with: open printing for pdf...
Monte (and Paul), Thanks for reporting your findings. I have been struggling with this issue for some time (with LC 7.0.1). Adding the default folder to the path to the DLL fixed the problem. However, now that it's PDFing, a new problem exists. If I "open printing to pdf" and then run multiple "print card" commands, each print comes out as a separate document and I am asked to select a location to save the output for each page. I haven't issues a "close printing" command yet, but it's still outputting separate PDFs. It works fine in the IDE, it works fine in the Mac Standalone, but I get this odd behavior on with the Windows standalone. One note... I "open printing to pdf" in stack A. Then, I open stack B and do the "print card" commands. Then, I close stack B and stack A issues the "close printing" command. I then repeat as needed. I don't think this matters as it works in the IDE and on the Mac. Any thoughts? Thank you in advance! -Dan > On 27 Jul 2016, at 4:43 PM, Paul Dupuis <p...@researchware.com> wrote: > > Monte, > > Thank you so much - exactly that - so for LC6.x I added the follow which > address the problem whether in the IDE or standalone > > put the defaultFolder into tSaveDefaultFolder > if (the environment is "development") then -- IDE > set the defaultFolder to specialFolderPath("engine") > else -- standalone > set the defaultFolder to appPath() > end if > > -- do my PDF printing > > set the defaultFolder to tSaveDefaultFolder > > If I every see you at a LiveCode Conference (I have to attend Edinburgh > via webcast this year), I owe you drinks or a meal or both! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: HELP with: open printing for pdf...
No problem Paul. Looking forward to the beer next year ;-) > On 27 Jul 2016, at 4:43 PM, Paul Dupuis <p...@researchware.com> wrote: > > Monte, > > Thank you so much - exactly that - so for LC6.x I added the follow which > address the problem whether in the IDE or standalone > > put the defaultFolder into tSaveDefaultFolder > if (the environment is "development") then -- IDE > set the defaultFolder to specialFolderPath("engine") > else -- standalone > set the defaultFolder to appPath() > end if > > -- do my PDF printing > > set the defaultFolder to tSaveDefaultFolder > > If I every see you at a LiveCode Conference (I have to attend Edinburgh > via webcast this year), I owe you drinks or a meal or both! > > > On 7/26/2016 11:31 PM, Monte Goulding wrote: >> Hi Paul >> >> I bumped into this in a project just before I started working for LiveCode. >> There’s an issue some of the latter 6.7 releases that requires you to set >> the default folder to the folder the pdf printer dll is in before opening >> printing for the first time. I believe this is fixe in LC 8. >> >> Cheers >> >> Monte >>> On 26 Jul 2016, at 4:49 PM, Paul Dupuis <p...@researchware.com> wrote: >>> >>> I have very large application running under LC 6.7.11 for Windows and OSX >>> >>> I have code that does an "open printing for PDF", prints a field, and >>> closes printing. Under OSX this works fine. >>> >>> Under Windows, in both the IDE and a standalone, I get an execution >>> error on the open printing for pdf line with the message: >>> execution error at line n/a (printing: Unknown destination) >>> >>> In the standalone, I might have interpreted this error as that the >>> "revpdfprinter.dll" did not get added to the standalone, but it is >>> (although why this dll is placed at the application level and not in the >>> Externals folder continues to puzzle me). >>> >>> I also might have though the file path & name passed to open pritning >>> for pdf may have been a problem, but I have checked via debugger and the >>> file path & name is valid, in a writable location, plenty of disk space, >>> etc. Also tried multiple files and locations, so that is not it >>> >>> However the fact that it happens in the IDE completely mystifies me. Can >>> ANY one tell me what this error really means and what the cause may be? >>> >>> ___ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
AW: HELP with: open printing for pdf...
Monte, Thank you so much - exactly that - so for LC6.x I added the follow which address the problem whether in the IDE or standalone put the defaultFolder into tSaveDefaultFolder if (the environment is "development") then -- IDE set the defaultFolder to specialFolderPath("engine") else -- standalone set the defaultFolder to appPath() end if -- do my PDF printing set the defaultFolder to tSaveDefaultFolder If I every see you at a LiveCode Conference (I have to attend Edinburgh via webcast this year), I owe you drinks or a meal or both! On 7/26/2016 11:31 PM, Monte Goulding wrote: > Hi Paul > > I bumped into this in a project just before I started working for LiveCode. > There’s an issue some of the latter 6.7 releases that requires you to set the > default folder to the folder the pdf printer dll is in before opening > printing for the first time. I believe this is fixe in LC 8. > > Cheers > > Monte >> On 26 Jul 2016, at 4:49 PM, Paul Dupuis <p...@researchware.com> wrote: >> >> I have very large application running under LC 6.7.11 for Windows and OSX >> >> I have code that does an "open printing for PDF", prints a field, and >> closes printing. Under OSX this works fine. >> >> Under Windows, in both the IDE and a standalone, I get an execution >> error on the open printing for pdf line with the message: >> execution error at line n/a (printing: Unknown destination) >> >> In the standalone, I might have interpreted this error as that the >> "revpdfprinter.dll" did not get added to the standalone, but it is >> (although why this dll is placed at the application level and not in the >> Externals folder continues to puzzle me). >> >> I also might have though the file path & name passed to open pritning >> for pdf may have been a problem, but I have checked via debugger and the >> file path & name is valid, in a writable location, plenty of disk space, >> etc. Also tried multiple files and locations, so that is not it >> >> However the fact that it happens in the IDE completely mystifies me. Can >> ANY one tell me what this error really means and what the cause may be? >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: HELP with: open printing for pdf...
Hi Paul I bumped into this in a project just before I started working for LiveCode. There’s an issue some of the latter 6.7 releases that requires you to set the default folder to the folder the pdf printer dll is in before opening printing for the first time. I believe this is fixe in LC 8. Cheers Monte > On 26 Jul 2016, at 4:49 PM, Paul Dupuis <p...@researchware.com> wrote: > > I have very large application running under LC 6.7.11 for Windows and OSX > > I have code that does an "open printing for PDF", prints a field, and > closes printing. Under OSX this works fine. > > Under Windows, in both the IDE and a standalone, I get an execution > error on the open printing for pdf line with the message: > execution error at line n/a (printing: Unknown destination) > > In the standalone, I might have interpreted this error as that the > "revpdfprinter.dll" did not get added to the standalone, but it is > (although why this dll is placed at the application level and not in the > Externals folder continues to puzzle me). > > I also might have though the file path & name passed to open pritning > for pdf may have been a problem, but I have checked via debugger and the > file path & name is valid, in a writable location, plenty of disk space, > etc. Also tried multiple files and locations, so that is not it > > However the fact that it happens in the IDE completely mystifies me. Can > ANY one tell me what this error really means and what the cause may be? > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
HELP with: open printing for pdf...
I have very large application running under LC 6.7.11 for Windows and OSX I have code that does an "open printing for PDF", prints a field, and closes printing. Under OSX this works fine. Under Windows, in both the IDE and a standalone, I get an execution error on the open printing for pdf line with the message: execution error at line n/a (printing: Unknown destination) In the standalone, I might have interpreted this error as that the "revpdfprinter.dll" did not get added to the standalone, but it is (although why this dll is placed at the application level and not in the Externals folder continues to puzzle me). I also might have though the file path & name passed to open pritning for pdf may have been a problem, but I have checked via debugger and the file path & name is valid, in a writable location, plenty of disk space, etc. Also tried multiple files and locations, so that is not it However the fact that it happens in the IDE completely mystifies me. Can ANY one tell me what this error really means and what the cause may be? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Gradients and Open printing as PDF
Hi All, Does open printing as PDF allows to save gradients in vector graphics? If the answer is yes, my question is: How could I print as PDF, vector graphics with gradients? Thanks in advance! Al -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Gradients-and-Open-printing-as-PDF-tp4670305.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Pages per Sheet setting for open printing to pdf
Thanks for the reply Jacquelin. However I was using revPrintText to print HtmlText via open printing to pdf. I would like to pdf print the equivalent of 2 A4 pages on 1 A4 sheet. Any ideas how this would work? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pages per Sheet setting for open printing to pdf
On 12/16/11 2:55 AM, gmcrev wrote: Thanks for the reply Jacquelin. However I was using revPrintText to print HtmlText via open printing to pdf. I would like to pdf print the equivalent of 2 A4 pages on 1 A4 sheet. Any ideas how this would work? I haven't done much with that command, but you could try setting the printScale to 0.5 before you print. That should scale the output by half. It may not give what you want though, since the width of the text block may also be half. Experiment. It's possible to do what you want, but probably not using the rev library calls. For custom print output the usual way is to handle the entire process yourself. The rev library is convenient for quick printouts, but its script just uses commands that are available in the engine and which you can use yourself. (The script snippet I posted could be easily changed to open printing to pdf, btw.) I'll readily admit that printing in LiveCode is a pain, but you can do just about anything with it if you're willing to script everything. The usual method is to create a printing substack that is never shown, but serves as a template for printouts. The template contains fields and any other objects that need to print. A script opens the template invisibly, repeatedly fills the fields with text (or in this case, htmlText,) prints the template card, and repeats until printing is finished. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Pages per Sheet setting for open printing to pdf
On 12/15/11 8:28 PM, gmcrev wrote: I am wondering whether it would be useful to request for a new command that would set the number of pages per sheet for printing. ie. 2 A4 pages would be reduced and printed on 1 A4 page. I can't seem to find any livecode commands to do this. You can use the into rect form of the print command: print this card into l,r,t,b -- put some pixel numbers there Printing into a specified rectangle automatically scales the card image to fit. You'd need to calculate the rectangles that encompass the top half and the bottom half. Then open printing, print one card into the top rect, the second card into the bottom rect, then print a break. The break forces a new page. Pseudo-sorta-code: put 18,18,594,374 into tTopRect put 18,380,594,752 into tBottomRect open printing -- with dialog, if you want print card 1 into tTopRect print card 2 into tBottomRect print break -- repeat that for each pair of cards close printing -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
open Printing to PDF works just fine -- Ignore last query
foot-in-mouth.. it works just fine. I had an ask file command in there I should have commented out. This works perfectly: on mouseup put /Users/sivakatirswami/Desktop/test4.pdf into tOutPutFile set the printMargins to 0,0,0,0 open printing to pdf tOutPutFile if it is cancel then exit to top print card 1 close printing answer done end mouseup ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode