iOS print card with graphic effects bug entered

Thomas McGrath III 3mcgrath at comcast.net
Sat Jan 7 11:08:48 EST 2012


I entered a bug report for printing cards with graphic effects on iOS devices causing a crash.

Report #9946
print card crashes with graphic effects

I spent three days tracking down this bug to what was causing it. At first I thought it was the external for printing on iOS but then with help finally figured out the cause.

The workaround is to export a snap shot of the card into a variable (instead of print to pdf / print card) and then use the external used in rreHardcopy to print the snap shot from the variable.

Here is the code I am calling from within a Share button:

on doPNGPrint
  doStartActivityIndicator 
  if not rreHardcopyIsAvailable() then
        answer "Printing is not available at this time." titled "Printing Error"
        exit to top
   end if
  put "MinStickerFreePlay" into tPrintJob
  export snapshot from rect (the rect of graphic "Scene") of this card to tPNG as PNG
  put tPNG into URL ("file:" & specialFolderPath("documents") & "/MinStickerFreePlay.png")
  doStopActivityIndicator
  put specialFolderPath("Documents") & slash & "MinStickerFreePlay.png" into tPDFFile
   rreHardcopyPrintPDF tPDFFile, tPrintJob
   if the result = "printing cancelled" then
        exit to top
   end if
end doPNGPrint



-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net





More information about the use-livecode mailing list