Skip to content

potatoym/plugin.image.pdfreader

 
 

Repository files navigation

PDF Reader

Codacy Badge

Read your pdf's (ebooks) through Kodi

logo

PDF Reader is an add-on (image plugin) for Kodi capable of reading PDFs composed of images (e.g. scans, comics). It also serves as a module, so it can be called from other add-ons (see API section).

More info can be found in Kodi's forum.

Limitations

  • Currently PDF Reader can only read pdf files made of pictures, since its operation method's consists of extracting pictures from PDF files.
  • Only JPG and PNG types are supported at the moment. If you want to add a new image type, just say.

Download

See the Releases page.

API

PDF reader can be called from other add-ons regardless their type. To do so, the addon.xml must contain the following line:

<requires>
    ...
    <import addon="plugin.image.pdfreader"/>
</requires>

Then, just import pdf and use the available methods:

# PDF Reader class
PDFReader()
  read(path)
  info()
  name()
  convert_to_images(save_path=None)
  clean_temp()

# CBR/CBZ Reader class
CBXReader()
  read(path)
  info()
  name()
  convert_to_images(save_path=None)
  clean_temp()

# Play PDF function - can be called regardless the add-on type
# path: PDF url or file path
# compress: Compress data paths when sending request
# is_image_plugin: Set to true if the caller plugin is an image plugin
# return: bool - success
play_pdf(path, compress=True, is_image_plugin=False)

Screenshots

screen1

screen2

screen3

screen4

About

plugin.image.pdfreader

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%