Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #27008

    I am using the command line to convert HTML to PDF on my macbook.
    I have a mirrored setup on an Ubuntu server, also Java installed.
    Conversions are okay, but some characters are not encoded and result in ??.

    The file mimetype both on the server and my local dev is: UTF-8 (file –mime-encoding merged_booklet.xhtml)

    A part of the file:<br /> <?xml version="1.0" encoding="UTF-8" standalone="no"?><br /> <!DOCTYPE html><br /> <html xmlns="" xmlns:epub=""><br /> <head><br /> <meta charset="utf-8" /><br /> <meta name="viewport" content="width=420,height=420" /><br /> <title>Jouw_schoonheid_[NETQ_demo_versie_23]-1</title><br /> <link href="http://project-beauty.local/wp-content/uploads/booklet/src/nl/pdf/0.1.16/src/OEBPS/css/idGeneratedStyles.css" rel="stylesheet" type="text/css" /><br /> </head><br /> <body id="Jouw_schoonheid_-NETQ_demo_versie_23--1" lang="en-US" xml:lang="en-US" style="width:420px;height:420px"><div class="page"><br /> <div class="page"><br /> <div id="_idContainer009" class="Basistekstkader"><br /> <div style="width:340.15px;height:340.15px;position:absolute;top:0.05px;left:0px;"><br /> <p class="Pag-4--colofon-top ParaOverride-1"><span id="_idTextSpan026" class="CharOverride-5" style="position:absolute;top:4.29px;left:0px;">© </span>

    The © character in the last span for example does not get converted properly on my ubuntu box. On the mac, the PDF looks fine.

    Where should I start to look, because I know ubuntu supports utf-8, so I try to force pd4ml.jar to run in utf-8 mode?

    Hope you can help me out.
    Very happy with PD4ml, works like a charm.


    By the way I use TTF:
    $cmdline = “$java -Xmx512m -Djava.awt.headless=true -cp $jar Pd4Cmd “$url” 420 420×420 -debug -ttf $fontsdir -insets 0,0,0,0,mm -out $pdfname 2>&1″;
    and the TTF fonts are working fine.
    The fonts that I use are:

    #this is an autogenerated file. please remove manually any references to copyrighted fonts
    #Sun Dec 07 15:44:21 EST 2014
    AmerType Md BT Bold=AmerTypewriterITCbyBT-Bold.ttf
    AmerType Md BT=AmerTypewriterITCbyBT-Medium.ttf
    Helvetica Bold=helr65w.ttf
    Helvetica Bold Oblique=helr66w.ttf
    Helvetica Narrow=helr47w.ttf
    Helvetica Narrow Bold=helr67w.ttf
    Helvetica Narrow Bold Oblique=helr68w.ttf
    Helvetica Narrow Oblique=helr48w.ttf
    Helvetica Neue=HelveticaNeue_0.ttf
    Helvetica Neue Bold=HelveticaNeueBold_0.ttf
    Helvetica Neue Bold Italic=HelveticaNeueBoldItalic_0.ttf
    Helvetica Neue Condensed Black=HelveticaNeueCondensedBlack_0.ttf
    Helvetica Neue Italic=HelveticaNeueItalic_0.ttf
    Helvetica Neue Light=HelveticaNeueLight_0.ttf
    Helvetica Neue Light Italic=HelveticaNeueLightItalic_0.ttf
    Helvetica Neue UltraLight=HelveticaNeueUltraLight_0.ttf
    Helvetica Neue UltraLight Italic=HelveticaNeueUltraLightItalic_0.ttf
    Helvetica Oblique=helr46w.ttf
    Myriad Pro=MyriadPro-Regular.otf


    Adding -encoding utf-8 to the java command line fixed it on Ubuntu.

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.