KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Error failed to load pdf document #2290

Closed Ron opened this topic on on Aug 20, 2021 - 8 comments

Ron commented on Aug 20, 2021

I am using apache2 cloud server on ubuntu and i several reports that can be displayed over the web or to be exported as PDF (not cloudexport) since today I receive strange error message in Chrome "Error failed to load pdf document" although nothing is changed in the report code. When the same report is displayed over the web everything works. When the PDF file is downloaded and I try to open it with PDF viewer I the following message "It may be damaged or use a file format that Preview doesn’t recognize."

Ron commented on Aug 20, 2021

I tried restarting Apache server but did not work

Sebastian Morales commented on Aug 20, 2021

Pls open the pdf with your text editor (vs code, notepad++) and see if there's any space or letter at the beginning of it?

Ron commented on Aug 20, 2021

this is the first lines of the file:

string(14) "Class_schedule"

%PDF-1.4 1 0 obj << /Title (��) /Creator (��) /Producer (���Q�t� �5�.�5�.�1) /CreationDate (D:20210820082513) >> endobj 2 0 obj << /Type /Catalog /Pages 3 0 R >> endobj 4 0 obj << /Type /ExtGState /SA true /SM 0.02 /ca 1.0 /CA 1.0 /AIS false /SMask /None>> endobj 5 0 obj [/Pattern /DeviceRGB] endobj 7 0 obj << /Type /XObject /Subtype /Image /Width 320 /Height 120 /BitsPerComponent 8 /ColorSpace /DeviceGray /Length 8 0 R /Filter /FlateDecode >> stream

Ron commented on Aug 20, 2021

the files starts with: string(14) "Class_schedule"

no space before hand

Ron commented on Aug 20, 2021

Ron commented on Aug 21, 2021

I recopied PhantomJS file to the bin folder in koolreport and restarted the ubuntu server. nothing helps. very strange that something starts like thing out of the blue!

Ron commented on Aug 21, 2021

Ron commented on Aug 22, 2021

I found the problem. I had a var_dump(...) command in my code and I did not see it. now everything works perfect. sorry!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None