FPDF Encoding issues - php

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?

Related

Failed to load in Laravel/maatwebsite/excel when export excel file

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.

How to convert html into *.xlsx using php?

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

Show FPDF File in Browser does not work

Hi people when i use this code it saves the pdf file without problem. But when i use: $pdf->Output("pdf_test.pdf", "I");. It gives me :
FPDF error: Some data has already been output, can't send PDF file
thank for helping

Dompdf is not rendering image

I am using DOMPDF library to convert HTML to PDF at runtime. However, I am facing an issue related to images. System displays images when I render HTML code but when I convert it into PDF, it replace all images by "broken_image.png". I have placed complete url (given below) of images, its still not working for me :/ . Below is the example image url:
<img src='http://img.uksoccershop.com/images/man-utd-gk-away-shirt-2012-13.jpg'/>
Can anyone please tell me how can I resolve the issue. Thanks in advance.
To enable remote images for DOMPDF u have to alter the config dompdf_config.inc.php
Look near line 284 :
def("DOMPDF_ENABLE_REMOTE", false);
This should be set to true. Also be sure that the temp directory defined near line 103 is writeable :
def("DOMPDF_TEMP_DIR", sys_get_temp_dir());
DOMPDF is not a browser, it won't download images or any other assets, it simply converts HTML/CSS into a PDF representation.
You'll need something like wkhtmltopdf to achieve this.

TCPDF Trouble - Double Coding

I'm trying to build a PDF output in CakePhp using TCPDF, I've got it working and rendering the PDF correctly etc, but something strange is happening.
It's producing a broken PDF unless I call the Output function twice.
Any ideas? or alternatives?
$this->pdf->core->Output('example_001.pdf', 'I');
$this->pdf->core->Output('example_001.pdf', 'I');
Find your solution here..
https://github.com/mozilla/pdf.js/issues/2754
may be some issue related your configuration

Categories