0

This question is related to What is the smallest possible valid PDF?, but goes one step further: I'd like a PDF file that is as small as possible, but also invisible.

That means:

  • it contains no text or other objects (or if that's not possible, only completely transparent ones), and
  • it has no background (or if that's not possible, a completely transparent background).

When I open this file in a compliant PDF viewer, the background color of the viewer panel should show through completely, and when I embed it in a document on top of other elements, only these other elements should show.

A. Donda
  • 8,381
  • 2
  • 20
  • 49

1 Answers1

3

PDF pages have no background color by default (if you need an explicit background you have to draw a colored rectangle that covers the entire page).
PDF viewers will use a default white background to simulate a paper page, so the actual background depends on the PDF viewer.
When you place a PDF page on top of another one it will not block the underlying content if it does not have an explicit background.

Mihai Iancu
  • 1,818
  • 2
  • 11
  • 10
  • Do I assume correctly that the minimal PDF [here](https://stackoverflow.com/a/17280876/2056067) has no such explicit background? – A. Donda Dec 05 '19 at 18:24
  • 1
    Yes, you are correct. The page in that PDF file has no content at all. – Mihai Iancu Dec 05 '19 at 18:27
  • According to ISO 32000-1: *The notion of current page is generalized to refer to a transparency group consisting of the entire stack of objects placed on the page, **composited with a backdrop that is pure white and fully opaque***. Thus, PDF pages by default have a white backdrop, they are not transparent. Only if you don't treat pages as pages, the situation differs: *In contexts where a PDF page is treated as a piece of artwork to be placed on some other page it is treated not as a page but as a group, whose backdrop may be defined differently from that of a page.* – mkl Dec 09 '19 at 14:30