Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

void PoDoFo::PdfDocument::SetViewerPreference ( const PdfName whichPref,
const PdfObject valueObj 
) [protected, inherited]

Low level APIs for setting a viewer preference

whichPrefsthe dictionary key to set
theobject to be set

Definition at line 539 of file PdfDocument.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfDocument::GetCatalog(), PoDoFo::PdfVariant::GetDictionary(), and PoDoFo::PdfObject::GetIndirectKey().

Referenced by PoDoFo::PdfDocument::SetBindingDirection(), PoDoFo::PdfDocument::SetCenterWindow(), PoDoFo::PdfDocument::SetDisplayDocTitle(), PoDoFo::PdfDocument::SetFitWindow(), PoDoFo::PdfDocument::SetHideMenubar(), PoDoFo::PdfDocument::SetHideToolbar(), PoDoFo::PdfDocument::SetHideWindowUI(), PoDoFo::PdfDocument::SetPrintScaling(), and PoDoFo::PdfDocument::SetUseFullScreen().

    PdfObject* prefsObj = GetCatalog()->GetIndirectKey( PdfName( "ViewerPreferences" ) );
    if ( prefsObj == NULL ) {
        // make me a new one and add it
        PdfDictionary   vpDict;
        vpDict.AddKey( whichPref, valueObj );
        GetCatalog()->GetDictionary().AddKey( PdfName( "ViewerPreferences" ), PdfObject( vpDict ) );
    } else {
        // modify the existing one
        prefsObj->GetDictionary().AddKey( whichPref, valueObj );

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index