When using wkhtmltopdf to print PDFs I get the error Warning: file_exists() expects parameter 1 to be a valid path, string given. The PDF is still exported. file_exists() does its job but complains about the string.

CommentFileSizeAuthor
#2 pdf-file-error-3205246.patch956 bytesstevieegee

Comments

stevieegee created an issue. See original summary.

stevieegee’s picture

StatusFileSize
new956 bytes

Use @ modifier to suppress errors, since it works as it should?

jrockowitz’s picture

Status: Active » Fixed

This sounds like a know PHP issue.

@see https://bugs.php.net/bug.php?id=76406

The specific issue here is the path is actually the binary string contents of the PDF file.

  • stevieegee authored caf1f4b on 6.x
    Issue #3205246 by stevieegee: Error when downloading PDF
    

  • stevieegee authored 26fc743 on 8.x-5.x
    Issue #3205246 by stevieegee: Error when downloading PDF
    
  • stevieegee authored caf1f4b on 8.x-5.x
    Issue #3205246 by stevieegee: Error when downloading PDF
    

  • stevieegee authored 26fc743 on 6.x
    Issue #3205246 by stevieegee: Error when downloading PDF
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.