How can I link to a PDF file?

You can add a link to an external PDF file.

Symptom

I am trying to insert a cross-reference to a PDF file into a topic that will be post processed in the HTML environment.

Problem

DITA CMS indicates that it cannot validate the href attribute because the file cannot be found.

Solution

  1. Set the format attribute to pdf and the scope attribute to external. For example:
    <xref href="sample.pdf" format="pdf" scope="external"/>