Did you find this guide helpful?
Some test text!
Cpp / Guides / Remove content
Platform
Documentation
To remove all images from a document page.
PDFDoc doc(filename);
Page page = doc.GetPage(1);
ElementWriter writer;
ElementReader reader;
reader.Begin(page);
writer.Begin(page, ElementWriter::e_replacement, false);
Element element;
while (element = reader.Next()) // Read page contents
{
switch (element.GetType())
{
case Element::e_image:
case Element::e_inline_image:
// remove all images by skipping them
break;
default:
writer.WriteElement(element);
break;
}
}
writer.End();
reader.End();
PDF Editor (Programmatic)
Full code sample which strips all images from the page and changes text color to blue.
Get the answers you need: Support