[TYPO3] creating html to pdf

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Apr 12 10:01:28 CEST 2007


Ranjeet Kumar schrieb:
> Martin Kutschker wrote:
> 
>> Ranjeet Kumar schrieb:
>>
>>> Hello  all,
>>>
>>> I am trying to creat html to pdf. Some special charactors does not
>>>
>>> convert in pdf. I have also used metaCharset:'UTF-8'); and
>>>
>>> metaCharset:'ISO_8859-1');
>>>  But it remains same.
>>>
>>> Please help me .
>>
>>
>> Maybe you can tell us what extensions (if any) you are using to create 
>> PDFs. AFAIK not all extensions (and the used external applications) 
>> support all charsets (incl. utf8).
>>
>> Masi
> 
> 
> 
> 
> Thanks Masi,
> 
> I am not using any extension. I am using html Doc. Also using  cmd
> //to make pdf
> $cmd[] = '/usr/bin/htmldoc';
> $cmd[] = '--continuous';
> /*$cmd[] = '--charset iso-8859-15';*/
>                
> $cmd[] = ' -t pdf14';
> if ($this -> config['htmldocOptions']) {
> $cmd[] = $this -> config['htmldocOptions'];
> }
> $cmd[] = "$fHTMLName";
> //$cmd[] = "--from-code=UTF8 --to-code=ISO_8859-1";
> $cmd[] = "-f {$fileAttachment}";

What version are you using? The docs here http://htmldoc.org/htmldoc.html 
show now --from/to-code options.

And what charset does your TYPO3 installation use (in the DB)? This value 
must be used in config.renderCharset, so TYPO3 can load the data correct 
from the DB. You may use another charset for config.metaCharset. TYPO3 will 
now convert the data from the DB ino the desired output charset for your 
HTML page. Use this charset as option in your htmldoc command.

# DB charset (same as BE[forceCharset])
config.renderCharset = utf-8
# output charset
config.renderCharset = iso-8859-1

$cmd[] = '/usr/bin/htmldoc';
$cmd[] = '--charset iso-8859-1';

Masi


More information about the TYPO3-english mailing list