Viewing 1 post (of 1 total)
  • Author
  • #26919


    I am using pd4ml 350 pro version, I am performing some trials to verify if pd4ml can embed a GDT font and display correct symbols inside pdf.
    I followed steps mentioned in section “7.1 TTF embedding” to configure fonts directory.

    I am trying to convert following html to PDf with Ascii and Unicode character for one of the GDT symbol,

    ASCII : é Unicode : é

    part of sample java code I wrote to test is as follows,
    String strFilePath = “D:/tempGDt.pdf”;
    File output = new File(strFilePath); fos = new;
    StringBuffer sbTemp = new StringBuffer(““);

    PD4ML html = new PD4ML();
    html.setHtmlWidth( 870 );
    html.setPageSize( new java.awt.Dimension(842, 595) );
    html.setPageInsets( new java.awt.Insets(30, 30, 30, 30) );
    html.useTTF( “D:/fonts”, true );

    StringReader sr = new StringReader(sbTemp.toString());
    html.render(sr, fos);

    When above code is executed, a PDF file is generated with blank pages. Following is the debug log,
    version: PD4ML 350 Pro
    not yet in cache: file:D:/fonts/
    new parse attempt with: UTF8
    not yet in cache: file:D:/fonts/arial.ttf
    read ‘arial’ from file:D:/fonts/arial.ttf
    not yet in cache: file:D:/fonts/gdtex.ttf
    read ‘gdtex’ from file:D:/fonts/gdtex.ttf
    done in 278ms.

    Please let me know if I am missing anything.

Viewing 1 post (of 1 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.