Topic
  • 9 replies
  • Latest Post - ‏2011-12-06T18:17:53Z by aryan_raj
aryan_raj
aryan_raj
67 Posts

Pinned topic PDF generation

‏2011-11-16T12:02:48Z |
Hi All,

I am new to wpf, I need to generate pdf dynamically, I am planning to have a LJO which will contain the code to generate pdf, how to write a pdf to the output stream.
Please suggest.
Updated on 2011-12-06T18:17:53Z at 2011-12-06T18:17:53Z by aryan_raj
  • SystemAdmin
    SystemAdmin
    1493 Posts

    Re: PDF generation

    ‏2011-11-16T12:17:30Z  
    Hi,

    I would start by looking at the The Content Launch Action builder. You will want to take a close look at the help pages for this builder.

    Tom
  • aryan_raj
    aryan_raj
    67 Posts

    Re: PDF generation

    ‏2011-11-18T02:45:54Z  
    Hi,

    I would start by looking at the The Content Launch Action builder. You will want to take a close look at the help pages for this builder.

    Tom
    Hi Tom,

    Thank you for the quick reply, will check.
  • aryan_raj
    aryan_raj
    67 Posts

    Re: PDF generation

    ‏2011-11-19T15:17:22Z  
    • aryan_raj
    • ‏2011-11-18T02:45:54Z
    Hi Tom,

    Thank you for the quick reply, will check.
    Hi Tom,

    Can you please provide a sample, or any tutorial link. There are different inputs for "Content Launch Action builder" like Content Load Action, Content Response Description, I am not sure about these inputs.
  • SystemAdmin
    SystemAdmin
    1493 Posts

    Re: PDF generation

    ‏2011-11-20T15:27:49Z  
    • aryan_raj
    • ‏2011-11-19T15:17:22Z
    Hi Tom,

    Can you please provide a sample, or any tutorial link. There are different inputs for "Content Launch Action builder" like Content Load Action, Content Response Description, I am not sure about these inputs.
    Here is a wiki article that uses the Content Launch Action builder.

    http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Handling_file_attachments_using_IBM_WebSphere_Portlet_Factory

    Tom
  • aryan_raj
    aryan_raj
    67 Posts

    Re: PDF generation

    ‏2011-11-22T16:20:54Z  
    Here is a wiki article that uses the Content Launch Action builder.

    http://www-10.lotus.com/ldd/pfwiki.nsf/dx/Handling_file_attachments_using_IBM_WebSphere_Portlet_Factory

    Tom
    Hi Tom,

    Thank you, really helpful. One more question, Can I modify/customize the pop-up window's size that is generated by the builder. I can see the below code that is getting used to generate the pop-up,

    <input name="namedTag" value="Pop" onclick="window.open(&quot;<%= JSPSupport.getActionURL(webAppAccess, webAppAccess.getBackchannelURLMapper(false), "fileGiver.provideMyFile") %>", "_blank")" type="button" class="wpfBlueButton">
  • aryan_raj
    aryan_raj
    67 Posts

    Re: PDF generation

    ‏2011-12-06T10:31:17Z  
    • aryan_raj
    • ‏2011-11-22T16:20:54Z
    Hi Tom,

    Thank you, really helpful. One more question, Can I modify/customize the pop-up window's size that is generated by the builder. I can see the below code that is getting used to generate the pop-up,

    <input name="namedTag" value="Pop" onclick="window.open(&quot;<%= JSPSupport.getActionURL(webAppAccess, webAppAccess.getBackchannelURLMapper(false), "fileGiver.provideMyFile") %>", "_blank")" type="button" class="wpfBlueButton">
    Can somebody suggest me about how to achieve this.
  • mburati
    mburati
    425 Posts

    Re: PDF generation

    ‏2011-12-06T14:20:34Z  
    • aryan_raj
    • ‏2011-11-22T16:20:54Z
    Hi Tom,

    Thank you, really helpful. One more question, Can I modify/customize the pop-up window's size that is generated by the builder. I can see the below code that is getting used to generate the pop-up,

    <input name="namedTag" value="Pop" onclick="window.open(&quot;<%= JSPSupport.getActionURL(webAppAccess, webAppAccess.getBackchannelURLMapper(false), "fileGiver.provideMyFile") %>", "_blank")" type="button" class="wpfBlueButton">
    I don't know of a way to add any args to what is generated in that onclick handler.

    Unless Zag respodds with some way to do it that I'm just not thinking of, then one option you could try is using an Attribute Setter on that namedTag to set (choose the "overwrite existing attributes" option) the onclick attribute with what you see generated there, plus the argument(s) you want to add for specifying the window size). I believe Attribute Setter runs in a late enough generation phase, that it should be able to overwrite that onclick attribute.

    If Attribute Setter doesn't work, then a less elegant workaround may be to use a Visibility Setter to hide that generated namedTag input button and add your own button that does the equivalent, but with the extra window.open arg(s) you need.

    I hope that helps,
    ..mb1
  • SystemAdmin
    SystemAdmin
    1493 Posts

    Re: PDF generation

    ‏2011-12-06T16:05:35Z  
    • mburati
    • ‏2011-12-06T14:20:34Z
    I don't know of a way to add any args to what is generated in that onclick handler.

    Unless Zag respodds with some way to do it that I'm just not thinking of, then one option you could try is using an Attribute Setter on that namedTag to set (choose the "overwrite existing attributes" option) the onclick attribute with what you see generated there, plus the argument(s) you want to add for specifying the window size). I believe Attribute Setter runs in a late enough generation phase, that it should be able to overwrite that onclick attribute.

    If Attribute Setter doesn't work, then a less elegant workaround may be to use a Visibility Setter to hide that generated namedTag input button and add your own button that does the equivalent, but with the extra window.open arg(s) you need.

    I hope that helps,
    ..mb1
    I don't have any tricks for that. I'm a tiny bit uncomfortable with rewriting what the builder creates, because it makes for a potential error in the future. However, it's probably safe -- I can't see much chance of that code ever changing.)

    One other thing that might possibly work (I'm not sure), and probably isn't worth the trouble, is to set that button to have a style of display:none and make another button which calls the onclick of that button and then sets the size of the window. That would keep you safe from future changes to the code which makes that button. But I wouldn't bother, personally.
  • aryan_raj
    aryan_raj
    67 Posts

    Re: PDF generation

    ‏2011-12-06T18:17:53Z  
    I don't have any tricks for that. I'm a tiny bit uncomfortable with rewriting what the builder creates, because it makes for a potential error in the future. However, it's probably safe -- I can't see much chance of that code ever changing.)

    One other thing that might possibly work (I'm not sure), and probably isn't worth the trouble, is to set that button to have a style of display:none and make another button which calls the onclick of that button and then sets the size of the window. That would keep you safe from future changes to the code which makes that button. But I wouldn't bother, personally.
    Thank you mb1 and Steve, will try.