Forum Replies Created

Viewing 15 posts - 781 through 795 (of 1,410 total)
  • Author
    Posts
  • in reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width
    #28748

    It looks like htmlWidth conversion parameter value (frame width of virtual web browser) is set too big.

    Also there is some garbage characters: it is caused by an invalid or missing charset directive in the source document.

    The document HTML source and resulting PDF would help to analyze the issue. Please publish or send to support pd4ml com

    in reply to: Merge failing
    #28742

    Currently (v380) PDF parser of PD4ML has a number of limitations: it cannot parse linearized PDFs and edited PDFs (which have multiple xref tables).

    It would be helpful if you publish the original PDF document you tried to merge to. We’ll check if the problem is known and if there is a workaround.

    in reply to: Long word / link doesn’t break up into second line
    #28738

    CSS style “word-wrap: break-word” should help.
    if your document is read-only, you may apply it via PD4ML API:

    pd4ml.addStyle("BODY, DIV, TD { word-wrap: break-word }", true);

    in reply to: BMP in BASE64 encoding
    #28731

    Yes, the images you provided are still not compatible with PD4ML.

    I did the simple test again: opened your HTML in MS IE and saved the BMP as signature2.bmp and included it to example.html

    Obviously MS IE again repaired format errors of your BMP. See attached.

    I also compared signature.bmp and signature2.bmp. As I see 2 values “40” and “13” are swapped:

    in reply to: BMP in BASE64 encoding
    #28728

    I’ve just sent the version to your email box.

    in reply to: UTF-8 Characters
    #28739

    In order to display non-Latin characters you have to utilize TTF Embedding feature of PD4ML Pro: pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html

    A quick solution for you could be to download a basic font set from
    https://pd4ml.com/i/easyfonts/fonts.jar
    put the JAR to WEB-INF/lib and add to your JSP (nested to ).

    in reply to: Problem with ampersand
    #28720

    Just tested with the development build 3.80 – the issue has been already solved. However the version still did not pass all QA tests. It should not take longer than one week.

    in reply to: Auto XSL transform before render
    #28723

    For web scenarios PD4ML JSP taglib offers a tag to pre-process such type of paths, however it makes nothing special: it looks for a given pattern (for example, “”/userdata/includes”) and substitutes it with a desired string (“”userdata/includes”) . It works with the source HTML document as with a single string, ignoring the document structure – you could always implement your own similar solution.

    But I would recommend you to create a simple custom resource loader:
    post43.html
    and to interpret the “non-standard” paths the way you like.

    in reply to: Auto XSL transform before render
    #28721

    > “/userdata/includes/arialScreenReg.css”
    Is in the path /userdata is a web application name or just a legacy path, which currently makes no special sense?

    in reply to: getting NullPointerException when "Content-Type" is set
    #28733

    Thank you for the report!

    We’ve just fixed the issue in the development build. The fix will be available with the next beta release.

    in reply to: BMP in BASE64 encoding
    #28726

    Well, with your sample image we identified and fixed a bug in our code, related to 1-bit bitmap images.

    However when I tried your original HTML sample with base64-encoded images, the BMP still failed to appear in the resulting PDF. Which is quite strange.

    I have dumped base64-decoded image (“bad image”) and the second image you provided (“good image”). There is a difference in the file headers (the rests of the images are identical). See the attachment.

    It is difficult to say if the “bad image” has been corrupted during base64 encoding or it is a species of BMP format, known only to Microsoft.

    The impacted bytes are quite important:

    Good image:
    File type is :BM
    Size of file is :4990
    Size of bitmapinfoheader is :40
    Width is :342
    Height is :112
    Planes is :1
    BitCount is :1
    Compression is :0
    SizeImage is :4928
    X-Pixels per meter is :0
    Y-Pixels per meter is :0
    Colors used are :2
    Colors important are :2

    Bad image:
    File type is :BM
    Size of file is :4990
    Size of bitmapinfoheader is :40
    Width is :342
    Height is :112
    Planes is :1
    BitCount is :1
    Compression is :0
    SizeImage is :0
    X-Pixels per meter is :2834
    Y-Pixels per meter is :2834
    Colors used are :2
    Colors important are :0

    It looks like MS IE repairs the “bad image” on-a-fly and displays it correctly. If you save the image from MS IE you’ll get an image byte-to-byte identical to the “good image”.

    We would implement a workaround for such corrupted images, but it is not obvious how to obtain the missing “size of the raw bitmap data” value.

    in reply to: BMP in BASE64 encoding
    #28724

    Does the BMP have transparency mask?
    Could you please publish the image in its original form (as BMP file)?
    Thank you!

    in reply to: initialPageNumber
    #28397

    In theory the following command-line parameter should produce PDFs pop the print dialog automatically up:
    -param pd4ml.print.dialog.popup true
    Please give a try.

    I am not sure if I understood your second question correctly, as “PDF tag” can mean different things.

    So you would like to autoprint some sections of generated PDF documents? I do not know what you are going to use on the sever side as a print application, but if it should be “standard” Acroread, I would to take a look to the attached document. Acroread command-line parameters allow to jump to a particular section of a PDF document (marked as a named destination).

    By the link you may find Acroread command line options for silent printing:
    html-pdf-faq-f1/automatically-open-print-dialog-t158.html

    Probably by combining the named destination jump and the silent print command you’ll achieve the needed functionality.

    in reply to: Progress Monitor/Feedback mechanism during PDF generation
    #28684

    Sorry, we still not updated the documentation.

    The code below implements a simple dump of progress messages. Just combine the approach with your progress meter component state update.

    The current implementation probably still needs some balance refining between HTML parding, layouting and PDF output phases. However on our test scenarios the progress indication looks more-less smooth.

    pd4ml.monitorProgress(new ProgressMeter());
    ...
    public class ProgressMeter implements PD4ProgressListener {
    
    public void progressUpdate(int messageID, int progress, String note, long msec) {
    String tick = String.format( "%7d", msec );
    String progressString = String.format( "%3d", progress );
    
    String step = "";
    switch ( messageID ) {
    case CONVERSION_BEGIN:
    step = "conversion begin";
    break;
    case HTML_PARSED:
    step = "html parsed";
    break;
    case DOC_TREE_BUILT:
    step = "document tree structure built";
    break;
    case HTML_LAYOUT_IN_PROGRESS:
    step = "layouting...";
    break;
    case HTML_LAYOUT_DONE:
    step = "layout done";
    break;
    case TOC_GENERATED:
    step = "TOC generated";
    break;
    case DOC_OUTPUT_IN_PROGRESS:
    step = "generating PDF...";
    break;
    case NEW_SRC_DOC_BEGIN:
    step = "proceed to new source document";
    break;
    case CONVERSION_END:
    step = "done.";
    break;
    }
    
    System.out.println( tick + " " + progressString + " " + step + " " + note );
    
    }
    }

    in reply to: Trouble with server encoding (ISO-8859-15)
    #28717

    That is a clear sign, that the source HTML has a <meta> directive with ISO-8859-1. Try to change it to ISO-8859-15 and make sure you also utilize TTF embedding feature of PD4ML.

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

Viewing 15 posts - 781 through 795 (of 1,410 total)