Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 1,410 total)
  • Author
    Posts
  • in reply to: trouble with relative path for img or css
    #27777

    ok, now I see your point.

    Obviously it is a bug in our code. Would <base href="http://gaiactact.ira.appli.impots/gaia-agent/ctact/css/"> be a temporal workaround for you?

    (if so you would also need to adjust stylesheet references)

    in reply to: trouble with relative path for img or css
    #27774

    From my perspective the relative image link should be

    images/form_ctact_titre1.jpg

    instead of

    ../images/form_ctact_titre1.jpg

    “../” prefix in the image link leads out of ctact directory.

    in reply to: trouble with relative path for img or css
    #27776

    OK, you specify

    ../images/form_ctact_titre1.jpg

    PD4ML resolves it to

    http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg

    As for me if the source HTML is located in http://gaiactact.ira.appli.impots/gaia-agent/ctact/ it is correct.

    What should be the URL from your perspective?

    in reply to: fmt library is ignored
    #27767

    cookie format requires path information, so the value should look like “9034657927465;path=/”

    pd4ml.setSessionID() does not add session ID to the original document URL, but to referenced resource URLs only (images, CSS).

    You need to add the session ID to the document URL manually:

    https://pd4ml.com/document.jsp;jsessionid=9034657927465?other=params&if=any

    in reply to: fmt library is ignored
    #27765

    So <fmt:formatNumber> is interpreted (and does not appear in the HTML, passed to PD4ML), but the resulting numeric data format is invalid?

    Does <fmt:formatNumber> depend on Locale settings of user session? If so, you need to propagate the session ID with https://my_server/ctx/struts_action.do?arg=val1 and other URLs.

    Here is some info how to do that:
    https://pd4ml.com/forums/topic/session-not-transfered-when-using-pd4ml-render/#post-27637

    in reply to: Automatically open print dialog
    #27651

    In Java code it can be done like that:

    Map m = new HashMap();
    m.put(PD4Constants.PD4ML_PRINT_DIALOG_POPUP, "true");
    pd4ml.setDynamicParams(m);

    Unfortunately there is still no JSP taglib mapping for the method. Please check if your JSP environments allows to locate <pd4ml:transform> tag instance:

    <%
    org.zefer.pd4ml.taglib.PD4MLTransformerTag trt = (org.zefer.pd4ml.taglib.PD4MLTransformerTag)
    pageContext.getAttribute( "pd4ml.transformer.tag", javax.servlet.jsp.PageContext.REQUEST_SCOPE );
    
    if ( trt != null ) {
    System.out.println("found");
    }
    %>

    If it works you’ll be able to pass the dynamic params map to it

    trt.setDynamicParams(m);

    with the forthcoming PD4ML beta (v360b2).

    The missing mapping custom tags (<pd4ml:params>, <pd4ml:key>, <pd4ml:value>) for the method will be available with the final release v360.

    in reply to: fmt library is ignored
    #27763

    1. PD4ML does not implement JSP container functionality, so any custom tags or JSP code is ignored. If you need to convert a JSP page, you should let Tomcat to process it before it is passed to PD4ML. For example:

    pd4ml.render( "http://myserver.com/webapp/source.jsp", os );

    assuming that “http://myserver.com/webapp/source.jsp&#8221; returns HTML document with <fmt:*> already resolved/interpreted.

    Another option is to enclose source.jsp content within <pd4ml:transform> and </pd4ml:transform> tags. (see https://www.pd4ml.com/reference.htm#6.1)

    2. CSS properties “pd4ml-visibility: hidden; pd4ml-display: none” should help.

    in reply to: Possible security hole in pd4ml
    #27759

    Please contact support at pd4ml dot com and provide some more details.

    Thank you.

    in reply to: Can I create multipe line/row header or footer?
    #27754

    There is no way to define more than one footer with pd4ml.setPageFooter()

    I would workaround that way:

    …
    footer.setAreaHeight( 30 );
    footer.setTitleTemplate( “upper footer textn” + Title );
    footer.setPageNumberTemplate( “n277GG11-06″ );
    …

    Also PD4ML Pro allows you to define an inline footer, which will co-exist with your current footer.

    in reply to: PD4ML creates one more page than necessary
    #27758

    First, to start the problem reason analyze, try to define BODY { border: 1 solid red } style to see where the real bottom edge of the document content is.

    Normally an extra blank page appears because of accumulated bottom margins of block elements etc.

    If in your case the reason is clear and cannot be solved (by a removal of the  , ,
    , bottom margins at the end of the doc) you have two options:

    • Downscale the document content to make it fit the page(s) by increasing of htmlWidth (screenWidth in JSP) converting parameter.
    • If the resulting number of the document pages is known in advance, you may limit to it by the call pd4ml.outputRange(“1-3”)
    in reply to: Can I create multipe line/row header or footer?
    #27752

    I guess you mean non-HTML, non-inline headers.

    In the case you may define title- or page-number-template with “n” as line break character (in some contexts you would probably need to add an extra backslash: “\n”).

    And do not forget to allocate a sufficient space for the multiline header with areaHeight property.

    in reply to: .NET trial – margins and padding
    #27749

    1. It should work. But make sure tag or external CSS link is in section of the document. If for some reasons that does not help – please publish an HTML sample here or send it to PD4ML support by email.

    2. No, you need to define an absolute height value there. A possible workaround is to specify a background image for the pages, with needed border shape.

    in reply to: Html/CSS rendering issue
    #27675

    Please take into account: with the absolute coordinates you position the table in HTML document, not on a PDF page. After PD4ML rendered the HTML it maps it to the chosen page format. HTML-to-PDF scale is calculated like that:

    scale = (pageFormat.width – insets.left – insets.right) / htmlWidth

    If your table does not fit the first page, that means the scale is too big. Try to reduce it by increasing of htmlWidth rendering parameter (pd4ml.setHtmlWidth()) in small steps until the table is placed as expected on the PDF page.

    in reply to: Creating an index at the end of the pdf file
    #27686

    You may find the general info about TOC by the link:https://pd4ml.com/reference.htm#8

    There are some not yet documented features.

    You may suppress page number generation for particular TOC entries this way:

    <html>
    <head>
    <title>Test Page</title>
    <style>
    H1 { font-family: arial; font-size: 12; color: blue }
    #stl {pd4toc: nopagenum}
    </style>
    </head>
    <body>
    
    <pd4ml:toc>
    
    <pd4ml:page.break>
    
    <b id=1>NOPAGENUM  test</b>
    
    <h1>Line 1</h1>
    
    <h2 >Line 1.1</h2>
    <h2>Line 1.2</h2>
    
    <h2 pd4toc="nopagenum">Line 1.2.1</h2>
    <h2>Line 1.2.1</h2>
    
    <h2 pd4toc="nopagenum">Line 1.3</h2>
    
    <h1>Line 2</h1>
    
    <h1>Line 3</h1>
    
    <h1>Line 4</h1>
    
    <h1>Line 5</h1>
    
    <h1 id="stl">Line 6</h1>
    </body>
    </html>

    Or to disable it, let’s say, for all <H3>:

    div.ptoc3-style-left pd4ml-dots, div.ptoc3-style-right {visibility: hidden}

    You may disable particular levels to appear in TOC completely with:

    .ptoc3-style-left, .ptoc3-style-right {display:none; visibility:hidden;}

    in reply to: Creating an index at the end of the pdf file
    #27683

    I know, the same namespace in PD4ML JSP taglib and proprietary tags confuses.

    Here is the JSP docs:
    https://pd4ml.com/taglib/pd4ml/tld-summary.html

    The proprietary tags are at the bottom of the doc:
    https://pd4ml.com/html.htm

    Generally if a custom JSP tag has the same name as a PD4ML proprietary tag, the JSP tag simply replicates itself and lets PD4ML runtime to process it. The rest of JSP custom tags are mapped to PD4ML API.

    Regarding your particular issues:

    <pd4ml:page.break> assumes no body, so in JSP it should be <pd4ml:page.break ifSpaceBelowlessThan="500"/>. In plain HTML <pd4ml:page.break ifSpaceBelowlessThan=500> syntax is also allowed. But please take into account: the tag does not define a “page breaking style”. It is an explicit page break (in the case it is conditional).

    <pd4ml:permissions> is mapped to setPermissions() and it is also body-less.

    Your JSP should look like the following:

    <pd4ml:transform screenWidth="400" debug="true" >
    <pd4ml:permissions password="empty" rights="2068" strongEncryption="true"/>
    (preface)
    <pd4ml:page.break ifSpaceBelowLessThan="500"/>
    (chapter 1)
    <pd4ml:page.break ifSpaceBelowLessThan="500"/>
    (chapter 2)
    </pd4ml:transform>

    I also removed more-less outdated clean_xhtml as the current version of our HTML renderer “understands” XHTML quite good.

Viewing 15 posts - 1,276 through 1,290 (of 1,410 total)