Forum Replies Created

Viewing 15 posts - 331 through 345 (of 4,243 total)
  • Author
    Posts
  • in reply to: How to rename the auto generated pdf file before creation?
    #27750

    Got the solution:
    Just accept the “fileName” from the request (from HTML) and store it in a global variable in JSP and set it in the name attribute of

    Eg;
    <%String fileName = request.getParameter("fileName"); %>

    in reply to: General questions / FAQ
    #26309

    I am trying to create a 2-line footer, and was just wondering if it’s possible, and if anyone had done it?
    Thanks!

    example:
    footer1

    footer2

    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: General questions / FAQ
    #26310

    I am trying to make a pdf from jsp page, that contains a table. The code for PD4ML i use is

    and

    The problem is that in some amounts of lines in table. I get one more page than necessary and this page is free of content except the header. I don’t know hot to get rid of it?
    The look of it is in added picture.
    If you need more info, ask and I will try to give it.
    Doeys anyone have any propositions?

    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?
    #27753

    it’s java.
    footer.setAreaHeight( 15 );
    footer.setFont(new java.awt.Font(“Arial”, java.awt.Font.PLAIN, 7));
    footer.setColor( java.awt.Color.black );
    footer.setPagesToSkip( 0 );
    footer.setTitleTemplate( Title );
    footer.setPageNumberTemplate( “277GG11-06” );
    footer.setTitleAlignment( org.zefer.pd4ml.PD4PageMark.LEFT_ALIGN );
    footer.setPageNumberAlignment(org.zefer.pd4ml.PD4PageMark.RIGHT_ALIGN);
    pd4ml.setPageFooter( footer );
    There is a footer called Title, and I need to add another footer above it.
    Thanks!

    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.

    rkt
      in reply to: General questions / FAQ
      #26311

      I’d like to discuss a possible security hole in pd4ml which can have devastating effect if pd4ml library is used in a specific way. I prefer not to list the bug/feature until pd4ml developers can comment on it.

      Our organization wants to use it but this particular bug is big enough that we will start looking for an alternative product if there is no way out. Since the customer list of pd4ml is available online, its possible that those who figure out this bug could misuse this feature/bug in unintentional way as well.

      Please respond to this thread or contact me by email at the earliest.

      thanks,
      Royans

      Application Services
      Ingenuity

      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: Regarding direct print through default printer & Preview
      #27462

      In the release notes, it is said that it is already possible to create a pdf file which we open and the print dialog automatically opens.

      Is this functionality ok?
      What is the JSP taglib equivalent to do that?

      in reply to: General questions / FAQ
      #26293

      I would like to know if it is possible to create a pdf file which we open, and the print dialog automatically opens too. It is said in the release notes that this functionality is already implemented.

      If so, what is the JSP taglib equivalent to do so? Is it in the “permissions” tag?
      Could you show me an example of usage?

      in reply to: Troubleshooting
      #26312

      Hi !
      I use PD4ML with pd4ml.render(URL[] , OutputStream). Server is Tomcat.

      I have two issues:

      1- PD4ML ignore the JSTL library fmt.
      seems to be ignored. So my numeric datas aren’t formatted.
      How can I formatting datas ?

      2- I’ve a lot of different JSP, so I don’t want to create JSP especialy for PDF.
      Some parts of JSP are only usefull for screen: buttons, navigation toolbar, etc …..
      Is it possible to add a pd4ml tag in JSP to avoid the rendering of a piece of jsp/html code ?

      Regards,

      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&#8221;, os );

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

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

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

      in reply to: Automatically open print dialog
      #27651

      In Java code it can be done like that:
      [language=Java:1l351ami]Map m = new HashMap();
      m.put(PD4Constants.PD4ML_PRINT_DIALOG_POPUP, “true”);
      pd4ml.setDynamicParams(m);[/language:1l351ami]

      Unfortunately there is still no JSP taglib mapping for the method. Please check if your JSP environments allows to locate tag instance:
      [language=java:1l351ami]<% 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"); } %>[/language:1l351ami]

      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 (, , ) for the method will be available with the final release v360.

      in reply to: fmt library is ignored
      #27764

      thanks a lot for your response.

      I don’t understand very well your response for my issue #1:

      I’ve to compute in a sigle pdf doc severals jsp pages. What’s why I use the pd4ml.render(URL[], OutputStram) syntax. Moreover those jsp can by used in a “screen” mode so I can’t use the tag

      My array of URL is:
      https://my_server/ctx/struts_action.do?arg=val1
      https://my_server/ctx/struts_action.do?arg=val2
      …..
      https://my_server/ctx/struts_action.do?arg=valn

      where struts_action is the name of an action in my struts-config.xml file and ctx the name of my web app

      I can’t address directly the JSP, I’ve to invoke a struts action before.

      So I thought Tomcat will interpret jstl tag before giving the result to pd4ml.
      Do you have an idea why it is not the case ?

      Regards,

    Viewing 15 posts - 331 through 345 (of 4,243 total)