Show
Ignore:
Timestamp:
06/10/06 04:36:58 (2 years ago)
Author:
jordi
Message:

The functions I used to fix ticket #28 (named links in some PDF's) where only available in Poppler versions 0.5.2 and upper. Since Poppler versions 0.5.0 and 0.5.1 also works with those documents I added a check for the current version of poppler and made to conditionaly compile the named links part based on the version found.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/PDFDocument.cxx

    r203 r204  
    8686        { 
    8787            PopplerActionGotoDest *actionGoTo = (PopplerActionGotoDest *)action; 
    88             int pageNum = 0; 
    8988            PopplerDest *destination = actionGoTo->dest; 
     89            int pageNum = destination->page_num; 
     90#if defined (HAVE_POPPLER_0_5_2) 
    9091            if ( POPPLER_DEST_NAMED == destination->type ) 
    9192            { 
     
    99100                } 
    100101            } 
    101             else 
    102             { 
    103                 pageNum = destination->page_num; 
    104             } 
     102#endif // HAVE_POPPLER_0_5_2 
    105103 
    106104            documentLink = new DocumentLinkGoto ( 
     
    401399                child->setTitle (actionGoTo->title); 
    402400                PopplerDest *destination = actionGoTo->dest; 
     401                child->setDestination (destination->page_num); 
     402#if defined (HAVE_POPPLER_0_5_2) 
    403403                if ( POPPLER_DEST_NAMED == destination->type ) 
    404404                { 
     
    413413                    } 
    414414                } 
    415                 else 
    416                 { 
    417                     child->setDestination (destination->page_num); 
    418                 } 
     415#endif // HAVE_POPPLER_0_5_2 
    419416 
    420417                    outline->addChild (child);