    def is_attachment(self):
        """Return whether this link should be stored as a PDF attachment."""
        from ..html import element_has_link_type

        if self.element is not None and self.element.tag == 'a':
            return element_has_link_type(self.element, 'attachment')
        return False
Return whether this link should be stored as a PDF attachment.
weasyprint/formatting_structure/boxes.py