ParadoxPDF and font-family

Author Message

Pascal France

Wednesday 09 February 2011 5:40:49 am

Hi,

I use the paradoxpdf extension and I would like to know if there is a way to modify the default font-family used in the PDFs ?

I've tried to change it in the print-core.css file without success (while I can modify some other css elements).

Pascal

PS: Isn't it possible to ensure that the extension ParadoxPDF is displayed on the first page of results when doing a «PDF» search at the project.ez.no site ?

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Sébastien Antoniotti

Wednesday 09 February 2011 7:59:06 am

Hi Pascal,

The solution I found was to declare the font using font-face declaration :

"

@font-face { font-family : "Arial"; src: url(../fonts/arial.ttf); -fs-pdf-font-embed: embed;}

body {font-family:"Arial";}

"

Of course you need to upload the .ttf of the font.

eZ Publish Freelance
web : http://www.webaxis.fr

Pascal France

Wednesday 09 February 2011 10:13:41 am

Thanks for your reply Sébastien,

Could you explain me where you put you déclaration ?

I'm trying to use Google web Fonts. This one for testing:

http://code.google.com/webfonts/family?family=Dancing+Script&subset=latin#code

(other fonts are here: http://code.google.com/webfonts)

So, I put the «@font-face» declaration in many places in the print-core.css file without success.
I've tried the:

<link href='http://fonts.googleapis.com/css?family=Dancing+Script' rel='stylesheet' type='text/css'>

declaration too in paradoxpdf_layout.tpl. But the font is not used.

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Sébastien Antoniotti

Thursday 10 February 2011 12:59:34 am

Here is my print-core.css :

@page {    size: a4 portrait;    margin: 0.25in;        padding: 1em;       padding-top:130px;    @top-left {       content: element(header);    }     @bottom-right {        content: element(footer);      }  }
 @font-face {      font-family : "Arial"; /*put here font family name example Arial*/      src: url(../fonts/arial.ttf);   /*put here relative path to your font*/      -fs-pdf-font-embed: embed;        /* defaults to auto (i.e. not embedded) */  }
body {font-size:13px;font-family:"Arial";}

... sorry for the non-indentation ;)

eZ Publish Freelance
web : http://www.webaxis.fr

Pascal France

Thursday 10 February 2011 9:35:18 am

I don't know why but this doen't work for me.

Thanks again ;-)

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Sébastien Antoniotti

Friday 11 February 2011 1:40:42 am

Maybe the path to arial.ttf (or your_font.ttf) is wrong or has bad permissions ?

eZ Publish Freelance
web : http://www.webaxis.fr

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 00:13:34
Script start
Timing: Jan 30 2025 00:13:34
Module start 'layout'
Timing: Jan 30 2025 00:13:34
Module start 'content'
Timing: Jan 30 2025 00:13:34
Module end 'content'
Timing: Jan 30 2025 00:13:34
Script end

Main resources:

Total runtime0.0124 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1328151.2109
Module start 'layout' 0.00480.0023 739.343836.6563
Module start 'content' 0.00710.0038 776.000098.3906
Module end 'content' 0.01090.0014 874.390637.9766
Script end 0.0123  912.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002318.7105140.0002
Check MTime0.00118.5209140.0001
Mysql Total
Database connection0.00075.649810.0007
Mysqli_queries0.002923.618430.0010
Looping result0.00000.071310.0000
Template Total0.00129.310.0012
Template load0.00097.193210.0009
Template processing0.00032.077210.0003
Override
Cache load0.00075.277910.0007
General
dbfile0.00021.616780.0000
String conversion0.00000.040540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs