title: Spring REST Docs: How to output PDF instead of HTML? Unresolved directive
body: <p>I read through the documentation for Spring REST Docs and was able to generate an HTML file from the snippets, by adding another execution block to the plugin I can generate a pdf as well:</p>
  
  <pre><code>&lt;execution&gt;
      &lt;id&gt;output-pdf&lt;/id&gt;
      &lt;phase&gt;prepare-package&lt;/phase&gt;
      &lt;goals&gt;
          &lt;goal&gt;process-asciidoc&lt;/goal&gt;
      &lt;/goals&gt;
      &lt;configuration&gt;
          &lt;backend&gt;pdf&lt;/backend&gt;
          &lt;doctype&gt;book&lt;/doctype&gt;
          &lt;attributes&gt;
              &lt;snippets&gt;${project.build.directory}/generated-snippets&lt;/snippets&gt; 
              &lt;icons&gt;font&lt;/icons&gt;
              &lt;pagenums/&gt;
              &lt;toc/&gt;
              &lt;idprefix/&gt;
              &lt;idseparator&gt;-&lt;/idseparator&gt;
          &lt;/attributes&gt;
      &lt;/configuration&gt;
  &lt;/execution&gt;
  </code></pre>
  
  <p>The problem is that the generated pdf doesn't contain any of the snippets generated by Spring REST docs, instead in its place:</p>
  
  <pre><code>Unresolved directive in api-doc.adoc - include::{snippets}/request-parts.adoc[]
  Unresolved directive in api-doc.adoc - include::{snippets}/response-body.adoc[]
  Unresolved directive in api-doc.adoc - include::{snippets}/response-fields.adoc[]
  </code></pre>
  
  <p>Looks like it's not finding the location of the snippets so they are not getting rendered. </p>