ez projects / paradoxpdf / forum / general / special characters
You need to be logged in to post messages in the forums. New users may register here.
Member since: Posts: 13 |
Thursday 23 April 2009 4:37:46 pm Hi
Is it possible to generate PDF with iso-8859-2 characters? Now PDF is generated right but some characters are missing, like čć. I need all characters ŠĐČĆŽ and šđčćž. Best regards, Sinisa P.S. with iText it is possible. --- |
|
Member since: Posts: 78 |
Thursday 23 April 2009 4:54:07 pm Hello,
First try this: Add this at the top of the used pagelayout <?xml version="1.0" encoding="iso-8859-2"?> If dosen't do the job Could you Activate the debug and send me command output ? Thanks http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 13 |
Friday 24 April 2009 10:40:12 am Hi
My site is in all in utf-8 encoding. After enable debug i don't see any errors or warnings in paradoxpdf.log PDF is generated but some characters are missing like ČĆŽ and čćž! Best regards, Sinisa --- |
|
Member since: Posts: 78 |
Friday 24 April 2009 12:27:24 pm Ok,
I suspect a font loading problem. What font do you use for that content ? Note : i'm planning to add custom fonts loading in the Roadmap. http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 13 |
Friday 24 April 2009 2:07:42 pm Hi
Yes problem is with fonts. Times-Roman, encoding ANSI, Type 1 Can you please upload source to sourceforge.net? Or put it here in svn? Sinisa --- |
|
Member since: Posts: 78 |
Monday 27 April 2009 4:55:30 am I have released the version 2.0 of paradoxpdf it is now built over Xhtmlrenderer R8 Final.
Just checkout the new version, you can simply make your characters rendering by setting font encoding in the css : @font-face { -fs-pdf-font-encoding: Identity-H; } Hope this will help you Warning : now there are two branches : V1.x and V2.x the trunk contains the V2.X source http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 13 |
Monday 27 April 2009 1:45:52 pm Hi
I have put this inside css file @page { size: a4 portrait; margin: 0.25in; padding: 1em; @top-left { content: element(header); } @bottom-right { content: element(footer); } @font-face { src: url(/var/www/intranet2/extension/paradoxpdf/design/standard/stylesheets/life.ttf); -fs-pdf-font-embed: embed; /* defaults to auto (i.e. not embedded) */ -fs-pdf-font-encoding: Identity-H; } } but my rendered PDF still don't show some chars!? Am I dooing something wrong? Sinisa --- |
|
Member since: Posts: 78 |
Monday 27 April 2009 2:15:29 pm Can you send me the xhtml and the css example ?
http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 13 |
Monday 27 April 2009 2:33:05 pm Shure,
just give me yout email address. Best regards, Sinisa --- |
|
Member since: Posts: 78 |
Monday 27 April 2009 2:38:26 pm You can find my email adress in the header of all sources :)
http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 78 |
Monday 27 April 2009 3:58:55 pm Here is the solution :
@font-face { font-family: "Life L2"; src: url(life.ttf); -fs-pdf-font-encoding: Identity-H; } body{ font-family: "Life L2"; } The renderer will not embed any font unless it wasn't applied on html elements; So make sure first that your design works in firefox, by commenting the paradoxpdf operator call on your pagelayout template. Then when every thing looks fine, enable the paradoxpdf operator call on your template; Enjoy http://www.amiralweb.com Certified eZPublish Expert |
|
|
Member since: Posts: 3 |
Monday 15 February 2010 4:52:18 pm Hi,
I am working on a japanese PDF and I can't get ParadoxPDF to render my japanase chars. In your example, where do you physically put the .ttf file ? Best regards |
|
Member since: Posts: 78 |
Monday 15 February 2010 6:25:03 pm Hello Emmanuel,
you can put the fonts, for example, in your design extension: extension/myextension/design/mydesign/fonts/font.ttf the fonts directory should be relative to your css file for example : extension/myextension/design/mydesign/stylesheets/style.css then in the css : src: url("../fonts/font.ttf"); so here the path is relative to your css file just as for a background image Or you can simply put in the css the absolute path to your font file OK ? http://www.amiralweb.com Certified eZPublish Expert |
|
|
Member since: Posts: 3 |
Tuesday 16 February 2010 12:18:40 pm Hello Mohamed,
yes it's same as the images included in css. My real problem wasn't here : font-family has to be the font family name, and nothing else. Now I have my japanese characters :-) Thanks for your answer and for your extension ! Emmanuel |
|
Member since: Posts: 78 |
Tuesday 16 February 2010 2:49:40 pm You are welcome Emmanuel.
A bientôt ;) http://www.amiralweb.com Certified eZPublish Expert |
|
|
Member since: Posts: 14 |
Monday 11 July 2011 2:44:23 pm Hi Mohamed !
First thanks for sharing this very usefull extension !! I have issues with japanese characters too... they do not appear at all in the PDF while they correctly appear in the browser when I replace the output with this : {*paradoxpdf($paradoxpdf_params)*} {$xhtml} I have disabled CSS loading to avoid potentials bugs in relation with custom fonts and all my templates are endoded in UTF-8. I also added a meta charset instruction in the head : {set-block variable=$xhtml} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> But nothing to do, characters in Japanese doesn't appear in the PDF while french or english characters are present ! Thanks in advance for your help ! eZ Publish Freelance |
|
|
Member since: Posts: 3 |
Thursday 21 July 2011 10:09:08 am Hi Sébastien,
With japanese Characters, I used this font : sazanami-gothic.ttf here is my css code: @font-face{ font-family: "Sazanami Gothic"; src: url(fonts/sazanami-gothic.ttf); -fs-pdf-font-embed: embed; -fs-pdf-font-encoding: Identity-H; } body { font-family: "Sazanami Gothic"; } Best regards, Emmanuel |
|
|
Member since: Posts: 14 |
Thursday 21 July 2011 2:35:45 pm Hi Emmanuel,
You're right, in my case too the problem was that the font I was using doesn't contains japanse chars ! I understood this by myself after a lot of lost hours and I forgot to post the solution here ! Thank you for responding ;) eZ Publish Freelance |
|
|
Member since: Posts: 2 |
Monday 23 January 2012 12:01:17 pm Hi
I need too to render some characters typical of balkans countries ( ŠĐČĆŽ and šđčćž etc). I tried adding this (after uploading the times.ttf file in the newly created fonts directory) @font-face { font-family: "Times New Roman"; src: url("../fonts/times.ttf"); -fs-pdf-font-embed: embed; -fs-pdf-font-encoding: Identity-H; } body{ font-family: "Times New Roman"; } to my pdf-core.css file but the special chars are not rendered (the xhtml page generated is correct, commenting the paradox operator). The paradox log show Output : Exception in thread "main" java.lang.NullPointerException at org.xhtmlrenderer.swing.NaiveUserAgent.getBinaryResource(NaiveUserAgent.java:228) at org.xhtmlrenderer.pdf.ITextFontResolver.importFontFaces(ITextFontResolver.java:97) at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:178) at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:142) at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:138) at com.tricinty.ParadoxPDF.export(ParadoxPDF.java:121) at com.tricinty.ParadoxPDF.main(ParadoxPDF.java:59) Can you help me? roberto |
|
Member since: Posts: 1 |
Tuesday 10 April 2012 2:53:42 pm Hello everybody,
I have a problem with arabic characters, the html is exported but I get the Inverted characters in pdf file. The RTL is respected, the text is written well from right to left. ex: For me, I search this output : المرأة في عرف المجتمع But, I get this : عمتجملا فرع يف ةأرملا Best regards, Hassan |
You need to be logged in to post messages in the forums. New users may register here.