Dynamically Generated HTML/PDF/RTF?

Hi guys,
This is similar to something I asked recently, but I've got a better idea of what I need and how to ask. I'm still fairly novice at programming, espeically applets.
I'm working on an applet for an educational purpose that will generate an array of study items...probably 30-50, I haven't decided on the size yet. It's for foreign language study, and the items are foreign phonetic characters, no more than 3 per item. I'd like to output them in a print-ready format, probably essentially a grid, with some space for the student to write their answer next to or under it. I've seen some free libraries out there that can generate pdf, rtf, and HTML, most notably the iText libraries.
I really want to do this as an applet. So my question is, how would this, or another library that one of you knows that would be better, be implemented? Would the output be a file on the server? Is there a way to make it generate the file to the users local cache or something, or give them an option to download it without it going on a server, since it is randomly generated and not uniform for other users? (I assume that would require making it a signed applet?)
Any help you can give would be really appreciated.
Colin

cosmic_cow wrote:
Okay, but this would work very well as a web application.What's a good resource for learning to work with them as opposed to applets? (Told you I'm a novice! ) Well, if you're a novice it might be better to concentrate on the regular Java stuff and sure, applets too.
Then if you feel interested in Java EE and Web Applications and Databases and what not, you can check out this to see what Enterprise Java consists of.

Similar Messages

  • Displaying dynamically generated HTML

    Hi!
    Is it possible to display dynamically generated HTML-page by means of ITS?
    I want to write report in ABAP and generate HTML-page with report data, then display it on client side.
    Is it possible?
    Thanks!

    Hello,
    As long as it has a transaction code then probably yes.  Just use the webgui service.
    Edgar

  • Error in generating HTML, PDF format

    Hi guys
    I am using Oracle Reports 6i with ORACLE 9i Database.
    After generating my report when i tried to generated report output in HTML or PDF format then system return following error message.
    PDE-PER001 Internal error (REP-3335. Unhandled Internal CA Error. depep 2).
    Remember when i tried to generate HTML or PDF format on other PC file generated successfully.
    Best Regards.
    Hassan Raza

    hello,
    you might want to contact oracle support services. maybe you need a patchset or so.
    thanks,
    ph.

  • Dynamically generate HTML at runtime

    I've tried looking for an existing project that does this or something similar already, but the closest I got was an eclipse plug-in by IBM, which wont really help me since it wont work at runtime.
    Basically I want to be able to generate a HTML form dynamically, based on the XML in a WSDL. Anyone got any ideas?

    Wow, no one? Damn, must be harder than I thought.No, it's really not hard at all. At least generating HTML isn't hard. What IS hard is answering your question. You have already rejected some alternatives, but you don't tell us what they were or why you rejected them. So I could suggest you use XSLT, but I might be wasting my time because you already rejected that. Or you might have had a completely bogus reason for rejecting it, but I can't tell.
    So basically that's why you didn't get any answers. Not enough information to base an answer on, and enough information to decide not to answer.

  • Cross column radio group solution using dynamically generated HTML

    I am tasked with creating a screen in Apex matching look and feel of an existing application screen; tabular form, multiple column radio buttons to update a single column value (radio group needs to be row oriented, across multiple columns). I could not find a way to use HTMLDB_ITEM.RADIO_GROUP () function for this due to the radio group being column based, great as a row selector but not for use across columns (each button being a column).
    My first thought was to comprise and use checkboxes via HTMLDB_ITEM.CHECKBOX () for the multiple choices (in each column) and HTMLDB_ITEM.HIDDEN() to hold the chosen value, a JavaScript function for “onClick” event to make the checkboxes in one row act like radio buttons in a radio group. I created a simple application to show the concepts of my solutions …
    SQL looks like this:
    select pk_id, -- f01
    object_to_color, -- f02
    HTMLDB_ITEM.CHECKBOX(11, color_choice,
    'onClick="chkboxAction('||pk_id||', document.wwv_flow.f11, ''RED'')"', 'RED') red,
    HTMLDB_ITEM.CHECKBOX(12, color_choice,
    'onClick="chkboxAction('||pk_id||', document.wwv_flow.f12, ''BLUE'')"', 'BLUE') blue,
    HTMLDB_ITEM.CHECKBOX(13, color_choice,
    'onClick="chkboxAction('||pk_id||', document.wwv_flow.f13, ''GREEN'')"', 'GREEN') green,
    color_choice -- f03
    from objects_to_color
    Columns pk_id and color_choice are set as Show off and Display As Hidden. Note that my HTMLDB_ITEM.CHECKBOX items start with id number 11 (f11 – f13) so as not to conflict with the item id’s Apex will generate on it’s own. I could have used HTMLDB_ITEM functions to create all items and had my own PL/Sql update process.
    This creates a tabular presentation with a column for each color choice as a checkbox, shown checked if that color is initially set.
    The JavaScript function chkboxAction() clears the other checkboxes if a color is selected and stores the color in the hidden item db column for use in Apex Submit processing. Sorry the identation get's lost in the post!
    function chkboxAction (id, ckbx, color) {
    // f01 is pk_id (hidden)
    // f11 is RED checkbox
    // f12 is BLUE checkbox
    // f13 is GREEN checkbox
    // f03 db column color_choice for update (hidden)
    var idx;
    // Find row index using pk_id passed in as id argument.
    for (var i=0; i < document.wwv_flow.f01.length; i++) {
    if (document.wwv_flow.f01.value == id) {
    idx = i;
    i = document.wwv_flow.f01.length;
    if (ckbx(idx).checked == true) {
    // Set hidden color_choice column value to be used in update.
    document.wwv_flow.f03(idx).value = color;
    // Uncheck them all, then reset the one chosen.
    document.wwv_flow.f11(idx).checked = false;
    document.wwv_flow.f12(idx).checked = false;
    document.wwv_flow.f13(idx).checked = false;
    ckbx(idx).checked = true;
    } else {
    // Unchecked so clear color_choice column value to be used in update.
    document.wwv_flow.f03(idx).value = '';
    This works well and, as an aside, has an added feature that the color can be “unchosen” by unchecking a checked checkbox and leaving all checkboxes unchecked. This cannot be done with radio buttons unless a radio button is added as “no color”.
    But what if radio buttons must be used, as in my situation? Here is another solution using custom code to dynamically generate radio buttons for a row based radio group rather than using HTMLDB_ITEM.RADIO_GROUP ().
    select pk_id, -- f01
    object_to_color, -- f02
    '<input type="radio" name="rb'||pk_id||'" id="rb'||pk_id||'_1" value="RED" '||
    decode(color_choice, 'RED', 'CHECKED', '')||
    ' onClick="rbAction('||pk_id||', ''RED'')">' red,
    '<input type="radio" name="rb'||pk_id||'" id="rb'||pk_id||'_2" value="BLUE" '||
    decode(color_choice, 'BLUE', 'CHECKED', '')||
    ' onClick="rbAction('||pk_id||', ''BLUE'')">' blue,
    '<input type="radio" name="rb'||pk_id||'" id="rb'||pk_id||'_3" value="GREEN" '||
    decode(color_choice, 'GREEN', 'CHECKED', '')||
    ' onClick="rbAction('||pk_id||', ''GREEN'')">' green,
    color_choice -- f03
    from objects_to_color
    The pk_id column is used here to ensure a unique name and unique id for the items. In practice a custom api should be used to generate items in this way.
    The JavaScript function is actually simpler for radio buttons because the radio group handles the mutually exclusive logic for choosing a color.
    function rbAction (id, color) {
    // f01 is pk_id (hidden)
    // f03 db column color_choice for update (hidden)
    var idx;
    // Find row index using evaluation_question_id.
    for (var i=0; i < document.wwv_flow.f01.length; i++) {
    if (document.wwv_flow.f01.value == id) {
    idx = i;
    i = document.wwv_flow.f01.length;
    // Set hidden result column referenced in update.
    document.wwv_flow.f03(idx).value = color;
    Now the problem is that on update, Apex will be confused by the custom items and try to post updated values to it’s own internal items – which don’t exist. The result is the very frustrating HTTP 404 - File not found error when apex/wwv_flow.accept executes on Submit. So, the trick is to clear the custom items prior to the update with a simple JavaScript function, then the values show again when the page is rerendered, if you are not branching from the page. The Submit button is changed to call the following function:
    function submit () {
    var items = document.getElementsByTagName("INPUT");
    for (i=0; i< items.length; i++) {
    if (items(i).type == "radio") {
    if (items(i).checked == true)
    items(i).checked = false;
    doSubmit('SUBMIT');
    This technique might have general use when using custom items. Comments or improvements on this?
    See Oracle Apex site: workspace SISK01, app OBJECTS_TO_COLOR

    Just the code for formatting.
    Checkboxes to behave like radio group ...
    SQL ...
    select pk_id,              -- f01
           object_to_color,    -- f02
              HTMLDB_ITEM.CHECKBOX(11, color_choice,
                  'onClick="chkboxAction('||pk_id||', document.wwv_flow.f11, ''RED'')"', 'RED') red,
              HTMLDB_ITEM.CHECKBOX(12, color_choice,
                  'onClick="chkboxAction('||pk_id||', document.wwv_flow.f12, ''BLUE'')"', 'BLUE') blue,
              HTMLDB_ITEM.CHECKBOX(13, color_choice,
                  'onClick="chkboxAction('||pk_id||', document.wwv_flow.f13, ''GREEN'')"', 'GREEN') green,
           color_choice  -- f03
    from objects_to_colorJavaScript ...
    function chkboxAction (id, ckbx, color) {
        // f01 is pk_id (hidden)
        // f11 is RED checkbox
        // f12 is BLUE checkbox
        // f13 is GREEN checkbox
        // f03 db column color_choice for update (hidden)
        var idx;
        // Find row index using pk_id passed in as id argument.
        for (var i=0; i < document.wwv_flow.f01.length; i++) {
           if (document.wwv_flow.f01(i).value == id) {
              idx = i;
              i = document.wwv_flow.f01.length;
        if (ckbx(idx).checked == true) {
          //  Set hidden color_choice column value to be used in update.
          document.wwv_flow.f03(idx).value = color;
          // Uncheck them all, then reset the one chosen.
          document.wwv_flow.f11(idx).checked = false;
          document.wwv_flow.f12(idx).checked = false;
          document.wwv_flow.f13(idx).checked = false;
          ckbx(idx).checked = true;
        } else {
          //  Unchecked so clear color_choice column value to be used in update.
          document.wwv_flow.f03(idx).value = '';
    }Radio button solution ...
    SQL ...
    select pk_id,              -- f01
           object_to_color,    -- f02
           '<input type="radio" name="rb'||pk_id||'" id="rb'||pk_id||'_1" value="RED" '||
                decode(color_choice, 'RED', 'CHECKED', '')||
                ' onClick="rbAction('||pk_id||', ''RED'')">' red,
           '<input type="radio" name="rb'||pk_id||'" id="rb'||pk_id||'_2" value="BLUE" '||
               decode(color_choice, 'BLUE', 'CHECKED', '')||
               ' onClick="rbAction('||pk_id||', ''BLUE'')">' blue,
           '<input type="radio" name="rb'||pk_id||'" id="rb'||pk_id||'_3" value="GREEN" '||
               decode(color_choice, 'GREEN', 'CHECKED', '')||
               ' onClick="rbAction('||pk_id||', ''GREEN'')">' green,
           color_choice  -- f03
    from objects_to_colorJavaScript ...
    function rbAction (id, color) {
        // f01 is pk_id (hidden)
        // f03 db column color_choice for update (hidden)
         var idx;
         // Find row index using evaluation_question_id.
        for (var i=0; i < document.wwv_flow.f01.length; i++) {
           if (document.wwv_flow.f01(i).value == id) {
              idx = i;
              i = document.wwv_flow.f01.length;
        //  Set hidden result column referenced in update.
        document.wwv_flow.f03(idx).value = color;
    function submit () {
      // Clears radio buttons to prevent Apex trying to post and causing page error.
      var items = document.getElementsByTagName("INPUT");
      for (i=0; i< items.length; i++) {
        if (items(i).type == "radio") {
          if (items(i).checked == true)
            items(i).checked = false;
      doSubmit('SUBMIT');
    }

  • How to dynamically generate HTML in Servlet without all the out.println?

    Since I am not sure whether this is a Java Servlet or JSP problem, so I will describe my situation. And hopefully someone can propose a good solution. I came from a PHP, so Java Servlet and JSP are still a little bit foreign for me.
    My problem
    My front end is a JSP page that essentially contains a form (let’s call it form1). The reason it is a JSP not a HTML is because I will need to load form data from the backend and display them in the form. Once the user submits the form, it will go to a backend Java Servlet (let’s call it servlet 1), which loads data from files according to user input. Then, I will need to dynamically create a new form (let’s call it form2) based on the data loaded from files. Once the user inputs and submits form2, another Java Servlet (servlet 2) will do more processing. That is the end of line. Both form1 and form2 require Javascript.
    My question is that since servlet 1 will need to dynamically create form2. I naturally will want a presentation control. Instead of doing out.println(“html code”), I want to use JSP and write direct HTML code. On the other hand, can JSP be used as a form action? So basically, in form 1, can I do <form action=”…/xxx.jsp”> I think I saw something like this, but I lack the comprehensive JSP knowledge to know for sure. More importantly, if hypothetically JSP can be used, how do I handle functions such as doGet(HttpServletRequest request, HttpServletResponse response), which is used in servlet1.
    Thank you,
    M

    no, servlets should not be used to generate a view, that is what a JSP is for. So let your backend servlet fetch the data, put it for example as attributes of the request scope (request.setAttribute()) and then forward control to a JSP that will generate the view, based on the information you stored in the request scope. That is the proper way of using servlets & JSPs; use servlets to invoke business logic classes, use JSPs combined with JSTL to generate the view. If you do it properly, you don't need ANY java code in your JSP.

  • Use of WHERE clause to get 2 columns from dynamically generated html page.

    I am using postgresql.I have to complete a java program , which is a forum like thing.User can login and submit question.....if anybody know the answer he can post the answer........Now the problem is that if more than one questions are entered it all should be displayed when we click on a "faq" button.........i created that one......these questions have the hyperlink.........When we click on a single question a text box will come........we have to write the answer there and answer should lie on the column corresponding the question clicked..............
    Here i need the querry to write in servlet so that the answer is stored in the corresponding column only.................
    Pleaseeeeeeeeeeeee help me as soon as possible..................
    Regards
    Shine..

    Sir,
    Other than you are using postgres and a servlet I have absolutley no idea what you are on about.
    Please try explaining in a less distressing manner.
    Sincerely,
    Slappy

  • How to create PDF/RTF/HTML from XML?

    Hi,
    I like to generate reports as per clients requirement in PDF/RTF/HTML format....... I have genrated XML file, with the help of the same i like to generate other report formats.......i tried FOP but there is nothing for RTF format..... i tried aurigadoc but that has some problem .not able to maintain colspan........SO pl guide me to solve this issue......................thnx

    Hi,
    Thanks for suggestion.........But i am already implemented FOP for PDF...... But with the same i can not generate RTF becoz that facility is not there ....... thats why i want a unique solution which will solved my both the problems...... So pl let me know the solution..........Thnx

  • How to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    PDF 417 Barcode Description given in the Livecycle Designer 8.2
    : PDF 417 Non-Scriptable Barcode. Value must be assigned to this barcode at design time, and this barcode will not update after form object value changes.
    And my question is how to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    All the information you described points to the problem that reports seems can't generate to a file which already exist. You can verify that by simply doing
    r30run32 C:\AC_REPORT.REP DESTYPE = FILE DESFORMAT = PDF BATCH = YES' desname=c:\temp\ac_report.pdf
    several times. If first time the report is successfully generated in c:\temp\ac_report.pdf, but not the second, third time, then it looks like there is a bug on reports r30run32 executable.
    You may try to find any latest patch for Reports 3.0 to see if patch can solve you problem. But keep in mind Reports 3.0 is de-supported, you are better to move to 6i or 9i reports.
    Thanks,
    -Shaun

  • Issue with emailing dynamically generated PDF (InteractiveForm UI element)

    Hi Experts ,
    I have a requirement according to which i need to generate PDF dynamically using webdynpro java and email the dynamically generated PDF.
    I am facing issue while emailing the dynamically genarated pdf.
    It gives me an exception :
    nested exception is: javax.mail.MessagingException: IOException while sending message;  nested exception is: java.io.IOException: no data
    This is because its unable to get the binary data (byte array) of the dynamically generated PDF which is required to send mail.
    Could some one suggest me how to fetch the binary data of the dynamically generated PDF.
    For dynamic PDF generation i am using dynamic generation of UI element   InteractiveForm UI Element 
    In case of static PDF (i.e. the PDF genarated by inserting the InteractiveFrom Ui element on the view using the insert child option) we do set the pdf source property of Interactive Form UI element to a context variable attribute of type binary but  my problem is ,how to set the PDF source of a dynamically generated Interactive form UI element to a context variable attribute of type binary ..
    Any help would be highly appreciated.
    Regards ,
    Navya

    Hi Frank ,
    the code to generate PDF dynamically is written in the WdDoModifyView section of the view as the PDF need to be generated dynamically., i.e. by adding InteractiveForm UI elements at  runtime.
    I tried the code suggested by you  but i gave mean exception.
    errorjava.io.FileNotFoundException:
    (The system cannot find the path specified)
    Kindly let me know where i am going wrong .
    Below is the code that i  had written in a separate method m_mail().
    This would take as input the name of the dynamically generated data node and is called from the wdDoModifyView section of the view
    public void m_mail( java.lang.String p_dynamicnodeName )
                   ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
              //        This would need to have the Templatefile in the Mimes-Directory of the Webdynpro-Component
                   String templateUrl = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "AdobeView1_InteractiveForm.xdp");
                   InputStream templateSourceInputStream = new FileInputStream(templateUrl);
                   IOUtil.write(templateSourceInputStream, templateSourceOutputStream);
                   IWDPDFDocumentCreationContext pdfContext = WDPDFDocumentFactory.getDocumentHandler().getDocumentCreationContext();
                   pdfContext.setData(WDInteractiveFormHelper.getContextDataAsStream(wdContext
                   .nodeCtx_vn_dynmcnd()
                   .getChildNode(p_dynamicnodeName, IWDNode.NO_SELECTION)));
                   pdfContext.setTemplate(templateSourceOutputStream);
                   pdfContext.setInteractive(false);
                   IWDPDFDocument pdf = pdfContext.execute();
                   if (pdf != null) {
                    pdfArray = pdf.getPDF();
    Kindly let me know where am i going wrong.
    Regards ,
    Navya

  • I generate file (PDF, HTML, etc) the report is empty but I run in paper

    Hi
    I use oracle Report10g
    When I generate file (PDF, HTML, etc) the report is empty but I run in paper design show data, the report in the paper design show many pages, when generate file show only the information of the margin in the main seccion and the body is empty,
    Thanks

    Thanks Daniel for pointing that out.  Though you answer is helpful but I am not sure if that is what I would want to do.
    The link you provide for csv says "For each report there's an _report.xdo file that contains the XML structure of the report... "   It suggests I modify the .xdo file for each report.  I currently have 16 reports.
    Does it mean I modify the .xdo file for all 16  and what happens if someone creates a 17th report ?
    Also, what if I run the same report using different input parameters will that change the xml structure for the report  and therefore will need me to modify the .xdo again ? (I think it should not change the xml structure so the answer should be "NO" to that, unless I change the structure of the report).
    Finally, the link you provide says after doing what it suggest  "Now log back into BI publisher and select the report. You should now be able to see that CSV is now an option."
    CSV should be an option where ? on what screen/page ?  Maybe PDF is already an option for me that I cant see because I do not know where that option is.
    I was hoping there would be something I could do on the xdo_metadata sheet (in the data constraints section or elsewhere) OR in BI Publisher itself as some property of the report.
    I will try out what you suggest any ways.
    M. Jamal

  • Does Adobe provide a PHP library for dynamically generating a non-editable PDF on a website?

    As the title says, I am wondering if Adobe provides a PHP library for dynamically generating a non-editable PDF for my company website.  Any information on this would be greatly appreciated!

    By non-editable I assume you simply mean "with password security set" and understand the serious limitations of this.
    While Adobe doesn't offer PHP it offers several server options
    - LiveCycle PDF Generator. Java API and watched folder. Convert file types to PDF. Security can be set, but perhaps only globally.
    - Adobe PDF LIbrary. For experienced C/C++ programmers. Licensed by DataLogics.

  • Text getting cut,while generating the pdf dynamically.

    Hi All,
    I have a Text Box ,which has a text of ard 19 lines of Font:Arial Narrow and Size:9 in pdf.(Height:131.02pt and width:755.266pt of the text box)
    Also I have same in the xdp.
    When i dynamically generate pdf using Adobe Document Services(ADS),the text gets cut and the Font also changes.
    Kindly help me out.
    Thanks and Regards,
    Vishal Doshi.

    It looks like unexpected font fallback happened. Do you have "Arial Narrow" on the machine running ADS or do you specify forcing font substitution?
    Henry

  • Export to html,pdf,word/rtf

    Does Flex 2 support exporting to say, html,pdf,word/rtf?
    If yes, how to do it?

    quote:
    Adobe LiveCycle Data Services
    Wait? The final release has been out for a while and has a
    cool sample demonstrating the PDF feature.
    You can get it here:
    http://www.adobe.com/products/livecycle/dataservices/
    Download Free Trial link will actually let you download the
    free non-expiring express edition.

  • Using javascript to dynamically generate the html for a  Spry table

    I have some javascript which generates html code for a Spry
    table which displays the content of a Spry data set. The problem is
    that after I generate the html, Spry never fills in the values for
    the table.
    Here's what I'm doing:
    Using a data set observer, check for onPostLoad and generate
    the html code
    Using innerHTML, stuff the code into the appropriate
    <div>
    Use regionName.updateContent() to update the region I just
    created with the html code I generated
    Interestingly, if I take the generated source for my page and
    remove the data set observer, the Spry table displays correctly
    with all the expected values. This suggests to me that my generated
    html code is correct, but that there is some sort of timing issue
    (i.e. Spry doesn't know about the new code I generated).
    Any suggestions?

    jalperin wrote:
    > Here's what I'm doing:
    >
    Using a data set observer, check for
    onPostLoad and generate the html
    > code
    >
    Using innerHTML, stuff the code into
    the appropriate <div>
    >
    Use regionName.updateContent() to
    update the region I just created
    > with the html code I generated
    >
    > Interestingly, if I take the generated source for my
    page and remove the data
    > set observer, the Spry table displays correctly with all
    the expected values.
    > This suggests to me that my generated html code is
    correct, but that there is
    > some sort of timing issue (i.e. Spry doesn't know about
    the new code I
    > generated).
    >
    > Any suggestions?
    I'd guess that it is a timing issue as well. I haven't looked
    much at the dataset capability in Spry, but it may be that the
    dataset "finds" all of the regions and code that it applies to
    before the onPostLoad event is triggered. If that is the case, then
    your generated code doesn't exist yet,and so the dataset thinks
    that there is nothing for it to apply to.
    Will the HTML that you generate change based upon the dataset
    that is actually returned? I guess I'm looking for the reason why
    the HTML is being generated when it could be in the page itself and
    avoid this issue completely.
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

Maybe you are looking for

  • DVI video switch for MB Pro

    I would like to watch movies and Netflix that a stream on my computer to my regular TV instead of my monitor. I was wondering if a product existed that allowed me to come out of the Computer (DVI) into a splitter or switch of some sort and then out t

  • Read image data from SQL Server database and display it in a JSP web page

    Hi experts, I am doing a project in which I have to upload images to the database via JSP/servlets. I am able to do this. Now I want users to view and dowload these images which are stored in the database. Please help me of how can I read the images

  • How do I find program files on my pro?

    I need to access the program file for my steam account because it is not finding the servers.  Steam suggest that I set my own launch options, but I cannot find where the program file is for steam.

  • Is there an outage in 43449?

    Going from 1x to 1x Extended to No Service. What is going on?

  • DNG VS ACR updated

    my nikon D300s NEF file won't open in ACR, will i ned to to donwload both DNG and ACR 5.6 to open the files, or will just updating the ACR work?