Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eps image (from inkscape) not showing up in tcpdf

Using php and TCPDF to generate a pdf file. Everything works great except when I try to write an EPS image to the pdf using ImageEPS(). Nothing shows up. No errors (it can definitely find the file). It just shows up as white space.

Raster images (like PNG/JPG) work just fine.

I'm using Inkscape to save the .eps file. When I open the file up in any other program, it opens just fine. Its only TCPDF that its not showing up with.

like image 776
Joshua Avatar asked Mar 26 '10 18:03

Joshua


2 Answers

I had open my *.ai file in Adobe Illustrator and save the file as "Illustrator 3" version to overcome that issue. Any more current version produced the results you describe (except "Illustrator 8," which gave me the B&W version of my *.ai file).

like image 98
David L Ernstrom Avatar answered Sep 22 '22 01:09

David L Ernstrom


A bit late, but I had the same problem.

For me, the workaround was to export as PDF and reuse this PDF in TCPDF/FPDI with:

$num_pages = $pdf->setSourceFile(path_to_file);  
$template_id = $pdf->importPage(1); //if the grafic is on page 1
$pdf->useTemplate($template_id,$x,$y,$width,$height);
like image 24
Ludwig Avatar answered Sep 21 '22 01:09

Ludwig