Logo Search packages:      
Sourcecode: djvulibre version File versions

GUTF8String DjVuDocEditor::page_to_id ( int  page_num  )  const

Translates page number page_num# to ID. If page_num# is invalid, an exception is thrown.

Reimplemented from DjVuDocument.

Definition at line 354 of file DjVuDocEditor.cpp.

References DjVuDocument::get_pages_num(), and DjVmDir::page_to_file().

Referenced by generate_thumbnails(), get_thumbnail(), get_thumbnails_num(), get_thumbnails_size(), init(), move_page(), set_page_name(), and set_page_title().

{
   if (page_num<0 || page_num>=get_pages_num())
     G_THROW( ERR_MSG("DjVuDocEditor.page_num") "\t"+GUTF8String(page_num));
   const GP<DjVmDir::File> f(djvm_dir->page_to_file(page_num));
   if (! f)
     G_THROW( ERR_MSG("DjVuDocEditor.page_num") "\t"+GUTF8String(page_num));

   return f->get_load_name();
}


Generated by  Doxygen 1.6.0   Back to index