Skip to content
Since other software developers are too lazy to implement printing, I did it for them.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

TextToPrint

Demo how print use PrintDocumentAdapter for WebView

Since other software developers are too lazy to implement printing, I did it for them.

The application is the simplest. One screen. WebView and print button. Gets text through the processing of Intent.View and Intent.SEND ("Open with" and "Share"). Having received the text makes it the simplest html.

see createWebPrintJob()

In the settings 4 font sizes. Font A and Font B are suitable for printing on a thermal printer (58mm roll of cash tape) Font D - the smallest (80 characters per line on A4 printer)

The application DOES NOT PRINT yourself. By the print button, a standard PrintDocumentAdapter for WebView is created.

How to use the example of the clipboard.

Select text -> Share -> TextToPrint -> Printer Icon -> Standard Print Preview Dialog.

TextToPrint on Google Play

Get it on Google Play

You can’t perform that action at this time.