PDF: prevent infinite recursion