Print JSP/HTML Pages (perhaps PDF?)

Hi,
i have a table in HTML generated by JSP.
Just like the following simple example:
...<table>
<%
for( Enumeration et = free.getSqlIDs().elements(); et.hasMoreElements();)
String keyt = (String)et.nextElement();
Bean b = new Bean();
b.init(path,DB);
b.setID(keyt);
b.restore();
%>
<tr>
<td>
<%out.print(b.getName());%>
</td>
<td>
<%out.print(b.getAdress());%>
</td>
</tr>
%>
</table>...
No i want to give a button to the user. When pressed, the HTML-Page should transform to PDF.
With such a method i want to print the HTML-Page.
I Know that this is possible with the help of XML/XSP and a stylesheet. But i like to do that with this way:JavaBeans-->JSP-->HTML-->PDF
Anyone a solution, some code examples for me?
Or perhaps another solution to print HTML-Pages in a fine design?
Thank you for your help
Andy

Hi,
no one any idea?
How do you print Jsp Pages?
Thank you
Bye
Andy

Similar Messages

  • How to avoid header and footer parts while printing a html page to pdf ?

    Am trying to convert a page from a web site and trying to printing it. i see the file  root folder , destination  and location of the page (file:// D|/file_name/filename001/][time stamp]) at the bottom of the pdf is there any option to disable this ?

    File :: Create :: PDF from Web Page
    In the dialog that presents - click the "Settings" button.
    In the dialog that presents - untick "Place headers and footers on new page"
    Be well...

  • Script to print an html page in both sides (duplex printing)

    Hi,
    I have a website that can print page automatically without showing the print dialog box. Now, user's have requirement to print the page in both sides.
    Is there any vbscript/javascript that will auto print the html page in both sides (duplex)
    Thank You!

    Hello,
    This should be asked in Microsoft's ASP.Net forums:
    http://forums.asp.net/
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?&lt;=\G.{2})'|%{if($_){[char][int]&quot;0x$_&quot;}})

  • JEditorPane printing a HTML PAGE

    Hi,
    Here is my problem. I am displaying a HTML Page in a JEditorPane. So far so good.
    when I try to print is printing to my printer. Here is the problem the Text or to say the font doesnot look good in the paper, each letter is not nice and smoth and it looks like some of the pixels in each letter were lost. This happens right when I initialize the JEditorPane with html code. I can also see the pixels in each letter are lost when I initilized it in a JEditorPane.
    Any help will be appreciate.

    How are you printing? Are you using the Printing API?
    You can try antialiasing the text before printing:
    http://www.exampledepot.com/egs/java.awt/AntiAlias.html

  • Printing a HTML page in a JTextPane

    Hi all..
    I nned to develop a report generating system for one of the softwares that I am writing and I am planing to generat the report as a HTML page (both text and images) and users can preview them on a JTextPane and can save to disk as html files for further use.
    I also want to add functionality to the application to print the report through java.
    what I want to do is to print what is displayed in JTextPane (Content Type: text/html)
    I am familiour with Printable interface what I cant figure out is how to make the JTextPane printable and how to send the data in JTextPane to printers Graphic object
    Can somebody give a sample code for this.
    Also if you know any other way of printing a HTML formated text without use of any other componant like JTextPane please tel me how to do it.

    We had done the same using the JEditor Pane and later print the JEditorPane using the print API..
    Here is the code to include the html file.
    mainPane = new JEditorPane("file:///C:/project/JavaPrintingAPI/AddGlobalProduct.html");
    mainPane.setEditable(false);If it work... hungry for yummy dukes... :-)

  • When exporting UTF-8 encoded HTML page to PDF, Foreign characters won't display correctly.

    I'm not sure if this is a PDF issue or a PHP issue, I have tried asking this in several forums with no working result, and I hope this is the right place to post this question... if not please let me know of another forum.
    here's my PHP code.
    $test_label = 'の契約';
    $result = html_entity_decode($test_label, ENT_QUOTES, 'UTF-8')
    PDF_show_xy($pdf, $result.": ".$order_date , SECTION_START_X+TEXT_LEFT_PADDING, 750+((SECTION_TITLE_BOX_HEIGHT-5)/2));
    the UTF-8 encryption is correct, because the web browser displays all the characters correctly.
    Problem:
    Problem occurs when I try to export the HTML into PDF.
    All I'm getting in my pdf export is a bunch of gibberish. Is there a PDF add-on/plug-in that I'm suppose to install? or is my encoding function called incorrectly wrong.

    oh, sorry if I was unclear.
    I use PHP's PDF functions to create PDF files that looks like my html page.
    here are the functions
    http://us2.php.net/manual/en/ref.pdf.php
    anyway my question is, if there is a setting or a addon/plug-in/third party program that I have to download for Adobe Reader to display foreign language?
    and if anyone knows PHP, am I using the correct decoding function?
    If I'm on the wrong forum, can anyone direct me to the correct one?
    I can't seem to find any resources on exporting HTML pages with foreign characters to PDF using php.

  • Officejet 6500 prints 1 blank page from pdf files and nothing else

    We just installed this printer.  It prints from websites, word, quickbooks just fine.  It also successfully copies and faxes.  When we try to print from a adobe pdf attachment it prints one blank page and that is all.  This also happens when we try to print from googledocs.
    Thanks!
    Message Edited by laura1982 on 06-05-2009 11:19 AM
    Message Edited by laura1982 on 06-05-2009 11:20 AM

    I have the same problem with an HP Officejet Pro L7680. Moreover, it now only prints double-sided!

  • Is it allowed to convert html pages to pdf:s on a webserver?

    Hi,
    I read a web discussion some where on the web there  somebody claimed it was not allowed to generate pdf files of html pages on a webserver. Is this correct?
    If it is allowed my followup question is how you do it with C# and any of the Acrobat libs?
    Best regards

    Thank you for the quick response.
    Too bad I can't use Acrobat on a webserver. Among other things I had my hopes on using the full Adobe suits I bought earlier for this.
    How do I proceed in that case?
    Many sites that I shop at send me their invoice/receipt as a pdf and I think it is a greate feature/service they have there. Do you happen to know how they do (software that's used and so on) then they generate their pdf:s?
    Best regards

  • How to print any web page to PDF in Windows 7 after Firefox version 8?

    Some web pages do not print to PDF after Firefox Version 8. The result is either incomplete PDF or the print progress stops at some point and Firefox is stuck. For example the following web page http://en.wikipedia.org/wiki/Abraham_Lincoln prints to PDF with Firefox Version 8, but it does not print with any version of Firefox newer than 8. Note that the latest version of Acrobat Professional produced the same results as well as other PDF generating tools such as "FreePDF XP" and "Bullzip". Also the same web page on this same machine does print from within Internet Explorer. However using Internet Explorer is not a solution for our needs.
    Thank you for looking into this.
    Plamen Djambazov
    ''edited to remove email address''

    Graphics driver support seems to be a difficult area to get right...
    I'd just be guessing as to any specific differences between Fx8 and Fx17 that affect the Adobe Acrobat plugin.

  • JSP / HTML page does not load correctly in IE

    I have a particular jsp page, which has heavy volume of data and it does not load completely in IE, but loads perfectly in Firefox and Safari.
    It is a really perpleximg problem that occurs only when the volume of data is large. None of the people in my team were able to solve this issue.
    Please send in your suggestions as to why this is happening or if there are any known bugs in IE.
    In case you need an HTML version of the code, please do mail me at [email protected]

    Jaison_Sabu wrote:
    I have a particular jsp page, which has heavy volume of data and it does not load completely in IE, but loads perfectly in Firefox and Safari.
    It is a really perpleximg problem that occurs only when the volume of data is large. Why would you be sending large amounts of data to a JSP? Sounds fishy to me.
    None of the people in my team were able to solve this issue.Well if you provided your team with the same amount (none) of information you provided here, then I would understand.
    Please send in your suggestions as to why this is happening or if there are any known bugs in IE.Personally, I think it's the flux capacitor.
    In case you need an HTML version of the code, please do mail me at [email protected]
    Hope you're ready for some spam.

  • Printing an html msg to pdf crashes the driver but I can save to pdf from Abat

    I have a user on a windows 7 64bit with Acrobat 9. He's got a message that we've saved to an xps. It opens fine in outlook and in xps viewer. When I try to print it in either one it crashes the acrobat printer driver. But I can open the xps in Acrobat and save to pdf just fine. Huh?

    Some useful reference material.
    At http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
    Acrobat 10.1 adds PDFMaker support for these Office 2010 64-bit applications: Word, PowerPoint, Excel, and Outlook.
    Acrobat 9 and earlier users can create Adobe PDF files using the Adobe PDF printer.
    For more information, see PDFMaker unavailable in 64-bit Office 2010.
    (http://helpx.adobe.com/acrobat/kb/pdfmaker-unavailable-64-bit-office.html)
    n.b., Acrobat 9 just went to 9.5.2
    Be well...

  • Firefox crashes when I try to print a html page to my laser printer

    I used to be able to print html and pdf files to my laser printer when in Firefox, but now I get an alert that Firefox will crash. I check the box to send info to Firefox, but when I entered "about crashes" as suggested below, I got nothing but a 404 number showing and some text about not having information about crashes "on this server." Does anyone know of a fix for this?

    Post your question on the Firefox forums, as Apple discussion only provide support for Apple products:
    http://forums.mozillazine.org/index.php?c=4

  • How to specify the servlet in the ACTION field in FORM in jsp, html pages?

    I have problem when I return back to the page prova3.html from the servlet because in the address bar it give me this path:
    http://192.168.161.209:8988/Workspace3-Project1-context-root/servlet/servlet/Servlet1
    two times servlet/ why? and what I have to put in the action field?
    This is my form in page prova3.html:
    <form action="servlet/Servlet1" method="post" id="search" style="font: bold 80% Arial,sans-serif; color: #334d55;" >
    <input type="hidden" name="pagina" value="1"/>
         user<input name="username" type="text" size="10" style="font-size: 12px;"/> 
    password<input name="password" type="password" size="10" style="font-size: 12px;"/>
         <input name="login" type="submit" value="Login" style="font-size: 12px; font-family: Arial,sans-serif;"/>
    </form>
    The redirection form servlet to pages is:
    private void toProvaPage(HttpServletRequest request, HttpServletResponse response) throws
    ServletException, IOException {
    RequestDispatcher rd = getServletContext().getRequestDispatcher(
    "/prova.jsp");
    rd.forward(request, response);
    private void toIndexPage(HttpServletRequest request, HttpServletResponse response) throws
    ServletException, IOException {
    RequestDispatcher rd = getServletContext().getRequestDispatcher(
    "/prova3.html");
    rd.forward(request, response);
    Thanks, but I can solve this problem.

    This is my web.xml file where the mapping is specified, this is the thing that I can't understand.
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <display-name>public_html</display-name>
    <servlet>
    <servlet-name>Servlet1</servlet-name>
    <servlet-class>servlet.Servlet1</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Servlet1</servlet-name>
    <url-pattern>/servlet1</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    </web-app>
    Thanks

  • Printing of HTML pages on OTN

    There are lots of great article's on OTN. For example, http://otn.oracle.com/oramag/webcolumns/2003/techarticles/marinescu.html
    Unfortunately, it is not easy to print these articles in a clean fashion. Would you add a "Printable View" option to pages like this so I can print the article without all the garbage and sidebar information?

    Jon...this is a new feature that we are investigating. Please stay tuned....

  • Print a form page to PDF

    Hi all,
    I need to create a PDF from a form, creating a Report Layout and Report Query. Use Apache Cocoon as a print server. With Microsoft Word and a complement of BI Publisher document loading design that gives me APEX data in XML and XSL, then export XSL-FO, but in the Test Report tells me that the PDF is corrupt.
    Thanks =)
    EDIT: Sorry for duplicate message, internet problems
    Edited by: 862571 on 31-may-2011 2:40

    See 1st post I responded to...
    Thank you,
    Tony Miller
    Webster, TX
    On the road of life...There are 'windshields', and there are 'bugs'
    (splat!)
    "Squeegees Wanted"
    If this question is answered, please mark the thread as closed and assign points where earned..

Maybe you are looking for

  • How can I modify the UI for the crystalreportviewer prompt screen ?

    <p>Hi,</p><p> I am using Crystal Report XI with JRC.</p><p>I have come across a couple of issues. My report accepts 2 parameters from the user. One is a date field and the other is the 'Period'. I have provided a drop-down having values as Daily, Wee

  • Problem in Search Help[F4] - Values Not being Dsplayed

    Hi, Search help values are not being displayed. F4 help pop up is being displayed with the text on top: ' xxxx number of entries found". But no values are visible in that popup where it normaly displayes all values for selection. This is happening wi

  • Attaching Variable to the Library for Report Painter for Cost center report

    Hi, I want to attach the Variable - "Cost element group" to the Library for Report Painter for getting Cost center report. The Cost center report should be cost element group wise with actaul, budget and variance. Please let me know the process.

  • Application Stack trace visible to user

    Hello All, Is there any way in which i can disable the visibility of application stack trace to users. Here i am not talking about the Webdynpro Java application. I can be any portal application or an KM iview. The reason i have to do this is, at tim

  • Discoverer and Windows 2000 server

    I would like to know if Discoverer 3.1 Aministration Edition will work on the windows 2000 server? Any hint is highly appreciated! Thanks! Jane