Jeckky / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

I can't generate a PDF from HTML using inline style font-family: Helvetica #409

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I am trying to generate a PDF file using inline style font-family:Helvetica

What is the expected output? What do you see instead?
I expected a PDF file which used helvetica font for the text.
I got a PDF file using Times New Roman as a default font.

What version of dompdf are you using? What version of PHP? On what
operating system?
Using 0.6b and php 5 on windows

Please provide the HTML source code you want to convert, or any additional 
information.

<p>
<span style="font-family:helvetica,sans,serif;">Helvetica Text</span>
</p>

Attached image showing the result expected (HTML SRC) and obtained result 
(generated PDF)

Original issue reported on code.google.com by netboxon...@gmail.com on 23 Jan 2012 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago
It should work, can you show us all your HTML source ?

http://eclecticgeek.com/dompdf/debug.php?identifier=fbe7c25673c35b155284124762df
b0c6

Original comment by fabien.menager on 23 Jan 2012 at 10:46

GoogleCodeExporter commented 9 years ago
Hello again,
I could not fix the problem yet. I attach the source code which I want to 
convert to PDF. I think that I am defining the fonts properly, and in your 
example I see that it should work, but it does not. I had not any correct 
result with a no default font. Does some of you has any idea? Thanks

Original comment by netboxon...@gmail.com on 25 Jan 2012 at 7:48

Attachments:

GoogleCodeExporter commented 9 years ago
It looks like dompdf cannot write files inside the dompdf/lib/fonts folder.
Please go to dompdf/www/setup.php with your web browser to see if everything is 
ok.

Original comment by fabien.menager on 30 Jan 2012 at 8:50

GoogleCodeExporter commented 9 years ago
In your original issue post you have the following sample text:

  <span style="font-family:helvetica,sans,serif;">Helvetica Text</span>

which is not quite right, it should be:

  <span style="font-family:helvetica,sans serif;">Helvetica Text</span>

You have a comma between "sans" and "serif" in "sans serif" and since sans is 
not a valid value serif is used. Double-check all your font family declarations 
to make sure the values are correct.

Original comment by eclecticgeek on 5 Feb 2012 at 1:37

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00