Ouput content as pdf

Can anyone point me in the right direction please,
I have a buffer containing a pdf file, I need to output this to a browser. I have set content type to application/pdf and adobe is launced by the browser, but I always get damaged file.
Can anyone give me a bit of code to do this?
Thanks in advance.

I think you should firt save the buffer to a file and then send that file as the reply, of course setting the content type as you did.
Example: say /var/www/ is the root directory of www.yoursite.com
1. save the pdf file to /var/www/mypdf.pdf
2. (in jsp) response.setContentType("application/pdf")
3. response.sendRedirect(response.encodeRedirectURL
("http://www.yoursite.com/mypdf.pdf");
This works for me, hope it helps you too.

Similar Messages

  • Transfer ITAB contents to PDF format

    Hi,
    I want to transfer ITAB contents to PDF.format. For this iam following above steps:
    (Note: my output in Z-report1 is in classical format and year wise but in output it contain all 12 moths data so i want to generate new PDF file for each month separately if i run this report in background then it will generate only one spool request for all 12 months)
    1) Z- report through which iam transferring ITAB comtents to memory ID.
    2) then through SUBMIT iam calling new Z-report1.
    3) then iam importing ITAB content to Z-report1.
    4) Now to get the Spool no i want to execute Z-report1 in background (automatically it should run in background because iam calling Z-report1 in Z-report).
    SO is there any function module so that i can pass report name (Z-report1) and it will run in background
    Please help.
    Thanks .
    Regards.
    Hemant.

    You can submit a program via job. Check the F1 help on submit button.
    I'm doing something similar :
    Here is the code snippet for submitting the program and getting the spool request.
      SUBMIT (gwa_rkb1d-rname) TO SAP-SPOOL COVER TEXT t_stamp
      WITHOUT SPOOL DYNPRO IMMEDIATELY flag KEEP IN SPOOL flag_kisp
      WITH    SELECTION-TABLE seltab   USING SELECTION-SET p_vari
      AND RETURN.
      SELECT SINGLE *
        INTO t_tsp01
        FROM tsp01
        WHERE rqfinal   IN ('.','X')
        AND   rqclient  = sy-mandt
        AND   rqowner   = sy-uname
        AND   rqtitle   = t_stamp.
      IF sy-subrc = 0.
        CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
          EXPORTING
            rqident              = t_tsp01-rqident
          TABLES
            buffer               = buffer
          EXCEPTIONS
            no_such_job          = 1
            not_abap_list        = 2
            job_contains_no_data = 3
            selection_empty      = 4
            no_permission        = 5
            can_not_access       = 6
            read_error           = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    Also Job_open, job_submit and Job_close functions can be used.
    regards,
    Advait

  • Getting the page content as pdf file

    Hi All,
    I have a use case like i need to get the page content as pdf file.
    For this i found xsl file and it's config under the following locations
    /libs/cq/config/rewriter/pdf/transformer-xslt --config of source
    /libs/wcm/core/content/pdf/page2fo.xsl -- xsl file location
    For custamising this functionality i copied both confing node and xsl file under "/apps" .In the Config file i changed source to refer xsl file under /apps.But it's not taking config changes.
    I have looked into http://cqblueprints.com/xwiki/bin/view/CQ+FAQ/How+can+I+configure+the+ PDF+rewriter
    there it's saying like we need to modify the com.day.cq.rewriter.xml.XSLTTransformer class. i am not getting how to modify it.
    I need this urgently
    Thanks,
    Chinna Yadlapalli.

    This script:
    http://indesignsecrets.com/zanelli-releases-multipageimporter-for-importing-both -pdf-and-indd-files.php
    answers all your questions.
    Peter

  • Table of contents in PDF files

    IBooks gives two options for displaying the Table of Contents for PDF files—thumbnails or a conventional table. The thumbnails view is useless to me, and I would like the conventional table view to appear by default. Unfortunately, the TOC almost always appears in thumbnails view, and I have to manually select the list view.
    Is there any way to set the list view as the default TOC view for PDF files?
    Thanks.

    Hi Michael,
    When you combine files into a single PDF, each file you include will have a bookmark in the Bookmarks panel in Acrobat/Reader. So, I suppose you could treat that as a Table of Contents. (It doesn't, however, create a separate TOC and append it to the file.) The bookmark names reflect the filename of each file you combined.
    I hope that answers your question.
    Best,
    Sara

  • Converting xml file with arabic content to pdf using FOP

    Hello all
    I am trying to convert a dynamically generated xml file in which most of the data comes from the oracle database with arabic content, to pdf using FOP. I have used "Windows-1256" encoding for the xml. If i open the xml generated with the internet explorer the arabic content displays properly but the pdf is not generated and the acrobat reader shows the file as corrupted or not supported. Please help me. Its very urgent.
    Thanks & Regards
    Gurpreet Singh

    There is no direct support for importing RTF from an XML extract. Perhaps feature 1514 "Mapping formatted XML data into multiline field" will be of some use. This was released in 11.0, I believe.
    Essentially you can establish paragraph and certain text formatting like bold and underline when you include the proper token information in the data. I believe this is similar to simple HTML tokens.
    Example: &lt;FIELD>&lt;P>First paragraph of data.&lt;/P>&lt;P>New paragraph with &lt;B>&lt;U>bold and underline text&lt;/U>&lt;/B>. Rest of paragraph normal.&lt;/P>&lt;/FIELD>
    The result is something like this:
    <P>First paragraph of data.</P><P>New paragraph with <B><U>bold and underline text</U></B>. Rest of paragraph normal.</P>

  • Opening content in PDF format on 3120 classic?

    Is it possible to open contents in PDF format on 3120 classic?
    Which app is suitable?
    nokia 3120 classic, fw V 10.00 06-03-09, RM365

    I think it is normal for books to take longer when they include multiple big size reports. I had a similar problem at a client. We ended up not including all the reports in one book and create several books instead. In another situation, we scheduled batches and the books ran automatically. This way, the users just received an email with the whole book in one pdf instead of running it on an ad-hoc basis and wait for the outcome.
    Hope this helps.
    Cheers,
    Mehmet

  • How to change contents of PDF

    Hello,
    I want to know is there any way by which i can change content of pdf.
    please tell me

    thanks..
    I have done that. using iText it is helpfull.
    Still there is a bit of problem.
    When I open the file adobe pdf is unable to open the file .
    where are foxyplayer can view it correctly with edited content so please can you
    show me possible changes to do so.

  • Attach page content as pdf in email

    Thanks for all who answer this thread.
    I am using this syntax to send email from a web page....
    <cfset subject = "Application Name">
    <a
    href="mailto:?subject=#urlEncodedFormat(e_subject)#">Email
    page</a>
    i know, how to create page content in pdf...
    How can i attach page content pdf to this mail? is that
    possible?.
    OR
    what is best way to send page content PDF as email.....
    user want to type some info in body of email.....
    thanks

    Use cfsavecontent to generate your page content.
    Use cfdocument to create the pdf file
    Use cfmail and cfmailparam to send it as an email
    attachment.

  • Copy Paste content from PDF shows a missing character

    Our website, a4academics provides a platform for sharing academic projects and seminar reports in PDF for Students. We are getting a complaint from students, that when they copy and paste the content from PDF, the word " F " is not getting copied in some reports. What might be the reason ? Is it because of the issue with the software which created the PDF report. Its happening in few PDF files only.

    Currently to download the PDF FB like is needed. That why i asked your mail id. If you dont want to give FB like, please send the mail id.
    PDF is attached at the bottom of the link  given below
    http://a4academics.com/final-year-be-project/12-be-ece-electronics-and-communication-proje ct/503-home-based-wireless-health-monitoring-system
    I had copy pasted a part of the report to notepad++. Its appears as shown below. F is missing in defining
    "de ning the "Einthoven triangle" - an equilateral triangle with the heart at the centre."

  • Reading content from PDF to XI

    Hi All,
    Can I know about, is XI capable of reading the content from PDF. As I came to know that we can achieve this with the adapter module can you please ignite me how to do for this or is there any other option other than this way or show me if already any threads or articles are existed?

    Hi,
    Please find some links on Convertion agent which not only convert the PDF documents. it is used to convert PDF, Word Document, HL7 and more...
    pdf files *
    SAP Network Blog: XI: Read data from PDF file in Sender Adapter
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    SAP Network Blog: XI: Generate PDF file out of file adapter
    /people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/43/6d95e0ac846fcbe10000000a1553f6/CMGetStart.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm
    Regards,
    Phani

  • Read contents inside pdf file programmatically in SharePoint

    I have a SharePoint document library, My Requirement is when user add PDF file on the document library the event receiver fire and read contents inside
    pdf file programmatically. After the start workflow according to the result of event receiver.

    If your question is about handling events in apps for SharePoint, see these links:
    http://msdn.microsoft.com/en-us/library/office/jj220048%28v=office.15%29.aspx
    http://msdn.microsoft.com/en-us/library/office/jj220051%28v=office.15%29.aspx
    If what you need is a way to extract text from the PDF inside the event handler, see this example that uses leadtools.
    http://support.leadtools.com/CS/forums/ShowPost.aspx?PostID=43894
    You should use PDF text extractor in your Event Handler code -
    You can use iTextSharp for reading content
    http://www.codeproject.com/Tips/387327/Convert-PDF-file-content-into-string-using-Csharp

  • Method to pass the content of pdf through offline(without internet connection)

    Hi All,
    Is there any method available to pass the content of the pdf field from client machine having no internet connection?
    Barcode is the one way to pass the content of pdf field but my data is large and barcode capacity is not more than 1800 characters.
    Please suggest me the way i can send the data to server environment.
    I would like to know the if any data compression technique is available with which i can reduce the data size.
    Thanks in advance
    Regards
    Abhishek

    Hi Steve,
    Thanks for your quick reply.
    offline means no internet connection
    I have following 2 problems while form designing
    1. I want to update the databarcode by the clicking on the button but everytime i need to write a code in calculate event of the script of paper barcode as "this.rawValue = "Abhishek"".i dont want to have any script for any events in barcode. i want to update the barcode through click event of button as form.page.paperformBarcode.rawValue="Abhishek". Barcode is not getting updated when i am clicking on the button. I have attached sample PDF for better understanding.
    2. I want to store xml file in the barcode and retrive the same in server environment. I dont know how to do it?
    I am not getting an option to attach the files to post. will you please help?
    Please forward me a test mail to provide you the sample pdf.
    Regards
    Abhishek
    Email-id --- [email protected]

  • Flash content in PDFs

    Where can I get some up-to-date and comprehensive info on using Flash-created or formatted content inside pdfs, using the current versions of Acrobat, Reader and Flash? I'm on a Mac, but obviously I want to create pdfs that are usable on all platforms.
    Thanks!
    dc

    Hi, Jon
    Thanks for responding.
    I create rich-media pdfs for CD delivery and I want to add Flash animations to the pdf pages. Last time I tried to get info on doing this (CS2 era), it seemed that only the Windows versions of Acrobat/Reader could manage it (creating and viewing). I've been googling around to see if this has changed with CS3 and can't find any info about it, or about doing it. If it can be done/read on a Mac now, are Flash files simply treated as movies and placed with the Movie tool? I'm interested in creating animated navigation elements as well as animated illustrations with multiple states that don't simply run or loop, like QUICKTIME movies, and aren't constrained to movie dimensions.
    Looking for books that cover this, online tutorials, anything, really.
    Thanks!
    dc

  • Flash eight viewer and flash content in PDF

    Has the issue been resolved with flash 8 viewer and flash content in acrobat. I have a document that is due on March 13 and I need to know that if I submit with flash content in pdf that if they have flash 8 viewer installed they will not get caught in buffering mode when they access the files?

    Jeff,
    This may be a better question for the Acrobat User-to-User forum. This is the Acrobat 3D User-to-User forum.

  • Does Acrobat Pro read the content in pdf file and transforms it?

    Does Acrobat Pro read the content in pdf file and transforms it to xls file without the need for much changes or manual work?

    Acrobat X (Standard and Pro) will save tabular data to XLS or XLSX format, provided it can recognize the table as being a table. If the PDF has missing or incorrect structure tags, Acrobat will try to guess the table layout by the position of text and lines on the page - this works well for basic formatting but if the table has complex styling, spanned cells etc. it can lead to problems.
    Acrobat X will even attempt to export a table within a scanned document, by applying OCR during the export stage - though again this relies on the table being visually identified.
    See http://www.adobe.com/products/acrobatpro/pdf-to-word-excel-converter.html and this article on how to extract one table from a larger document.

Maybe you are looking for