Developer!
I export excel from html view in Laravel/maatwebsite. It's going very well but if there have a "&" special character then occur an error. I find out it. But I couldn't solve it.
Please help me.
Error is like this.
PhpOffice\PhpSpreadsheet\Reader\Exception
Failed to load /home//*/storage/framework/cache/laravel-excel/laravel-excel-vRQ1Fp0mrWZjoXeFWJPGtI0M2DfylYeF.html as a DOM Document
I searched this problem in google but i didn't get any solution.
Related
Good morning.
I have a test.html file. I would like to convert into test.xlsx using php.
Now, I could create test.xls file using php, whereas it is having only html tags due to that this file could not open directly in excel and it shows extension error. so if the file is having test.xlsx format gets opened smoothly.
I did not know that how to proceed further to get an expected results.
Please help if possible.
Thanks in advance.
Best regards,
Balraj
Use PHPExcel_Reader_HTML function of PHPExcel
I am using mPDF library with yii framework, my PDF is generated properly but now I have to implement internal linking inside PDF. I have tried adding following HTML code but it doesn't seems to work. Has anybody implemented this. Please help
in my controller i have written following line, that is written properly in pdf
$_mPDF->WriteHTML('<div name="1b21">test internal</div>');
And somewhere in document i have written.
$_mPDF->WriteHTML('Host Name');
Thanks.
Change
$_mPDF->WriteHTML('<div name="1b21">test internal</div>');
To,
$_mPDF->WriteHTML('<a name="1b21">test internal</a>');
i wanna encode my pdf file using FPDF so i used this code :
require('C:\Program Files/EasyPHP-5.3.9/www/PDF/fpdf16/font/makefont/makefont.php');
MakeFont('C:\Windows.old\Windows\Fonts\\comicbd.ttf','cp1250');
but it keeps showing me an error :
Error: AFM file not found: cp1250
can't find where the problem comes from ! Any suggestions ?and can anyone tell me what to do to encode my file?
I am trying to generate PDF from Excel, but I get the following error:
TCPDF ERROR: [Image] Unable to get image:./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg
Looking though Excel, I can find /var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg, but without the . before it.
Can the dot be a reason that failed converting?
./var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg
The '.' before that means that it will be looking in current directory for a folder called var.
You will need to remove this . in order to begin at the root. Which is correct.
This is how it should look '/var/www/projects/.../0401b0ca555959f391752bb1b0ea9ba1.jpg'
It looks like you are trying to use cURL to get the image, so i suggest you should try and change the image to be a URL such as http://URL of project folder/../0401b0ca555959f391752bb1b0ea9ba1.jpg
Other than that suggestion its hard to know what is happeneing but i suspect the TCPDF is not playing nicely.
I'm using fpdf class file to generate pdf in my php program. I want to use true type font named tahoma. Generated .z,.afm,.ttf,.php files from a website.
I've included makefont.php in my program and used a function makefont(). But it shows me an error "Can't write to file tahoma.z". I've done everything as per tutorial I read. I couldn't figure it out what mistake I've done. Please somebody help me out.
require('pdf/makefont/makefont.php');
MakeFont("pdf/font/tahoma.ttf","cp1252","true");
I've checked availability of all the file and spelling too.
I found what had I done wrong. No need for make any fonts since I have .php and .z files. I simply put on font directory and used "AddFont()" function. that's it.