Skip to content

How to Remove Ads and Share Bars from PDFs

Ad blocks, share bars and “subscribe” boxes make sense on a web page and none in a PDF. Remove From PDF strips them out of every file.

On your site, right-click the element and choose Inspect. Note one of these:

  • Its tag, such as aside or ul.
  • A class, such as .sharedaddy or .newsletter-box.
  • An ID, such as #related-posts.
  • A tag and a class together, such as figure.wp-block-image.

Go to Content to PDF → Configuration → Rules and add one selector per line to Remove From PDF. On the demo, the list removed every image block and every bullet list.

Remove From PDF with two selectors

Click Save Changes and download a PDF. The same page of the same post, before and after:

Page 2 before: with an image and bullet lists

Page 2 after: the image and lists removed, the numbered list kept

The post went from five pages to three.

  • Only these four forms work. Longer selectors, such as .entry .share, are not supported.
  • The rule applies to every PDF and ebook. For a one-off, a reader can remove blocks in the reader.
  • Embedded videos are already replaced by a link, so they need no rule.