Live Code 5 Pdf Printing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 44
- Joined: Tue Jul 12, 2011 7:43 pm
Live Code 5 Pdf Printing
Ever since I switched to LiveCode 5, when my application prints PDFs the end result is just a blank file with the correct name and type but it contains no data. Since its not truly a PDF in the end result in LiveCode 5 but it is in 4.6 I'm starting to think that something changed with the release that is breaking this section. I've read the release notes and see nothing that would affect this. If anyone knows if LiveCode 5 could cause this problem please tell. Thanks!
Note: Could it be a possible change with the way LiveCode 5 handles specialfolderpath
Note: Could it be a possible change with the way LiveCode 5 handles specialfolderpath
-
- Posts: 44
- Joined: Tue Jul 12, 2011 7:43 pm
Re: Live Code 5 Pdf Printing
Basically the way we have it set up, there is an image area and we change the source of that to the image we want in the pdf. This method has always worked until we upgraded to 5!
Re: Live Code 5 Pdf Printing
This works perfectly on Desktop but not in iOS.... Any ideas anyone? It's driving us crazy! The same code worked previously with no issues in LC 4.6.3 but this we are trying to compile in LC 5.0 and it seems broken.
Thanks!
Code: Select all
Command PDFPrintTwoPage
#answer "printing"
put specialFolderPath("documents") & "/testpdf.pdf" into tPDFPath
set the printPaperSize to 640,920 -- 8.5x11 inches, US Letter size
open printing to pdf tPDFPath
#if the result is "Cancel" then
-- The user has cancelled printing
#exit printCards
#else
--Print the card into the printable area
print card "PDFPrint1" of this stack into 0,0,640,920--the rect of field "Print" on card "PDFPrint1"
print break
print card "PDFPrint2" of this stack into 0,0,640,920
print break
print card "PDFPrintEND" of this stack into 0,0,640,920
#end if
close printing
#answer "ending printing"
End PDFPrintTwoPage
-
- Posts: 16
- Joined: Sun Apr 16, 2006 6:13 pm
- Contact:
Re: Live Code 5 Pdf Printing
I can verify exactly this behavior. Here's a little additional information from my experience:
Code that previously worked fine under LC 4.6.4 now produces different results when printing to PDF using LC 5.0.0, and I'd be grateful for any ideas.
App run from LC 5.0.0 IDE: okay, PDF produced correctly on desktop
App in iPad or iPhone simulators: okay for iPhone/iPad target iOS 5.0, no pages for iPhone/iPad iOS 4.x targets
App in iPad 1 running iOS 5.0, no pages.
(I don't yet have an iPhone that will run iOS 5.)
Using the console, I can see that the card to be printed (when using the simulators 4.x) is correctly created for each page, but no page is output. The output PDF file is there, but no pages. There are no errors reported in the console when running the app in the simulators. I'm stumped.
Oh: Mac Snow Leopard, Xcode 4.2
Code that previously worked fine under LC 4.6.4 now produces different results when printing to PDF using LC 5.0.0, and I'd be grateful for any ideas.
App run from LC 5.0.0 IDE: okay, PDF produced correctly on desktop
App in iPad or iPhone simulators: okay for iPhone/iPad target iOS 5.0, no pages for iPhone/iPad iOS 4.x targets
App in iPad 1 running iOS 5.0, no pages.
(I don't yet have an iPhone that will run iOS 5.)
Using the console, I can see that the card to be printed (when using the simulators 4.x) is correctly created for each page, but no page is output. The output PDF file is there, but no pages. There are no errors reported in the console when running the app in the simulators. I'm stumped.
Oh: Mac Snow Leopard, Xcode 4.2
George C Brackett
Principal, George Brackett Associates
http://luceatlux.com
Principal, George Brackett Associates
http://luceatlux.com
Re: Live Code 5 Pdf Printing
Confirmed, but on Lion (10.7.2) and LC 5.0 I can't even get it to work on the simulator running iOS 5. Works from the IDE only.
Bottom line seems to be that PDF printing in iOS is broken in LC 5.0. Unfortunately, I just updated an App and it didn't even occur to me to test PDF printing that had been working fine. Hope this bug is fixed soon.
Bottom line seems to be that PDF printing in iOS is broken in LC 5.0. Unfortunately, I just updated an App and it didn't even occur to me to test PDF printing that had been working fine. Hope this bug is fixed soon.
Re: Live Code 5 Pdf Printing
I sent a stack to Run Rev to check out. They said it is in fact a bug that they will work on. I'll put an update here if I hear anything from them...tho I expect it will be another release that has the resolution. Kind of a bummer as my project relies on this functionality...it is the core of my current app.
Re: Live Code 5 Pdf Printing
Thanks. This is exactly the kind of situation that keeps me from plunking down annual $ for developer support. The working parts of this platform are great, but I keep scanning the horizon for a similarly simple iOS-centric IDE that has more robust internal quality assurance.