Skip to content

Add a button that allows download of static PDF files #8211

Answered by paulushub
syeduali93 asked this question in Q&A
Discussion options

You must be logged in to vote

For the footer, you can either
use the _appFooter attribute in the globalMetadata to change the footer contents
--or--
use a customized template by modifying either footer.tmpl.partial or _footer.liquid.

The _appFooter example: Assuming the following

  • the PDF file testpdf.pdf
  • the PDF file is place in a sub directory images (which is part of the resource definition already created by DocFX)
"resource": [
  {
	"files": [
	  "images/**"
	]
  }
],

. . .

"globalMetadata": {
  "_appFooter": "<span><a href=\"./images/testpdf.pdf\" target=\"blank\">Download PDF</a><br/>Copyright &#169; 2015-2022 Test Company<br>Generated by <strong>DocFX</strong></span>"
},

The result is shown below:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by markjulmar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants