Skip to content

Instantly share code, notes, and snippets.

@skoji
Created April 14, 2018 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skoji/c0631113827284fb799624707955db74 to your computer and use it in GitHub Desktop.
Save skoji/c0631113827284fb799624707955db74 to your computer and use it in GitHub Desktop.
require 'gepub'
rendition_layout = GEPUB::Book.parse(File.open('/path/to/epub/file.epub')).rendition_layout
if rendition_layout == 'pre-paginated'
puts "rendition:layout is #{rendition_layout}, which means fixed layout"
else
puts "rendition:layout is #{rendition_layout}, which means reflow"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment