You are here

Render pages of a PDF file

PDF file Uri page set resolution destination
number of pages (and PDF file Uri for convenience)

- Uri of PDF file via Intent.putDataAndType() (should point to a file located on the SD card)
- page set via Intent.putExtra("PAGE_SET", int[]) (pages are numbered 1 to number of pages, an empty page set results in all pages being rendered)
- resolution via Intent.putExtra("RESOLUTION", float) (resolution to be understood in dpi, meaningful values range from 50 to 300 dpi)
- destination via Intent.putExtra("DESTINATION", String) (pattern for PNG files to be created on the SD card, for instance `/mnt/sdcard/page%d.png´ where %d will be replaced by the page numbers given in the page set, not by consecutive numbers)
- number of pages via Intent.getExtras().getInt("PAGES") (the number is zero if a problem occurred)
- Uri of PDF file via Intent.putDataAndType() (Uri of PDF file, mirrored for convenience)

Status of intents protocol: