Name of exported PDF file

<p>Hello,</p><p>I hope I&#39;m in the correct section and that someone will be able to help me.</p><p>I run a web application (within Weblogic 8.1 sp5) which allows the direct generation of reports in PDF.<br />Each report has a unique name and I want the PDF to open in my Web browser.<br />The problem I get is that the name of this PDF is not the one that I want.</p><p>As the export is always in PDF, I&#39;m using the ReportExportControl class.<br />When I use <font face="courier new,courier">setExportAsAttachment(false)</font> along with <font face="courier new,courier">setName(idReport)</font>, the name of the PDF when I click &#39;Save&#39; is the name of my jsp, not <font face="courier new,courier">idReport</font>.<br />When I use setExportAsAttachment(true), the name is not exactly idReport.</p><p>I also tried forcing the response header to specify the attachment name, without any success either.<br />Do someone have any idea ?</p><p>Here below a sample of my code :</p><font size="2"><p><font size="1"><font face="courier new,courier">ReportExportControl exportControl = <strong><font color="#7f0055">new</font></strong></font></font><font face="courier new,courier" size="1"> ReportExportControl();<br /></font><font face="courier new,courier" size="1">exportControl.setReportSource(reportSource);<br /></font><font size="1"><font face="courier new,courier">ExportOptions exportOptions = <strong><font color="#7f0055">new</font></strong></font></font><font face="courier new,courier" size="1"> ExportOptions();<br /></font><font color="#3f7f5f"><font face="courier new,courier" size="1">//exportControl.setExportAsAttachment(false); // this will open the file in the current window<br /></font></font><font size="1"><font face="courier new,courier">exportControl.setExportAsAttachment(<strong><font color="#7f0055">true</font></strong></font></font><font size="1"><font face="courier new,courier">); <font color="#3f7f5f">// this will open a &#39;save as&#39; popup<br /></font></font></font><font color="#3f7f5f"><font face="courier new,courier" size="1">//exportControl.setOwnForm(true);<br /></font></font><font size="1"><font face="courier new,courier">exportControl.setOwnPage(<strong><font color="#7f0055">true</font></strong></font></font><font face="courier new,courier" size="1">);<br /></font><font face="courier new,courier" size="1">exportControl.setName(idPackage);<br /></font><font face="courier new,courier" size="1">exportOptions.setExportFormatType(ReportExportFormat.PDF);<br /></font><font face="courier new,courier" size="1">exportControl.setExportOptions(exportOptions);<br /></font><font color="#3f7f5f"><font face="courier new,courier" size="1">// Assign Fields collection to the viewer<br /></font></font><font face="courier new,courier" size="1">exportControl.setParameterFields(parameterFields);<br /></font><font color="#3f7f5f"><font face="courier new,courier" size="1">// Disable database logon information request<br /></font></font><font size="1"><font face="courier new,courier">exportControl.setEnableLogonPrompt(<strong><font color="#7f0055">false</font></strong></font></font><font face="courier new,courier" size="1">);<br /></font><font color="#3f7f5f"><font face="courier new,courier" size="1">// Assign the connectionInfos to the viewer<br /></font></font><font color="#3f7f5f"><font face="courier new,courier" size="1">//exportControl.setDatabaseLogonInfos(connectionInfos);<br /></font></font><font face="courier new,courier" size="1">response.reset();<br /></font><font face="courier new,courier" size="1">response.setContentType(<font color="#2a00ff">"application/pdf"</font>);<br /></font><font face="courier new,courier" size="1">response.setHeader(<font color="#2a00ff">"Content-Disposition"</font>,<font color="#2a00ff">"inline;filename="</font> + idPackage + <font color="#2a00ff">".pdf"</font>);<br /></font><font size="1"><font face="courier new,courier">exportControl.processHttpRequest(request, response, getServletConfig().getServletContext(), <strong><font color="#7f0055">null</font></strong></font></font><font size="2"><font face="courier new,courier" size="1">);<br /></font><font face="courier new,courier" size="1">exportControl.dispose();<br /></font></font></p></font><p>Thanks alot for helping ;)</p><p>Bernard</p>

<p> </p><p>The ReportExportControl specifies the header info, so it will not keep the values you set in code. Two options:</p><p>1. If you&#39;re using JRC XI Release 2 or newer, get the export using ReportClientDocument.getPrintOutputController().export(...) method.  You can then redirect the export output to the HTTP Response stream after specifying the header info as you&#39;re doing now.</p><p>2. If you need to use ReportExportControl, get the export format stream by passing processHttpRequest a &#39;fake&#39; HTTPResponse object that you create yourself.  Make the &#39;fake&#39; response return a &#39;fake&#39; ServletOutputStream that you create yourself, where you override the write(...) method to pass it to the &#39;real&#39; HTTP Response stream.  This way, you can throw out all the header info that ReportExportControl uses, and specify your own.</p><p>One thing - you have to be careful to ensure that your report pdf name represents a valid filename on every client OS that your page is being viewed.</p><p>TUeda </p>

Similar Messages

  • Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem. iPad 2, iOS 5.0.1

    Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem.
    iPad 2, iOS 5.0.1

    Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem.
    iPad 2, iOS 5.0.1

  • Exporting PDF files from SSRS 2012 - "There was an error opening this document. The file is damaged and could not be repaired"

    Good day
    I have the situation where we are exporting PDF files from reporting services in our website. 
    When dividing the data into sections, the report exports perfectly, but when exporting the entire set and trying to open the file, we get the following error in Adobe Reader:
    "There was an error opening this document.  The file is damaged and could not be repaired"
    We tried to repair the file, no luck.  We tried to use different PDF readers, no luck
    We then checked the file sizes.  When exporting the subsections, each section exports a file of about 2mb. 
    When exporting the entire set, the file is about 1.3mb. 
    Adding all the sections together gives me a rough estimate of 40mb.
    Exporting to TIFF works beautifully and returns a file of 41.5mb. Word and Excel formats also work well, only issue there is the page numbering and formatting.
     The problem we have is the clients are adamant about having it in PDF format.
    Any advice please?

    This was one of the temporary suggestions I gave the client...
    Unfortunately they do not like this as the page numbering and formatting in Word does not appear right.  We are talking about over 1300 pages.  I can't expect them to change the formatting with each export.  Additionally,  the data is
    constantly changing and each client has their own data.  The clients export the reports randomly.  I therefore can't post the reports back onto the server.
    Thanks for the speedy response though

  • When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I ca

    When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I can see the words "Microsoft Word" in pale gray, but when I click on the field, nothing happens.

    You have posted in the wrong forum.  Try posting in the forum for the product you are trying to use.
    Here is a link to a page that has links to all Adobe forums... use the drop down list to see all.
    Forum links page:
    https://forums.adobe.com/welcome

  • Change author name in my pdf files?

    It wont allow me to change the author name in my pdf files. Why not. How can I change it? It wont allow me in 'my preferences' or anywhere else. Not even in the document properties box.

    Hi alisons68876995,
    You might need to try this out:
    Go to "Edit> Preferences> Commenting" and disable "Always use log-in name for author name" option.
    Then, make a comment in the PDF and once done, go to Comment properties (Click on options in the comment pop-up) and the choose 'General' to choose the author name.
    Now, accept the changes, click on options again and choose 'Make properties default'.
    Now, adding a new comment will now include your name.
    Please check and then let me know.
    Regards,
    Anubha

  • Trouble with Exported .pdf Files

    I created three 20"x30" one-page documents (with iPhoto-sourced images) which saved as 24.7 MB, 19.4 MB, and 10.7 MB files, respectively. I needed to send JPEG files to my service provider for high-resolution prints. Since Pages '08 doesn't have a JPEG-export option, I exported each of them as .pdf files. My plan was to open the .pdf files in Photoshop and save them down as .jpg files. The same path had worked fine with a fourth Pages '08 layout of a 2.25"x3.75" document. With the three 20"x30" files, however, I ran into trouble.
    My laptop didn't have enough memory to open the exported .pdf files in Photoshop Elements without suffering some image gray-out. I didn't think that was a problem until we discovered that my service provider couldn't open the files at all (running the current Photoshop on a souped-up system). Arghhh.
    I switched to a service provider who can print straight from the .pdf files, but that also brought trouble. Though I could open the files easily in Acrobat 5.0, and they looked great, the service provider (running the current full version of Acrobat) could not open them; all he got was what looked like a blank page.
    I don't think the trouble is related to file size, as the business-card document which sailed through without trouble saved as an 11.2 MB Pages file.
    Could it be sheet size? That's the only thing I can figure. And why would the files open in Acrobat 5.0 without trouble, but not in the current Acrobat (or Acrobat Professional, which we also tried)?
    I ended up "printing" the Pages files as "Save PDF to iPhoto," then exporting the iPhoto image as a maximum-resolution JPEG. The only trouble with that route was that the best I could get was a 200 dpi. When I went through Photoshop (instead of iPhoto) with the business card file, I ended up with a 300 dpi file.
    Am I missing something obvious here? Any help would be appreciated.

    Hi,
    I don't know if this is the correct answer, but you can open a PDF in Preview and save the document as a JPEG and JPEG-2000. I know that Leopard will also have some neat functionality about this as well. You might also want to look at printing as a postscript file rather than a PDF and then open in Photoshop. I talked with a FEDEX/Kinkos employee yesterday about my book at he stated that Macs use 1.5 while Adobe's Acrobat is 1.7. Leopard should also fix this, but it may not help right now.
    HTH

  • How to use a value int the DAT file as name of the PDF file

    I need to use a value present in my DAT file as name of the PDF File.
    I am using the ,u argument in the Print Agent and I know this causes the pdf document to get a generic filename.
    Please help me.
    Thanks

    See my response to this same question you posed in the Output Designer forum.
    http://www.adobeforums.com/webx/.59b585c2/0

  • How do I print the file name of a PDF file?

    How do I print the file name of a PDF file?

    In the print dialog under Advanced you can specify this.

  • I purchased the package that allows you to export PDF files into Word files.  Whenever I try to export the PDF into a Word file it never works...  I don't know if there's something key that I'm missing but I'm pretty bummed I paid for it and it won't work

    I purchased the package that allows you to export PDF files into Word files.  Whenever I try to export the PDF into a Word file it never works...  I don't know if there's something key that I'm missing but I'm pretty bummed I paid for it and it won't work.  Can anybody help me out?

    Hello,
    I have paid for this service for a year and it never worked on my computer.  I just renewed and it finally converted the file but it will not let me edit it.  I join you in being bummed.  Either I get help with this or I am asking for a 2 year refund.   My intention was to be able to edit a pdf in MS Word. 
    pfierrorob

  • Displaying Report name in the PDF File.

    HI,
    I want to print the report in the PDF format.
    I executed one report and i am trying to print that report in PDF format.
    But in that PDF format it is not showing any report name.
    Can any body suggest me how can i get the report name in the PDF file.
    Thanks in Advance.
    BR
    Rajesh

    hi suri,
    chk this link..
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6dd54713-0c01-0010-8691-a3576b9a95d9
    go thru these threads for more details..
    Reg converting the BW report in PDF format
    PDF Report
    assign pts if helpful..

  • I exported pdf file to microsoft word but it came across completely garbled.  What is solution?

    I exported pdf file to Microsoft Word and it came across completely garbled.  What is solution?

    Hi,
    Perform below step for PDF Icon in library.
     Configure PDF Icon
    - Download PDF Icon from  Adobe website: http://www.adobe.com/images/pdficon_small.gif and save it to
    Images folder under 14 hive folder <var>(In my case C</var>:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\Images)
    - Open Command Prompt and type IISRESET -Stop to stop IIS and edit Docicon.xml
    - Navigate XML folder  from C:\Program Files\Common Files\Microsoft Shared\Web máy chủ extensions\14\Template\Xml  and open Docicon.xml by NotePad
    - Insert <mapping key=”pdf” value=”<var>pdficon_small</var>.gif ” /> within the <ByExtension> section
    - Save and Run command IISRESET -Start
    For More information :http://nhutcmos.wordpress.com/tag/display-pdf-icon-in-sharepoint-library/
    Regards,
    Mukesh Ajmera

  • Export PDF file  to JPG file

    I was able to export PDF file to JPG file so that it can be imported to iPhoto.   Suddenly, I found on the DPF File drop down menu I do not find the Export except top Ecel or Word.  Anybody can help ?

    Not a direct answer to your question, but an alternative way to go from .pdf to .jpg.
    Open the .pdf in Preview, then select "Save as" in the File menu, and select .jpg for the format:

  • Export PDF file updating but never completes the export - already turned off OCR capability

    Export PDF file continues updating but never completes the export - already turned off OCR capability

    John-
    I wish I had something helpful to add but I can merely say that I am seeing the exact same problems on Aperture 3.0.3, MacOS X 10.6.3 with my quad-core i7 iMac (8GB RAM, 2.8Ghz).
    The export I am attempting is:
    RAW from Canon 50D >export> Email Medium - JPEG (image quality 8, 1024X1024, 72dpi, sRGB, include metadata)
    With these adjustments:
    RAW fine tuning
    Retouch (brushed)
    Exposure
    Enhance
    Curves
    H/S (brushed) x2
    Color
    B&W
    Sepia
    Dodge (brushed) x2
    Blur (brushed)
    Definition
    Skin Smoothing (brushed)
    I am seeing some of the same side effects as others: must force-quit, can add/adjust effects but the preview updates are basically stopped.
    In some instances, I've quit the app to find an export in the location I placed it but that's only happened sporadically.
    I dearly hope the fix is coming...

  • Exporting pdf files

    I have just signed up to export pdf files to word/excel but the pdf file i am trying to open keeps coming up with file failed to be converted.
    Why is this and is there another way of opening it?

    What format are you trying to convert to? Word or Excel? Have you tried turning off the 'Recognize text' option and converting your file again?
    -David

  • Export PDF file as a file, not Interactive Form

    hi all,
    The scenario is about exporting OTF from Bapi and I want to export PDF file through SAVE AS pop up instead of showing as Interactive Form.
    The main treat is the enormous time consuming if the Bapi exports many number of lines of table. In this case, there's 1000+ lines of table then WD Java consumes 15+ to create a PDF showing on Interactive Form. Finally, WD Java app gives a short-dump screen as failing to update PDF. Then I prefer another solution which is EXPORTING PDF FILE AS A FILE THOUGH SAVE-AS POPUP INSTEAD OF SHOWING ON INTERACTIVE FORM.
    Could you help me on this? Any matters, please feel free to let me know. Thanks in advance.
    Peerasit

    Hello,
    You can try third party API to write into pdf file after getting data from Bapi. Search for Apache POI.
    Best Regards,
    Pankaj Sharma

Maybe you are looking for

  • F4 is not working in Portal

    Hi All, I am running BEx Report in portal through - RSRT - Java Web . Here my BW Query have Input variables and when I am trying to get F4 help , then list of values are not coming. For same Query and variable - list of values are coming in Bex analy

  • ITunes list a mess.  How do I re-install iPod that isn't a mess?

    My list of songs was perfect...all title and groups were listed in perfect order. It took days to do. I wanted to load my wifes songs from a separate portable hard drive into the iTunes under "her playlist" What ended up happening is those 6,900 song

  • How to query CLOB?

    One of the table column stores XML file as CLOB. Now, there is a requirement to retrieve the CLOB if one of the element matches within XML file. Please could someone suggest what is the best way to do that. Here is my table structure TABLEA COL1 COL2

  • BI and SAP for Mining

    Hi! Has anybody implemented BI with SAP for Mining? Do you have any information about BI Content, features, reports, differences...?

  • Iphone will not connect with Ituens - Unknown Error

    When I connect my IPhone I get "Itunes cannot connect to this Iphone because an unknown Error occured (0xE8000065)" - this error code is not listed in the Help section that deals wtih error codes. Please help! My Itunes is already up to date with the