Hello dear podofo users,
I stumbled upon an issue with the deletion of annotations today:
PdfPage.cpp:409ff
> void PdfPage::DeleteAnnotation( int index )
> {
> PdfObject* pObj = this->GetAnnotationsArray( false );
> PdfObject* pItem;
> [..]
> pItem = &(pObj->GetArray()[index]);
> if( pItem->IsDictionary() )
> {
> [..]
> }
> else
> {
> this->DeleteAnnotation( pItem->GetReference() );
> }
> }
>
When calling DeleteAnnotation with an index, the requested Annotation is
stored into pItem. In my case it is not a dictionary, so DeleteAnnotation
with a Reference is called:
PdfPage.cpp:446ff
> void PdfPage::DeleteAnnotation( const PdfReference & ref )
> {
>
while( it != pObj->GetArray().end() )
> {
> if( (*it).IsReference() && (*it).GetReference() == ref )
> {
> pObj->GetArray().erase( it );
> bFound = true;
> break;
> }
> ++it;
> }
> }
>
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users