public function save($path = null)
	{
		$pdf = $this->backend->generate();
		
		// If no output path has been supplied save the file
		// in the same folder as the original template.
		if (is_null($path))
		{
			if (is_null($this->originalDocument))
			{
				// This will be thrown when someone attemtps to use
				// the save method when they have supplied a HTML string.
				throw new RuntimeException
				(
					'You must supply a path for us to save the PDF!'
				);
			}
			
			$ext = $this->originalDocument->getExtension();
			$path = Str::s($this->originalDocument->getPathname());
			$path = $path->replace('.'.$ext, '.pdf');
		}
		
		// Save the pdf to the output path
		if (@file_put_contents($path, $pdf) === false)
		{
			throw new RuntimeException('Failed to write to file "'.$path.'".');
		}
		
		// Return the location of the saved pdf
		return $this->file($path);
	}