Override File

If the Override File setting is disabled will check if the file already exists to prevent file generation. You can also pass this setting in your templates before generating the file.

{% set html %}
	<!DOCTYPE html>
	<html lang="en">
		<meta charset="UTF-8">
		<title>First Test</title>
		<h1>Hello world!</h1>
{% endset %}

	set settings = {
		filename: 'my-first-pdf.pdf',
		inline: false,
		overrideFile: false

{% set url = craft.enupalsnapshot.displayHtml(html, settings) %}

<a href="{{url}}"> Download Pdf</a>