Can JSF page content convert to PDF?

I want to develop a jsf page that when user click a button can display a pdf file that contain the jsf page content. I know using iText can generate pdf but what i read the example in the iText homepage all is like adding the line by line using document.add() or paragragh , anyway can do it ?

I adding this code in a servlet
Document document = new Document();
     document.setPageSize(PageSize.A4.rotate());
     OutputStream out1 = response.getOutputStream();
     response.addHeader("Content-Type", "application/pdf");
     response.addHeader("Content-Disposition", "attachment; filename=\"Test.pdf\"");
          try {
               URL yahoo = new URL("http://localhost:8080/Test/HelloWorld.faces");
               URLConnection yc = yahoo.openConnection();
               BufferedReader in = new BufferedReader(
               new InputStreamReader(
               yc.getInputStream()));
          PdfWriter.getInstance(document, out1);
          HtmlParser.parse(document, yc.getInputStream());
          catch (Exception e) {
          System.out.println("error="+e);
          e.printStackTrace();
But i save the file, the file canot open the error message is either not a supported file or file damaged

Similar Messages

  • WHO CAN/WILL HELP ME CONVERT FROM PDF TO WORD ?

    WHO CAN/WILL HELP ME CONVERT FROM PDF TO WORD ?

    Someone might. Are you having a problem? What have you purchased from Adobe, exactly, and where do you get stuck?

  • Can I port content from one pdf form to another, from within the form fields?

    WE have been given a seasonal update to our pdf forms - with one new additional form field. Is there a way that I can port all the content from my ready filled form into this new one, without having to copy and paste each individual field?
    Thanks.

    What is it that you want to do
    - you are the form filler; you want to keep the contents of a filled in form (and put them back into a changed form)?
    - you are the person responsible for adding/changing form fields; you want to keep the design and location of the form fields while changing the underlying PDF?
    - both of these?

  • Acrobat 9 :only page 1 of a web page is converted to pdf, remaining pages come out as blanks

    I have not seen this question anywhere but thats right. If a web page is 5 pages long, and we print it on the Acrobat 9 printer we get the first page correctly after which the remaining 4 pages are blank white sheets. I got the same result when I first used non adobe pdf printers. When I connect to a "normal" printer eg, one that takes a power supply and cartridges, I can print all 5 pages correctly.My boyfriend has the same experience on his XP  while I am on Vista. Primopdf stopped working altogther so I switched  to Acrobat9 trial version which prints but only page1 comes out. How to correct the problem--nobody has been to tel me this far. Will be very grateful to anyone who gives me a suggestion / advice/information about this phenomenon;
    M Hersom

    You can do such ordering with JavaScript. There is a recent post with a JavaScript for dealing with another aspect of page order that might provide what you want. You will have to search the forum for the post that was about 2 or 3 weeks ago as I recall.

  • Can we handle content convertion for TabDelimiter flat file in JMS

    Hi,
    Is it possible to handle content conversion for TabDelimiter flat file in JMS (Not in FILE adapter).
    If possible .. can you please explain.
    Regards,
    Siva.

    Hi, Siva:
    Yes, this is possible.
    The way that JMS adapter to handle content cnversion is similar to the way file adapter does.
    Different from file adapter, you do not have to specify "Content Conversion" as transport protocol, you need to use transformation bean (localejbs/AF_Modules/MessageTransformBean) in Module tab.
    Check page 23 of the following link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a05b2347-01e7-2910-ceac-c45577e574e0
    Liang

  • Can a page-turning SWF to PDF have navigation?

    I'm working on creating a flip-book PDF which needs a Replay button or some other way to get back to the first page OTHER than laboriously clicking back through every single page. In CS4 InDesign, files with Page Turn transistion must be exported as a SWF file, but the button I've put on the last page with a Go to First Page action won't work. Evidently that's because the SWF file after being turned into a PDF via Create PDF command becomes "one page" at least as far as Acrobat is concerned. Flash won't edit SWF files, so that's not an option.
    Any theories on how to have a simple Start Over function would be appreciated. TIA!

    eDocker might do the trick for you, here´s a sample:
    http://www.edocker.com/_demo/edocker-online-demo/
    If that´s what you are looking for, go to http://www.edocker.com to get more information.
    You can also watch a 5min video about basic usage at:
    http://www.edocker.com/support/

  • Displaying a jsp page content as a pdf...

    HI,
    I am writing a simple jsp page.When I request that jsp page I want to display it in a pdf format in the browser. I have given the content type as "application/pdf", but still its showing as a normal web page. But when I am making the content type as "application/vnd.ms-excel", its working and opening in the excel sheet. Plz help me..how to display the jsp page in pdf format.
    the tag i am using is..
    <%@ page language="java" contentType="application/pdf" %>

    u want to show a pdf file in a jsp??
    so u have to write a servlet that that writes this file to the response

  • How do I convert a iWork 08 pages doc to a pdf or Word doc ?

    I have an iWork 08 pages document that I wish to e-mail to a general dist. list. So I want to convert the doc to a pdf or Word file so the list can read it.
    Must I purchase iWork 09 to do this  by either;
      1)   opening the 08 doc in iWork 09 pages, then converting to pdf ?
       2) or,  opening the 08 doc in iWork 09 pages, then open the 09 converted pages doc in Office for Mac 2010, Word to produce a Word doc?
    Thanks for any help.

    Peter, Jerry:
      Thanks for your elegant solutions.
    I am going to buy iWork 09 for all our offices, and use iWork 09 because we can upload iWork 09 stuff from our iPads to iCloud and then downLoad the doc's to   different offices to complete the doc's and format them. 
    The existence of iCloud is going to cause us to abandon all our old Office software and standrize with iWork.
    Only wish we could upload iWork 09 docs to iCloud from iMacs, but maybe that will be possible in the future.
    Any way, bye, bye Word & Excel ...
    Paul

  • Convert Pages into good quality PDF.

    Hi,
    I just made a poster in Pages. I converted the file to PDF by using the option: Share > Send by Mail > PDF.
    Had never done it before, and don't know much about it, but it turned out great. I sent it to a publisher for printing. But he couldn't use the PDF file because it did not have a good enough quality. The file size is about 500 kB when the Pages size is 3,7 MB.
    Is there a better way to get the pages file converted to PDF at the best quality?
    Please help
    Much appreciated.
    -Lillian-

    I sent it to a publisher for printing. But he couldn't use the PDF file because it did not have a good enough quality. The file size is about 500 kB when the Pages size is 3,7 MB
    Presumably the problem is that the poster includes one or more photographic images. A photographic image is a pattern of picture elements, technically termed pixels.
    The pattern of picture elements has a particular density, defined at a point in the process before the photographic image is imported into the pagination software, in this case Apple Pages.
    The density of a pattern of picture elements is measured by the number of picture elements across and the number of picture elements down in a square inch. The density is referred to as the resolution or DPI Dots Per Inch.
    A display is not able to draw higher densities and usually resolution of around 100 DPI; higher resolutions are downsampled automatically. Thus there is no benefit to adding resolution if the drawing target is displays only.
    A large format inkjet is able to draw at resolutions of around 1000 dots per inch and a prepress imagesetter is able to draw at still higher resolutions. If there is insufficient resolution, image detail is insufficient.
    Because of sophisticated algorithms for creating pixel clusters of sufficient size to print on a press, and separated into the four process colourants, it is a bit dicey to define the universally right resolution.
    Stochastic screening does not need as high resolution for visually satisfactory detail as some aproaches to screening, but in any case what the printer probably meant was that the image resolution should be increased.
    Try importing an image resolution of 300DPI for colour images. This should work well in most cases.
    /hh

  • How do I convert a pdf to a fillable word document

    I am having difficulty converting a pdf to fillable word document.  The fonts change from line to line and it isn't lining up.

    Adobe Reader cannot export PDF page content so you must be using one of Adobe's online subscription services.
    Perhaps ExportPDF or PDF Pack.
    The export is of the page content. However, PDF (the file format / technology) has no "style", "formats", etc. -- PDF is not a word processing file format.
    So, the software does the best it can with what it is provided.
    Thing is "export" is impact very much by what created the PDF and how the PDF was made (the "under the hood" stuff).
    GIGO is operative and the output pretty much identifies the caliber of the input (what is "under the hood").
    Good to know is that for optimal export one wants a well-formed Tagged PDF (an ISO 14289-1, PDF/UA-1 compliant PDF).
    Two key design considerations of "Tagged" PDF are "accessible" PDF and export of PDF page content.
    What to do?
    Once you have the output Word file you will have to perform requisite cleanup. Then rebuild form field using Word's tools.
    Be well...

  • URGENT: How to read the content of a PDF-file in Java?

    Hello
    What I need are some classes which can read a pdf and translate it in normal Text, so that I can write the content of the pdf in my database.
    Where can I find those classes? Or how else could I get there?

    www.lowagie.com/itext
    www.etymon.com/pj
    www.retep.org.uk/pdf
    www.pdflib.comwww.pdfzone.com
    www.planetpdf.com
    www.purepdf.com
    www.adobe.com
    www.pdfstore.com
    www.adobe.com/proindex/acrobat/formsresources.html
    www.partners.adobe.com/asn/developer/acrosdk/forms.html
    www.rrsys.com
    www.javafoundry.com/javapdf
    www.novagraphix.com/internet_publishing_with_acrobat/forms/forms_tutorial.html
    www.binarything.com

  • How do I convert a pdf form into an app?

    I am NOT a programmer but it seems to me that it shouldn't be that difficult to convert a pdf form into an app? There must be some kind of tool within adobe that I can use to do so? I am a member of Creative cloud.
    Jamie

    Hi Jamie1moon,
    You are trying to convert the form into which format?
    Adobe Acrobat can be used to convert a pdf into formats such as .doc,.docx,.ppt,.xls,.jpeg etc. but it will remove the existing formats and validations if any applied on the form fields.
    Please check: http://www.adobe.com/products/acrobat/pdf-to-word-doc-converter.html
    Regards,
    Rave

  • Working with Non JSF and JSF Pages

    Hi ALL,
    I wanted to know wheter it is possible or not
    Here is scenario
    I have 2 pages. First one is JSF Page and second one is JSP Page
    I wanted to submit the JSF Page contents to JSP Page. Is it possible??
    Below is by Navigation Rule for it where postJob is JSF and postJobDetails is JSP Page
    <navigation-rule>
            <from-view-id>/consumer/postJob.jsp</from-view-id>
            <navigation-case>
                <from-outcome>postJobDetails</from-outcome>
                <to-view-id>/consumer/postjobDetails.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>And in my button action I am doing like this
    public String btnContinue_action()
            return "postJobDetails";
        }And I am not able to submit JSF contents to JSP Page.
    Thanks
    Sudhakar

    You should be able to do this with a HyperLink component.

  • How to import page content similar to importing products?

    Hi,
    I have built a sample page for my site. There are another 30 website pages using the same structure but with different content I need to build. Instead of copying and pasting the same page and replace with different data, is there a way that I can import page content, something like importing products? It would be much quicker to finish the work. Cheers.
    Alex

    Hi Alex, you should be using templates and content holders rather then having everything just in pages.
    http://kb.worldsecuresystems.com/kb/create-site-design.html
    http://kb.worldsecuresystems.com/kb/create-insert-reusable-content.html

  • How to Compare pdf contents of two pdfs?

    Hi,
    Can anyone guide me how can i do content comparision of pdf at run time. I am able to compare documets using acrobat and get the results. But I have a scenario where i need to compare two documents at runtime.
    Can assembler compare two documents and Highlight the contents? or
    Is there any JavaScript API which can perform pdf content comparision?
    Please help me on this?
    Regards
    Sunil

    Currently I am having xfa pdfs and i will be able to transform to any version (static,pdf etc) to get the comparision result.

Maybe you are looking for

  • Error when exporting to flat file in ODI 11g

    This works ok in ODI 10g. I'm using IKM SQL to File Append on Windows Server 2008 R2 Getting the following error when exporting to a flat file in ODI 11g: ODI-40406: Bytes are too big for array I've seen a couple of threads like this on the forum, bu

  • How do you configure ORDS in a Weblogic Cluster? Getting "This installation has not yet been configured" on second server...

    We currently have ORDS 2.0.9 installed on WLS 10.3.6 running on Windows 2008R2 behind an F5 load balancer. When the load balancer sends the connections to the server we configured first, everything works fine. When the load balancer sends the connect

  • Problem w/2 pages in a 44pg. catalog outputting to a PDF

    Using Mac OS 10.6.8, ID 7.0.4 been a MAC user since 1988. Been working on a 44 page catalog for about the last month and during that time producing PDF's for the client to proof. Everything has been going fine...until today.Now when I output a PDF, p

  • Open in safari PLEASE

    Hi, My computer use to open everything in safari but I did something to my computer and now it opens everything in firefox. I want it to open everything in safari (I think). How do I change it back?

  • How to cache a site ?

    In my application server i have have an application built on portal and another built on JSP. Web Cache Caching rules are the default rules JSP application is in http://host:7778/ConsultaSinistros/ I add the following rule: ^/ConsultaSinistro/.*\.gif