Skip to contents

Wraps FPDFPage_RemoveObject + FPDFPageObj_Destroy. After the call:

Usage

pdf_obj_delete(obj)

Arguments

obj

A pdfium_obj from pdf_page_objects() or one of the creators (pdf_path_new() / pdf_rect_new() / pdf_text_new()). Parent doc must be readwrite.

Value

Invisibly returns the parent pdfium_doc.

Details

  • The object is gone from the page's content stream.

  • The C++ object is destroyed.

  • The R pdfium_obj handle's externalptr is cleared so calling any other pdf_obj_* / pdf_path_* / pdf_text_* function on it errors cleanly via the existing closed-handle path.

Re-fetch via pdf_page_objects() if you need an updated obj list after deletions (the page-scoped indices shift).