Forum Replies Created

Viewing 15 posts - 1,321 through 1,335 (of 4,234 total)
  • Author
    Posts
  • in reply to: UTF – 8 char issue
    #28564

    In order to display Asian characters you need to utilize TTF embedding feature of PD4ML Pro:

    pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html

    in reply to: UTF – 8 char issue
    #28565

    I have tried with the following text :-

    Arabic نيويورك
    Japanese 定期購読お申し込みフォーム
    Russian Эксперт Online
    Other ÆØÅ_æ–øå_ö
    中文名的来源

    and the output is :-
    Arabic نيويورك
    Japanese
    Russian Эксперт Online
    Other ÆØÅ_æ–øå_ö

    means chiness and japanese char display as blank

    i have puted font.jar in web-inf lib folder and i changed my code as you suggested.

    new code is :-

    public File runConverter(File inputFileName, File outputFileName) throws IOException
    {
    if (inputFileName != null && outputFileName != null)
    {
    PD4ML pd4ml = new PD4ML();
    pd4ml.enableSmartTableBreaks(true);
    if (inputFileName.length() > 0)
    {
    InputStreamReader isr = new InputStreamReader(new FileInputStream(inputFileName), “UTF-8”);
    java.io.FileOutputStream fos = new java.io.FileOutputStream(outputFileName);

    /* START: CONFIGURATION FOR PAGE ORIENTATION */
    try
    {
    pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    /* END: CONFIGURATION FOR PAGE ORIENTATION */

    /* START: CONFIGURATION FOR PAGE ORIENTATION */
    pd4ml.setPageInsets(new Insets(10, 10, 10, 10));
    /* END: CONFIGURATION FOR PAGE ORIENTATION */

    /* START: CONFIGURATION FOR PAGE HEADER */
    PD4PageMark pageMarkForHeader = new PD4PageMark();

    pageMarkForHeader.setAreaHeight(10);
    pageMarkForHeader.setHtmlTemplate(“Hi, this is for testing only that page is start
    “);
    pd4ml.setPageHeader(pageMarkForHeader);
    /* END: CONFIGURATION FOR PAGE HEADER */

    PD4PageMark pageMarkForFooter = new PD4PageMark();
    pageMarkForFooter.setAreaHeight(10);
    pageMarkForFooter.setInitialPageNumber(10);
    pageMarkForFooter.setHtmlTemplate(“Hi, this is for testing only that page is end
    “); // ${title} for title, ${page} for page number, ${total} for total number of pages
    pd4ml.setPageFooter(pageMarkForFooter);

    URL base = new URL( “file:C:/tempJava/” );
    pd4ml.setHtmlWidth(780);
    pd4ml.useTTF( “java:fonts”, true );
    pd4ml.setDefaultTTFs(“Times New Roman”, “Arial”, “Courier New”);
    pd4ml.render(isr, fos, base);

    }
    }
    return outputFileName;
    }

    in reply to: UTF – 8 char issue
    #28566

    As I see you packed TTF fonts into a JAR and correctly refer them:

    pd4ml.useTTF( “java:fonts”, true )

    It looks like your JAR has only popular fonts like Arial, Courier etc. Normally the fonts do not include Asian glyphs. In order to cover the character space please add to the JAR fonts like MS Mincho, MS Gothic, MingLiU and SimSun from any Win32 distribution (you can find them in windowsfonts).

    Here are the entire font name lists, PD4ML tries to use in order to display international texts:
    post1638.html?#p1638

    in reply to: UTF – 8 char issue
    #28567

    Thanks sir for your reply but please, Can you provided that fonts.jar file which support all the characters..?

    in reply to: General questions / FAQ
    #26576

    Hello,

    We are considering switching to this product for our .NET application. I am hoping to find answers to the following questions for the .NET port of PD4ML:

    (1) Will this function in a MediumTrust environment?
    (2) Can you provide a string to the converter engine and have it output a byte array (or something similar that can be streamed to a browser)?
    (3) Do you have an upgrade pricing structure?

    Thanks in advance!

    in reply to: .NET and MediumTrust
    #28571

    I have downloaded the demo and answered #2 – it does function as we need.

    However, being that our application is in MediumTrust, our code requires the AllowPartiallyTrustedCallersAttribute. When attempting to load the PD4ML library, it does not allow partially trusted callers. Is it possible to get a build with that attribute added, or would we need to purchase the full source license and compile ourselves?

    in reply to: Troubleshooting
    #26577

    We basically have two images in the html, ON and OFF.
    We’ve experienced two problem situations converting to PDF:
    1. ON works, OFF not
    2. OFF works, ON not
    We have enabled debugging and have found this:
    O image not yet in cache: file:/[file-path]/OFF.gif
    O image file:/[file-path]/OFF.gif has zero length.
    O can not load image: OFF.gif

    So our final output shows ON, but not OFF. We have verified that OFF **is not zero length**.

    Unfortunately, that’s about as far as we’ve gotten.

    Any advice?

    -Steve

    in reply to: HTML/CSS rendering issues
    #26578

    hello

    i have bought PD4ML since more then one time and and i am facing a big issue in one font . i have embedded about 10 fonts and one of them is not working properly . the font gets loaded but characters are not showing correctly . the font is called simplified Arabic and i took it from windows fonts folder ….. so please can you give me any hint please

    thanks

    in reply to: i have bought PD4ml and facing font issue
    #28576

    PD4ML (or Java in general) supports Unicode-conformant TTF fonts only (whose glyph mappings are stored in the ‘cmap’ table). It is true for most of the modern fonts, but there are still many legacy fonts, which do not fulfill the requirement. Obviously the problematic font is one of them.

    The fonts cannot be used with PD4ML (or Java) as is. I would recommend to open and save as TTF again using free Fontforge utility.

    (google for a preconfigured FontForge + Cygwin with the following keyword: “fontforge-mingw_2008_11_21“)

    A better solution is to find a newer Unicode-conformant substitution font for it.

    in reply to: HTML/CSS rendering issues
    #26579

    Hi,
    Just purchased pd4ml pro version – brilliant tool! I have a problem, however, with the background-position attribute, as the documentation isn’t very clear. I understand that top, bottom, left, right are not valid, and neither are percentages. Therefore, please could you tell me what I should use to position a background image instead of top, bottom, left and right?
    Thanks.
    Regards,
    Marcus.

    in reply to: background-position
    #28577

    Marcus, please download the most recent beta and give a try to top, left and percentage attributes. The online documentation is not always up to date.

    PD4ML GUI tool should make the experimenting easier:

    java -Xmx512m -jar pd4ml.jar

    in reply to: background-position
    #28578

    Hi,
    Thanks for the reply. I actually downloaded pd4ml.prof.371b4.zip (is that beta?), and tried with top, bottom, left, right, but all that appeared to work was top left, i.e. 0 0, the default. Does the converter recognise all parameters in the background element, e.g. “background: url( ‘/images/box/solid_blue_m1.gif’ ) no-repeat bottom left !important;“?
    Thanks again.
    Regards,
    Marcus.

    in reply to: Not all Images loading (has zero length)
    #28573

    In this case, we also use PD4ML tags and relative paths to the images. This would work for the first image, but all subsequent images failed to load. We resolved the issue by fully qualifying all image paths to the http context URL.

    in reply to: HTML/CSS rendering issues
    #26580

    Hi,

    first, sorry for my english, i’m french ^^

    i’m currently testing PD4ML for one of my customer.
    We want to generate PDF with HTML on lotus notes web applications.

    An ajax called agent generate the pdf with the html passed in POST method

    the call
    sUrl = “//A_TSTEXPPDF?OpenAgent”
    var sRet =””;
    $.ajax({
    type: “POST”,
    url: sUrl,
    data: Trans(sData),
    cache: false,
    async: false,
    success: function(sRep){
    console.log(sRep)
    }

    });

    in the java agent
    html = docCont.getItemValueString(“Request_Content”);
    generatePDF( html, fos, PD4Constants.A4, “”, “DXL to PDF convesion result. $[page] of $[total]“);

    there’s problem with div’s width and padding.

    thanks for your help.

    here you can find the some codes :
    fichier zip: PD4ML.zip

    in reply to: Not all Images loading (has zero length)
    #28574

    The issue is quite strange. Could you please send an HTML (and/or JSP) code sample and ON/OFF images to support pd4ml com.

    The best solution would be to tune the relative image paths to work. We’ll check what could be done.

Viewing 15 posts - 1,321 through 1,335 (of 4,234 total)