Problem in opening PDF or FDF in Firefox?

Hi all,
     I am using tomcat 5.5. In one of jsp code, I have used a hyperlink to open a PDF or FDF file placed in server .My requirement is while clicking the hyperlink the PDF or FDF file should be opened in browser window itself. The file is located in remote server connected through LAN.
For eg :
<html>
<body>
<%
String test= "//123.45.6.78/XXXX/YYYY/RD/RDTEST-D-08-01178.fdf";
%>
<a  href="<%=test%>" target="dynamic" >test.pdf</a>
</body>
</html>When this jsp page is opened in IE and if I click on the link, PDF or FDF files is getting opened well in browser.
While clicking the link in Firefox browser, the path set in anchor tag is changed to
http://localhost:8080/ManuscriptCheck/\\123.45.6.78\XXXX/YYYY/RD\RDTEST-D-08-01178.fdf
Where http://localhost:8080/ManuscriptCheck/ is my Web application URL.
How to overcome this issue to have the file url as such without web application url appending before it?
Can Any body guide me. Thanks in advance.

The right way for doing this is Create a Servlet that will read the pdf files from the remote server and stream the file contents through the HttpServletResponse. You can find an example here.
[http://balusc.blogspot.com/2007/07/fileservlet.html|http://balusc.blogspot.com/2007/07/fileservlet.html]
The client browser will no longer be in need to have access to a given remote server.

Similar Messages

  • Problem in opening pdf  or fdf  File in JSP page through firefox in Linux

    Hi,
    In my Webapplication , i have given link to FDF document available in server in a JSP page on click of which the corresponding FDF document should open in a new browser.
    Consider the location of FDF file in my server is
    ServerIP/MS/RDTEST/RDTEST-D-08-10245.fdf
    In my JSP link to FDF file is provided as follows.
    newpath="smb://"+username+":"+password+"@"+serverip+"/MS/RDTEST/RDTEST-D-08-10245.fdf" ;
    <a class ="one1" href="<%=newpath%>" target="dynamic" > RDTEST-D-08-10245 </a>My Requirement is When i click on the link it should open the corresponding fdf file in the browser by following the link provided.
    But it is not working if i try in this way.
    Can anybody suggest how to proceed with this issue.
    Any other ways are there to open fdf file exisitng in server in Firefox in A Linux machine.
    What settings to be made in firefox to support FDF or PDF features.
    What prerequisites needed in Linux to enable FDF or PDF features.
    I have Adobe Acrobat professional 5.0 installed in my Linux machine.
    Thanks in advance.

    Is your problem
    -. That a new browser window doesn't open?
    Solution: [Lookup the 'target' attribute|http://www.w3schools.com/HTML/html_links.asp]
    - That your file content isn't streaming to the browser?
    Solution: Your code assumes the browser understands and supports samba. This isn't always the case (IE for example). And you're providing a direct link to your file with the username and password - security concerns as well as possible portability issues. You'd be better off writing a [file servlet to download your files|http://www.google.com/search?q=file+download+servlet]

  • Hi,am not able to open PDF Files in Mozilla Firefox without using plugins...I need Solution

    Hi,am not able to open PDF Files in Mozilla Firefox without using plugins...I need Solution

    Hello,
    Please see the support article below for full information on viewing PDF in Firefox:
    [[View PDF files in Firefox without downloading them]]
    If you want to use Firefox's built in PDF viewer (i.e. not a plugin) then you will need to ensure that any PDF plugins are uninstalled from Firefox and that 'Preview in Firefox' is selected as the Action for PDF files (see screenshot below).
    I hope that helps. Let me know if not.

  • HELP - Having Problem in opening PDF online form

    Hi,
    I am having a problem in opening a PDF form online, in fact it is a Canadian visa application form which i need to fill and submit online, but it's been more than 2 weeks I am unable to open it online, all the time I am getting same message 'To view the full content of this document you need a later version of PDF viewver' I have already installed the latest version but still it's not opening, I tried all the Browsers too but no scuccess, I am using Mac but I tried it on PC of a friend too and got the same Error.
    Please Help me, I am getting frustated now, it's wasted my 2 weeks, and the most interesting thing is that you can save this PDF on your computer, and once you have saved it its opening too in Adobe reader, but NOT at all opening online, but need to do it online - http://www.cic.gc.ca/english/pdf/kits/forms/IMM5257E.pdf
    Please HLEP
    Thanks in Advance.

    I don't know Safari, but I know that Chrome and Firefox use their own PDF viewers, not the Adobe Reader plugin.
    Try to configure them to use the Adobe PDF plugin: http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Adobe Reader 10 problem with opening pdf files

    Ever since I downloaded and installed Adobe Reader 10, I have been unable to open .pdf files from the Internet.  When
    I try to download them, I only the get the option of saving the file, not opening it.  Any help would be appreciated.  Thanks!

    We had similar problems with both the upgrade to 9.4.2 and 10.0.1. We would either get the download/save screen or a black screen would appear and eventually error out and freeze up the machine when we tried to hit pages that loaded pdfs stored in Oracle.  We found the pdfs would load when using Chrome or Firefox.
    We're running winXP SP3 and mainly have users using IE 7 and IE 8.  We were eventually able to solve the problem by doing the following:
    Implementing the code fix outlined in this thread (Response.charset = null;) in the page that pulled pdfs from Oracle: http://forums.adobe.com/message/3476821
    Uninstalling and reinstalling the base version of Reader (9.4.0 or X.0) from users' machines that had gone through the update from 9.x to X.x
    Rebooting the machine after each uninstall or install
    Updating the Reader to either 9.4.2 or 10.0.1
    Now we have users who can successfully load the pdfs from Oracle who are running either 9.4.2 or 10.0.1.
    Hope this helps!

  • Problem while opening PDF attachment in Inbox

    Hi all,
    I am sending PDF attachment through email to inbox.
    When am trying to open PDF attachment i am getting error-
    'There was an eror opening this document.The fuile changed and couldnt be open'
    When i click on attachment some bytes are getting transfere essage is displayed in lower toolbar.
    Please guide to resolve this problem.

    No reply.

  • Problem with opening pdf in browser

    Hello
    Acrobat X Pro 10.0.0.396 was installed on PC with Adobe Reader 9 (tried with Reader 10). When I open pdf documents from browser IE 8 or FireFox 3.5 i cann't see Tools panel and buttons from quick area (only Comments and Share).
    plugin in browser - Adobe Acrobat 10.0.0.396 but i think document opens with plugin from Reader. But i deleted it from PC
    thank you in advance

    Each user would have to set each browser individually.
    Note: I don't think it's possible to set the default PDF viewer with code for every user who visits the site.
    See the following link to enable Adobe Reader as the default PDF viewer in different browsers:
    http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html
    Note: Not all PDF viewer browser plug-ins support PDF submissions, and most 3rd party viewers may not support forms created with LiveCycle or forms with Extended Reader Rights enabled.

  • Problem with opening PDF files in Google Chrome browser

    We have a web page displaying links to dynamically generated PDF files located on the internal repository. This files are not just text PDF files but PDF forms created using XFA technology. This means that they must be opened and filled only in Adobe Reader and not in Foxit Reader or browser's built-in PDF viewer.
    Now, the problem is that a Google Chrome browser opens any PDF file using its own PDF viewer. And I want to force this browser to open PDF files in Adobe Reader.
    How can I achieve this without disabling 'Chrome PDF Viewer' plugin since I can't do this for all users of our web site?
    Any help or advice would be greatly appreciated.
    P.S. We use LiveCycle ES3.

    Each user would have to set each browser individually.
    Note: I don't think it's possible to set the default PDF viewer with code for every user who visits the site.
    See the following link to enable Adobe Reader as the default PDF viewer in different browsers:
    http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html
    Note: Not all PDF viewer browser plug-ins support PDF submissions, and most 3rd party viewers may not support forms created with LiveCycle or forms with Extended Reader Rights enabled.

  • Problem on opening pdf file in IE inline (through streaming method)

    Hello
              I had a problem opening pdf file at IE through streaming. I create a page
              that have a hyperlink to open the new window and talk to a serlvet. When
              clicked, this serlvet will stream a pdf file from the file server to serlvet
              output stream. And the pdf file will be displayed within the browser.
              The problem comes that I can see the Acrobat Reader trailer screen display
              but the brower show nothing. I click refresh button to that serlvet to
              reload then it come up the content.
              Is anyone have the same trouble on this and any solution will be
              appreciated.
              Rondy Lee
              State Street Australia Ltd.
              

    Hello Rondy,
              You vae set mime type to application/pdf, which is good. But IE doesn't care
              of it !
              And I think your URL is too long because and I'm sure it leads to a buffer
              overflow (as they say at MS in their bug report).
              So as a workaround, you can rename your servlet mapping from Ecd/Download to
              Ecd/Download.pdf if you can, or make the URL length much more smaller.
              Try to go to MS site to find what is the precise bug#. I can't remember what
              it its number.
              I hope you'll find a solution.
              Dom
              "Rondy Lee" <[email protected]> a écrit dans le message news:
              [email protected]...
              > Thanks Dom, I will try to find it out
              >
              > This is the sample URL I used on local host:
              >
              http://ausyd1-wdev-01:7001/Datalightning/Ecd/Download?EcdId=20&Type=I&OpenMo
              > de=O&OutputType=PDF
              >
              > Also, I set content-deposition to "inline" to enforce IE to open the pdf
              > file. Content Type is application/pdf
              >
              > I hope this can tell more information.
              >
              > Rondy.
              >
              > State Street Australia Ltd.
              >
              > "Dominique Jean-Prost" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello Rondy.
              > >
              > > I already had problems using servlet streaming a pdf file to IE.
              > > What is the exact URL of your servlet ? IE has a bug : it does not care
              of
              > > the mime content you set up (I guess you made it). It only cares of the
              > > extension of the file it ties to read. In your case, I guess there is no
              > > extension because you're using a servlet. To look for the extension, it
              > > search the last dot in the URL, and it may have a problem it the URL is
              > too
              > > long (buffer overflow...).
              > > So you can map your servlet to an url which has a dot in its name, and
              > make
              > > the URL length smaller.
              > > I can't remember the IE bug #id but, it is official at MS.
              > > I hope this will help you.
              > >
              > > dom
              > >
              > > "Rondy Lee" <[email protected]> a écrit dans le message news:
              > > [email protected]...
              > > > Hello
              > > >
              > > > I had a problem opening pdf file at IE through streaming. I create a
              > page
              > > > that have a hyperlink to open the new window and talk to a serlvet.
              When
              > > > clicked, this serlvet will stream a pdf file from the file server to
              > > serlvet
              > > > output stream. And the pdf file will be displayed within the browser.
              > > >
              > > > The problem comes that I can see the Acrobat Reader trailer screen
              > display
              > > > but the brower show nothing. I click refresh button to that serlvet to
              > > > reload then it come up the content.
              > > >
              > > > Is anyone have the same trouble on this and any solution will be
              > > > appreciated.
              > > >
              > > > Rondy Lee
              > > >
              > > > State Street Australia Ltd.
              > > >
              > > >
              > > >
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Cannot open PDF files online with Firefox 4, help suggests foxit but don't know what that is?

    Earlier versions of Firefox allowed me to open PDF files online, without downloading. Firefox 4 does not allow me to open and read PDF files online, but requires downloading to computer.
    Help suggest altering settings in FOXIT READER, manually, but I don't know how to access Foxit reader, if I have it.
    Can I alter settings in Firefox 4, or do I have to go back to earlier version.
    Thanks

    I was under the impression Foxit was a pdf viewer rather than an addon for Firefox, but maybe there is more than one application with a similar name.
    I did not notice mention of foxit in the help, but add-ons are not always mentioned.
    * https://support.mozilla.com/en-US/kb/Opening%20PDF%20files%20within%20Firefox#os=mac&browser=fx35
    * general articles
    **[[Using the Adobe Reader plugin with Firefox]]
    ** & [[Opening PDF files within Firefox]]

  • Problem with opening PDF files from JSF page using SDO

    Hi all,
    I'm new with JSF and was attempting to read a PDF file from a Database using SDO and JSF. The code below throws an exception when casting from DataObject to Blob. The getLcDoc() method was created by WSAD when I dragged an SDO relational record onto the JSF page. This method returns an DataObject type which I tried casting to a Blob type before using it further. However, an exception is thrown.
    Any feedback is appreciated.
    Arv
    try {
                   FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   Blob file= (Blob)getLcDoc().get("ATTACH");
                   int iLength = (int)(file.length());
                   response.setHeader("Content-type", "application/pdf");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   response.setContentLength(iLength);
                   ServletOutputStream os = response.getOutputStream();
                   InputStream in = null;
                   in = file.getBinaryStream();
                   byte buff[] = new byte[1024];
                   while (true) {
                   int i = in.read(buff);
                   if (i<0) break;
                   os.write(buff,0,i);
                   os.flush();
                   os.close();
         } catch(Exception ex){
              System.out.println("Error while reading file : " + ex.getMessage());
         }

    Hi...I found out that there is actually no need to use a Blob object at all. You can simply call the OutputStreams write() method and pass the DataObject.getBytes() method that returns a byte[] array. The revised code is shown at the end of this posting.
    However, a few other teething problems exist:
    1. This works well only if I specify the content type in response.setHeader() method. What if my users upload different types of files, is there a way that the browser opens according to the file type without setting the content type?
    2. I still have a problem opening PDF files, even if I specify - response.setHeader("Content-type", "application/pdf");
    I get the message - The file is damaged and could not be repaired
    3. I would also like this to open the attachment in a new window and using target="_blank" doesn't seem to work as seen below:
    <h:commandLink
                                                 styleClass="commandLink" id="link1" action="#{pc_DocumentDetailsRead.doLink1Action}" target="_blank">
                                                 <h:outputText id="text5" styleClass="outputText"
                                                      value="Click Here"></h:outputText>
                                            </h:commandLink>
    ------------------------Revised code-----------------------------------------
    FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   response.setHeader("Content-type", "application/msword");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   ServletOutputStream os = response.getOutputStream();
                   os.write(getLcDoc().getBytes("ATTACH"));
                   os.flush();
                   os.close();

  • Problem to open pdf in Windows 8 Domain (Reader X & XI)

    Hello,
    i am not able to open pdf's in windows 8, if i am connected with a domain (normal user & administrator).
    If i use the local user account (normal user & administrator) it is no problem to open the same pdf!
    The document is stored on a server, where i have to log on first. No problem to load a pdf, if it's stored on a public acceseble server.
    Our windows xp computers have no problem to open these pdf's!
    Hoping to get an answer... Thanks for any reply
    Carsten Löffelbein

    Hi,
    here we go...
    1) I tryed 10.1.5 and 11.0.1
    2) I can't copy it to the computer, because the server where it is on, is a 'security' server and i can't use the right mouse button (don't now the correct name of that (we are a yamaha-dealer and i want to open technical pdf's. I have to log in on the yamaha server, then have to open a new window where is checked if i am allowed to open that source and after that i can (normally) open the pdf. There was (and is) no problem with win XP-Pro))
    3) Opening in browser!
    Opening in browser or in reader is no problem from non security servers!

  • Unable to open pdf from chrome or firefox on my macbook since the update.

    I have a macbook pro. I use chrome or firefox in order to web browse. I have Adobe always running on the bottom of the screen. When I try to open pdf files from the web, it tells me that I need to end license agreement. I cannot figure out how. However, if I use safari, I am able to open the files. What do I need to do in order to get this to work on my chrome?

    Try this: http://www.thesafemac.com/art/

  • I have a problem with opening PDF files downloaded from anywhere!

    I can view them ok in Safari, but when I save and download them, they are displayed with the Preview image and will not open.
    When I click them, a message says that 'the file may be damaged or not recognised by Preview'.
    I have cleaned up my computer (apple help ) but still, the problem remains. I downloaded the same file to my MacBook pro, and it saved it in the usual PDF format, (completely different image from above), and opened perfectly well.
    I have checked the settings in Preview and they seem to be set correctly so that Preview will open PDF files.
    What next?
    I am desperate!
    Jennifer

    See if you can delete any Adobe PDF plugins from /Library/Internet Plug-Ins/. Then quit and re-open your web browser and try again.

  • I cannot open PDF files since installing Firefox 4. Have tried everything. Help.

    I installed Firefox 4, and now I cannot open PDF files. I have tried everything, including disabling PDF download, re-installing Adobe Reader, etc etc. Nothing seems to work.

    I was under the impression Foxit was a pdf viewer rather than an addon for Firefox, but maybe there is more than one application with a similar name.
    I did not notice mention of foxit in the help, but add-ons are not always mentioned.
    * https://support.mozilla.com/en-US/kb/Opening%20PDF%20files%20within%20Firefox#os=mac&browser=fx35
    * general articles
    **[[Using the Adobe Reader plugin with Firefox]]
    ** & [[Opening PDF files within Firefox]]

Maybe you are looking for

  • SOAP Receiver Channel: RW Error

    Hi experts! I have an error in my SOAP Receiver adapter at RW: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to read request. ---> There is an error in XML document (1, 198). ---> In

  • Macbook Display blinking and not recognizing ACER LCD projector

    I have a Black Macbook (2008) and have been using an ACER p1265 projector for the last two year on a daily basis. Today when I went to plug in the projector to my mac my screen freaked out and began to blink blue and white. I tried another adapter, V

  • How do i get my iphone 6 to stop asking me to login to itunes store

    how do i get my iphone 6 to stop asking me to login to itunes store

  • AD Trust Winddows 2008 R2

    I am planning to configure two-way trust between two 2008 R2 forests - say D1 & D2, belongs to same org. I have some queries here. 1. If I enable Forest wide authentication between D1 and D2 and vice versa , will this allow users of D1 and D2 to acce

  • Question about PIN code screen

    On some of the phones (iphone 4s models) I handle at work, the PIN code prompt makes you tap on an OK button while the majority we have don't require this.  Firmware updates haven't changed this and I was wondering if anyone knew why and maybe how to