Forum Replies Created

Viewing 15 posts - 1,576 through 1,590 (of 4,249 total)
  • Author
    Posts
  • 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:

    [language=java:13pebngn]pd4ml.addStyle(“BODY, DIV, TD { word-wrap: break-word }”, true);[/language:13pebngn]

    in reply to: HTML/CSS rendering issues
    #26642

    Hi,

    I am currently evaluating PD4ML, using it in Coldfusion.
    I am very pleased so far.

    When I generate a TOC with the tag,
    I have a title and a subtitle above the tag. Both are headings.
    Code looks like this:

    [!TITLE!]

    [!SUBTITLE!]

    As you see I was trying to hide these 2 titles from the TOC, with what I thought was the correct command: pd4ml-bookmark-visibility: hidden

    Unfortunately they still show up. What am I doing wrong?

    Cheers,

    Mattijs

    in reply to: HTML/CSS rendering issues
    #26644

    Hi,

    I am currently evaluating the product and I ran into a chaching issue.
    I use PD4ML with Coldfusion.

    With CFML I generate the HTML and then feed that to a PD4ML object in
    CFSCRIPT:


    pd4ml = createObject(“java”,”org.zefer.pd4ml.PD4ML”);

    No while experimenting with a pdf generation tool, I noticed that my CSS links are not refreshed. The content of the seperate CSS file is being cached.
    Only when I add:
    pd4ml.clearCache();
    does it refresh.

    Is this correct or is this inefficient?

    Thanks,

    Mattijs

    in reply to: BMP in BASE64 encoding
    #28732

    Many thanks!!! I didn’t take litte endian into account. Now it is working.

    in reply to: General questions / FAQ
    #26645

    Any plans when tbody, thead and tfoot will be supported?

    in reply to: Merge failing
    #28741

    Hi –

    Would it be possible to get a response to this?

    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: Troubleshooting
    #26646

    Hi,

    In our product, PD4ML is being used to generate pdf report from html.
    One of our customers generated the report which is very badly formated (although html file looks fine) – On each page, it spans 1/4 portion of page on the left, while other 3/4 page on the right is blank.

    I am not sure how to attach screenshot here but if you give me a email address, I can send you screenshot.

    Below is the snippet of code that I used PD4ML to generate pdf:

    public InputStream render(List pages, Map reportMetadata)
    throws RenderingException {

    boolean landscapeView = false;
    if (reportMetadata.containsKey(ReportMetadata.ORIENTATION)
    && “landscape”.equalsIgnoreCase(reportMetadata.get(ReportMetadata.ORIENTATION).toString()))
    landscapeView = true;

    PD4ML converter = new PD4ML();
    converter.setPageSize( landscapeView ? converter.changePageOrientation( PD4Constants.LETTER ): PD4Constants.LETTER );
    converter.setPageInsets(new Insets(20, 50, 10, 10));
    converter.enableImgSplit(false);
    converter.enableTableBreaks(true);

    if(landscapeView)
    converter.setHtmlWidth(1000);
    else
    converter.setHtmlWidth(PD4Constants.LETTER.width);

    converter.adjustHtmlWidth();

    try {
    File report = File.createTempFile(“pdfreport”, “.pdf”);

    List pdfs = new ArrayList();
    File pdf;

    // for each page
    for (InputStream page : pages) {

    // create PDF
    pdf = File.createTempFile(“pdfreportpage”, “.pdf”);
    pdfs.add(pdf);
    converter.render(new InputStreamReader(page),
    new FileOutputStream(pdf));
    }

    PDFUtils.merge(pdfs, report);
    for(File tmpFile :pdfs)
    tmpFile.delete();
    return new FileInputStream(report);

    } catch (IOException e) {
    throw new RenderingException(e);
    } catch (DocumentException e) {
    throw new RenderingException(e);
    }
    }

    in reply to: Problem removing anchor underline using text-decoration
    #28734

    I’m having the same issue.

    Just by using

    a {
    color:black;
    text-decoration:none;
    }

    doesn’t remove the underline part, but does change the color.

    Thanks!

    in reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width
    #28746

    Attach generated pdf

    in reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width
    #28747

    try again to attach screenshot

    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: Urgent -Bad pdf layout – it span only 1/4 of normal width
    #28749

    I replaced “converter.adjustHtmlWidth()” with “convert.fitPageVertically()”, then everything starts to work fine.
    Is it safe to do so? what’s differene between these 2 method calls?

    in reply to: HTML/CSS rendering issues
    #26648

    Hi

    I’ve implemented PD4ML Pro in our application. We’ve been using pd4ml tld to transform the JSP page to PDF or RTF.
    However paragraph indentation (margin-left) is not coming correctly in RTF output(its all left aligned) but coming correctly in PDF output.

    Is there some limitation in RTF output?

    Regards,
    Kunal

    in reply to: Urgent -Bad pdf layout – it span only 1/4 of normal width
    #28750

    Now I see what was the problem reason: I paid no heed to converter.adjustHtmlWidth() call.

    It is better to remove both: converter.adjustHtmlWidth() and convert.fitPageVertically() until you have no special need in the features.

    convert.fitPageVertically() tries to place all content to a single page. It does not reflow it, but just scales down content until it fit. If needed scale factors make text extremely tiny, it gives up. Obviously it happens with the document with your current configuration.

    converter.adjustHtmlWidth() first renders page with given converter.setHtmlWidth() (virtual web browser frame width), after that calculates right content edge, sets htmlWidth parameter to the new value and re-renders the page. But if the page has an element with width=100% the approach does not work as the right content edge will be always equal to the initial converter.setHtmlWidth() value.

    BTW: the code

    [language=java:6nsht2sl]if(landscapeView)
    converter.setHtmlWidth(1000);
    else
    converter.setHtmlWidth(PD4Constants.LETTER.width);[/language:6nsht2sl]

    is not correct. As converter.setHtmlWidth() expects a parameter given in screen pixels, but PD4Constants.LETTER.width is a paper format in typographical points. Well, they are both integer values – hopefully you know what you do.

Viewing 15 posts - 1,576 through 1,590 (of 4,249 total)