Printer Extension

Lets you print from ScratchX

View project on GitHub

Printer Extension

Load extension in ScratchX

Source Code

Issue Tracker - Suggestions are also put here

Blocks

%s = []

%n = ()

%m = [ v]

Print HTML %s

Print HTML %s="TEXT TO PRINT HTML SUPPORTED"

Prints HTML

Print Image %s

Print Image %s="IMAGE TO PRINT"

Prints an Image

Google Cloud Print HTML %s

Google Cloud Print HTML %s="TEXT TO PRINT HTML SUPPORTED"

Prints HTML with Google Cloud Print

Google Cloud Print Image %s

Google Cloud Print Image %s="IMAGE TO PRINT"

Prints an Image with Google Cloud Print

Test Print %m

Test Print %m="Google Cloud Print/Normal Print"

Lets you test printing to Google Cloud Print and directly to a printer

How it works?

Print * blocks

It opens a page with the contents to print then runs JavaScript window.print(); to print it!

Google Cloud Print * blocks

It uses the Google Cloud Print Gadget JavaScript Code when you run the block it runs (more about Google Cloud Print Gadget at https://developers.google.com/cloud-print/docs/gadget)

var gcpGadget = new cloudprint.Gadget();
gcpGadget.setPrintDocument("text/html", "Printer Extension v1.1", "***WHAT TO PRINT***")
gcpGadget.openPrintDialog();