如何删除文档中所有注释?

删除PDF文档中所有注释的示例代码如下:

FR_Document frDocument = FRAppGetActiveDocOfPDDoc();
FPD_Document fpdDocument = FRDocGetPDDoc(frDocument);
FR_DocView frDocView = FRDocGetCurrentDocView(frDocument);
FR_PageView frPageView = FRDocViewGetCurrentPageView(frDocView);
int curIndex = FRPageViewGetPageIndex(FRDocViewGetCurrentPageView(frDocView));
for (int i = 0; i < FPDDocGetPageCount(fpdDocument); i++)
{
    FR_Page frPage = FRDocGetPage(frDocument, i);

    FPD_Page fpdPage = FPDPageNew();

    FPD_Object pPageDict = FPDDocGetPage(fpdDocument, i);
    FPDPageLoad(fpdPage, fpdDocument, pPageDict, TRUE);

    FPD_AnnotList annotList = FPDAnnotListNew(fpdPage);

    int annotCount = FPDAnnotListCount(annotList);
    //注释列表是动态的,最好使用i--
    for (int  j = annotCount-1; j >-1; j--)
    {
        FPDAnnotListRemove(annotList, j);
    }
    FRDocReloadPage(frDocument, i, FALSE);
}

    FRDocReloadPage(frDocument,curIndex, FALSE);