diff options
Diffstat (limited to 'fpdfsdk/fpdf_editpage.cpp')
-rw-r--r-- | fpdfsdk/fpdf_editpage.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp index 3abdcdf0fc..808e330225 100644 --- a/fpdfsdk/fpdf_editpage.cpp +++ b/fpdfsdk/fpdf_editpage.cpp @@ -326,6 +326,21 @@ FPDFPageObj_AddMark(FPDF_PAGEOBJECT page_object, FPDF_BYTESTRING name) { return FPDFPageObjectMarkFromCPDFContentMarkItem(mark->GetItem(index)); } +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFPageObj_RemoveMark(FPDF_PAGEOBJECT page_object, FPDF_PAGEOBJECTMARK mark) { + CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object); + CPDF_ContentMarkItem* pMarkItem = + CPDFContentMarkItemFromFPDFPageObjectMark(mark); + if (!pPageObj || !pMarkItem) + return false; + + bool result = pPageObj->m_ContentMark.RemoveMark(pMarkItem); + if (result) + pPageObj->SetDirty(true); + + return result; +} + FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFPageObjMark_GetName(FPDF_PAGEOBJECTMARK mark, void* buffer, |