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
3mcgr...@comcast.net


_______________________________________________
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

Reply via email to