#include <djv_document.h>
|
virtual PageArray & | getPages ()=0 |
|
virtual const PageArray & | getPages () const =0 |
|
virtual Bookmark * | getBookmark ()=0 |
|
virtual const Bookmark * | getBookmark () const =0 |
|
virtual Annotation * | getSharedAnnotation ()=0 |
|
virtual const Annotation * | getSharedAnnotation () const =0 |
|
virtual const SecurityProvider * | getSecurityProvider () const =0 |
|
virtual IFF::DjVuMultipageType | getMultipageType () const =0 |
|
virtual void | removeSharedAnnotation ()=0 |
|
virtual void | save (const String &inFileName, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
|
virtual void | save (Storage *inStorage, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
|
virtual void | saveAsIndirect (const String &inOutputIndexFileName, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
|
virtual void | saveAsIndirect (Storage *inStorage, StorageLocator *inStorageLocator=NULL, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
|
virtual void | prepareForMerger (const Document *inDocMergeTo, std::map< String, String > *outNameRemappings=NULL, bool inDoingAutoNavmAnnoRemapping=true, Chunk::RenameFunc inRenameFunc=NULL, void *inRenameContext=NULL)=0 |
|
virtual const Chunk * | getChunk () const =0 |
|
virtual Chunk * | getChunk ()=0 |
|
virtual void | updateChunks ()=0 |
|
virtual void | syncToChunks ()=0 |
|
virtual void | integrateDictionaryIntoPages ()=0 |
|
virtual void | mergeSharedAnnotationIntoPages ()=0 |
|
| Referable () |
|
void | addRef () const |
|
void | releaseRef () const |
|
size_t | getReferenceCount () const |
|
This class provides an easy access to DJVM
or DJVU
chunk based document.
- See Also
- Page
- Warning
- Without setting appropriate license script, decoding function (DjVuDecode feature) will stop working after 2 weeks from the its built time. See License System for more information.
Create an empty Document instance.
- Returns
- Pointer to the newly created instance.
Create a new Document instance from the specified chunk.
- Parameters
-
inChunk | Pointer to a chunk which contains either DJVM or DJVU . |
inLayout | Pointer to a IFF::Layout instance, which is returned by IFF::deserialize method. If this is NULL , all the chunks are loaded synchronously and this method may take relatively long. |
- Returns
- Pointer to the newly created instance.
Create a new Document instance from the specified Storage instance.
- Parameters
-
inStorage | Pointer to a Storage instance to load DjVu from. |
inCredProv | A CredentialProvider instance which is used if the DjVu file being deserialized is protected by some security mechanism. |
inSecProvBroker | A SecurityProviderBroker instance which loads SecurityProvider instance from 4 character security system Id. If this is NULL , this function uses the default SecurityProviderBroker instance.
This parameter is useful if you want to create your own SecurityProvider class and let deserialize function to use that class. |
inRecoverErrors | If this parameter is true , this method tries to recover the errors during loading chunks. It may be able to open broken DjVu files.
If this is false , this method throws exceptions if it encounters broken structures. |
- Returns
- Pointer to the newly created instance.
Create a new Document instance from the specified location.
- Parameters
-
inUrlOrFileName | URL or a local file path. |
inCredProv | A CredentialProvider instance which is used if the DjVu file being deserialized is protected by some security mechanism. |
inSecProvBroker | A SecurityProviderBroker instance which loads SecurityProvider instance from 4 character security system Id. If this is NULL , this function uses the default SecurityProviderBroker instance.
This parameter is useful if you want to create your own SecurityProvider class and let deserialize function to use that class. |
inRecoverErrors | If this parameter is true , this method tries to recover the errors during loading chunks. It may be able to open broken DjVu files.
If this is false , this method throws exceptions if it encounters broken structures. |
- Returns
- Pointer to the newly created instance.
virtual Bookmark* Celartem::DjVu::Document::getBookmark |
( |
| ) |
|
|
pure virtual |
Get the Bookmark instance.
Please note that the modifications to the returned instance does not reflect to the NAVM
chunk unless you explicitly call one of updateChunks, save and saveAsIndirect.
You had better use const version if you don't plan to modify the bookmark.
- Returns
- Pointer to the Bookmark instance.
virtual const Bookmark* Celartem::DjVu::Document::getBookmark |
( |
| ) |
const |
|
pure virtual |
virtual const Chunk* Celartem::DjVu::Document::getChunk |
( |
| ) |
const |
|
pure virtual |
Get the actual Chunk instance.
Please note that modifications to the Page, Bookmark and the other attributes are not reflected to the real chunk until you explicitly call updateChunks method.
- Returns
- Pointer to the Chunk instance.
virtual Chunk* Celartem::DjVu::Document::getChunk |
( |
| ) |
|
|
pure virtual |
Get the actual Chunk instance.
Please note that modifications to the Page, Bookmark and the other attributes are not reflected to the real chunk until you explicitly call updateChunks method.
And changes to the chunks are not reflected to the Document class attributes until you explicitly call syncToChunks method.
- Returns
- Pointer to the Chunk instance.
Get the initial multipage configuration type.
- Returns
- Multipage configuration type.
virtual PageArray& Celartem::DjVu::Document::getPages |
( |
| ) |
|
|
pure virtual |
Get the array of Page instances.
- Returns
- Reference to the Page array.
virtual const PageArray& Celartem::DjVu::Document::getPages |
( |
| ) |
const |
|
pure virtual |
Get the array of Page instances.
- Returns
- Reference to the Page array.
virtual const SecurityProvider* Celartem::DjVu::Document::getSecurityProvider |
( |
| ) |
const |
|
pure virtual |
virtual Annotation* Celartem::DjVu::Document::getSharedAnnotation |
( |
| ) |
|
|
pure virtual |
Get shared annotation.
- Returns
- Pointer to the annotation shared by several pages. This is preferred way to modify/update shared annotation. Do not use Page::getSharedAnnotation methods for normal operation; they're only for backward compatibility.
virtual const Annotation* Celartem::DjVu::Document::getSharedAnnotation |
( |
| ) |
const |
|
pure virtual |
Get shared annotation.
- Returns
- Pointer to the annotation shared by several pages.
virtual void Celartem::DjVu::Document::integrateDictionaryIntoPages |
( |
| ) |
|
|
pure virtual |
Remoevs shared dictionaries. Each page integrates its referencing dictionary.
virtual void Celartem::DjVu::Document::mergeSharedAnnotationIntoPages |
( |
| ) |
|
|
pure virtual |
Merge shared annotaion into pages.
virtual void Celartem::DjVu::Document::prepareForMerger |
( |
const Document * |
inDocMergeTo, |
|
|
std::map< String, String > * |
outNameRemappings = NULL , |
|
|
bool |
inDoingAutoNavmAnnoRemapping = true , |
|
|
Chunk::RenameFunc |
inRenameFunc = NULL , |
|
|
void * |
inRenameContext = NULL |
|
) |
| |
|
pure virtual |
Prepare for the merger with the specified Document. Each DJVU chunks are usually managed by a name and if multiple DjVu files are merged into a DjVu file, it may cause some confliction in names. This method renames such chunks before the actual merge process. This method also removes shared annotation to reduce confliction with the merger document.
This method is actually a wrapper to Chunk::prepareForMerger and this method internally calls updateChunks and syncToChunks before and after of the call to keep the consistency.
- Parameters
-
inDocMergeTo | Pointer to a Document instance to merge with. |
outNameRemappings | A map instance which receives name remapping list (old to new) for further process. It can be NULL if you don't need such information. |
inDoingAutoNavmAnnoRemapping | true to instruct this method to do updating NAVM and ANTz , ANTa chunks. |
inRenameFunc | Optional function to rename chunks. |
inRenameContext | Optional parameter, which is passed to rename function. |
- See Also
- Chunk::prepareForMerger
virtual void Celartem::DjVu::Document::removeSharedAnnotation |
( |
| ) |
|
|
pure virtual |
Remove shared annotation.
Write out the document to a file in bundled DjVu format.
- Parameters
-
inFileName | Output DjVu file name. |
inSecProv | SecurityProvider instance if needed. It can be NULL . |
inCallback | Pointer to a function which is called during the serialization process. |
inContext | Pointer to a parameter which is passed to inCallback function. |
inForceReflectChanges | If ture , this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
Write out the document to the storage in bundled DjVu format.
- Parameters
-
inStorage | Storage instance to write on. |
inSecProv | SecurityProvider instance if needed. It can be NULL . |
inCallback | Pointer to a function which is called during the serialization process. |
inContext | Pointer to a parameter which is passed to inCallback function. |
inForceReflectChanges | If ture , this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
virtual void Celartem::DjVu::Document::saveAsIndirect |
( |
const String & |
inOutputIndexFileName, |
|
|
const SecurityProvider * |
inSecProv = NULL , |
|
|
IFF::SerializationCallback |
inCallback = NULL , |
|
|
void * |
inContext = NULL , |
|
|
bool |
inForceReflectChanges = true |
|
) |
| const |
|
pure virtual |
Write out the document to the storage in indirect DjVu format.
- Parameters
-
inOutputIndexFileName | Output DjVu index file name. All the satellite files are placed on the same directory to this file. |
inSecProv | SecurityProvider instance if needed. It can be NULL . |
inCallback | Pointer to a function which is called during the serialization process. |
inContext | Pointer to a parameter which is passed to inCallback function. |
inForceReflectChanges | If ture , this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
Write out the document to the storage in indirect DjVu format.
- Parameters
-
inStorage | Storage instance on which this method writes the indirect djvu index file. |
inStorageLocator | StorageLocator instance which locates satellite files (this instance is used to determine the file path for the files other than index file). |
inSecProv | SecurityProvider instance if needed. It can be NULL . |
inCallback | Pointer to a function which is called during the serialization process. |
inContext | Pointer to a parameter which is passed to inCallback function. |
inForceReflectChanges | If ture , this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
virtual void Celartem::DjVu::Document::syncToChunks |
( |
| ) |
|
|
pure virtual |
Discards the modifications on this Document instance and synchronizes the internal state to the real Chunk instance.
In other words, this method does Chunk to Document reflection.
virtual void Celartem::DjVu::Document::updateChunks |
( |
| ) |
|
|
pure virtual |
Reflect the changes of this instance to the original chunks.
In other words, this method does Document to Chunk reflection.
The documentation for this class was generated from the following file: