Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/serhii-londar/uiprintinteractioncontroller-example

This is small example app that shows usage of UIPrintInteractionController.
https://github.com/serhii-londar/uiprintinteractioncontroller-example

example ios uiprintinteractioncontroller

Last synced: about 1 month ago
JSON representation

This is small example app that shows usage of UIPrintInteractionController.

Awesome Lists containing this project

README

        

## UIPrintInteractionController Example
This is small example app that shows usage of UIPrintInteractionController. With this example, you have an ability to printing HTML file with local images from documents folder and from application bundle.

## Ussage example:
Printing html from documents folder:

```
NSURL *documentsUrl = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *printFolderUrl = [documentsUrl URLByAppendingPathComponent:@"Print"];
[[HTMLPrinter sharedPrinter] printHTMLWithName:@"index.html" fromFilePath:printFolderUrl.absoluteString];
```

Printing html from application bundle folder:

```
NSString *indexHtmlStringPath = [[[NSBundle mainBundle] bundleURL] absoluteString];
[[HTMLPrinter sharedPrinter] printHTMLWithName:@"index.html" fromFilePath:indexHtmlStringPath];
```