I am having trouble displaying my PDF file after running script.
I am getting a blank screen. Does anyone know how to fix this?
You'll need to provide more information. Starting with what "script" you're talking about, and what application you're using to open the file.
Similar Messages
-
I am having trouble with opening PDF files
I am having trouble with opening PDF files. When I click on the file, I end up with 40 or more folders all over my desktop, which cannot be opened. Any idea what I should do?
try right click on the file, and select open with preview.. thats the mac os x pdf viewer
-
Firefox opens when downloading PDF file while running IE9
Having problems displaying a PDF file (very low resolution & bad contrast). So I tried IE9. When I click on the link, Firefox opens to display the PDF "Swett/Sweet", even when Firefox is not running.
Page with the file "Swett/Sweet" is pg 34 at this URL https://www.familysearch.org/learn/wiki/en/images/d/d8/Digitalbooks2012julygenealogies.pdf
Other files seem to be OK. Was told by the Admin at familysearch.org that they could not duplicate the problem but were using Chrome.Usually when you uncheck that setting, the browser will ask you whether you want to Open or Save the file. Do you get that prompt, or just nothing?
I've probably used IE9 for less than 5 minutes, so if there is something new about the way it handles PDFs compared to earlier versions, I wouldn't know. -
Hello. May I ask: I am using Acrobat 6.0.2, and having trouble formatting a PDF created from multiple (jpeg) files. Each page is formatted to A4 size, portrait. But when I create the PDF, each sheet appears as tiny, in the middle of a huge white page. I cannot seem to find any controls to adjust this. Any advice appreciated.
Thanks CtDave, for the further info. Unfortunately, those suggestions are not working, which is strange.
....Until last week, I used to make multi-page PDFs straight from Photoshop: File > Automate > Make PDF. One simply choses the files, orders them, and creates a PDF. (Resolution doesn't matter; 300 DPI is no problem.) However, my new Photoshop CS5 does not have the option in Automate.
What I've done, seeing as Acrobat is letting me down, is use Bridge (new to me) to create the PDF. It worked without a problem, but seems like more work than the old PS method. I will download a newer version of Acrobat to see if that makes any difference.
.....Also, thanks Test Screen Name: I agree with you that jpeg is irrelevant, and that one can make a PDF from Photoshop (Print > Save As - pdf). But that only works for SINGLE PAGE pdf, not multiple pages as far as I can tell.
Kind regards,
Prince Nuada -
Store and Display doc/pdf files in the database using Forms
Hi all,
How can i store and display doc/pdf files in the database using Forms 10g?.
ArifHow to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
Solution
Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
here are steps to get a small test form running, using WebUtil 1.06.
Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
Feel free to copy this note to a text editor, and do a global find/replace on
[OraHome] with your actual value (no trailing slash). Then it is easy to
copy/paste actual commands to be executed from the note copy.
1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
2) Copy or move jacob.jar and jacob.dll
[JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
cd [JacobStage]
copy jacob.jar [OraHome]\forms\java\.
copy jacob.dll [OraHome]\forms\webutil\.
The Jacob staging area is no longer needed, and may be deleted.
3) Sign frmwebutil.jar and jacob.jar
Open a DOS command prompt.
Add [OraHome]\jdk\bin to the PATH:
set PATH=[OraHome]\jdk\bin;%PATH%
Sign the files, and check the output for success:
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
you may skip this step. Otherwise,
Create a schema to hold the WebUtil stored code, and privileges needed to
connect and create a stored package. Schema name "WEBUTIL" is recommended
for no reason other than consistency over the user base.
Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
out the EXIT statement, to be able to see whether the objects were created witout
errors.
Start SQL*Plus as SYSTEM, and issue:
CREATE USER webutil IDENTIFIED BY [password]
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;
GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
CONNECT webutil/[password]@[connectstring]
@[OraHome]\forms\create_webutil_db.sql
-- Inspect SQL*Plus output for errors, and then
CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
Reconnect as SYSTEM, and issue:
grant execute on webutil_db to public;
5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
to the CLASSPATH entry.
6) Start the OC4J instance
7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
It is important to generate the PLX, to avoid the FRM-40039 discussed in
Note 303682.1
If the PLX is not generated, the Webutil.pll library would have to be attached with
full path information to all forms wishing to use WebUtil. This is NOT recommended.
8) Create a new FMB.
Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
There is no need to Subclass the WebutilConfig object.
Attach the Webutil.pll Library, and remove the path.
Add an ON-LOGON trigger with the code
NULL;
to avoid having to connect to an RDBMS (optional).
Create a new button on a new canvas, with the code
show_webutil_information (TRUE);
in a WHEN-BUTTON-PRESSED trigger.
Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
the "Application Server URL" is empty.
Then append "?config=webutil" at the end, so you end up with a URL of the form
http://server:port/forms/frmservlet?config=webutil
10) Run your form.sarah -
How to display a pdf file in jsp
hi,
How to display a pdf file in jsp iam having a class which will return fileinputstream of the file object. the pdf file is in server.
regards
ArulA JSP is a combo of HTML and Java, so you can't really "display" a PDF file in a JSP.
You can provider a href link to the PDF file in your JSP.
You can use some utility package to read the contents of the PDF, pull certain things out of it, and display that in your JSP as html
In a servlet you can set the content type to application/pdf and write the binary data of the PDF back to the browser. Once the browser finishes reading in the data it should open the PDF. -
Having trouble opening a pdf with Adobe...keep seeing an error sign "acroExch" does anyone have a way to fix this?
Hmm, "Use Adobe Reader" should launch the PDF outside of Firefox in the stand-alone Adobe Reader application, so seeing it in a tab is something of a puzzle.
Could you check your version of Adobe Reader? For Windows 7, you normally would have the Reader XI series (Reader 11), which has had several updates. From inside Adobe Reader, you can use Help > Check for Updates to make sure it's current.
In Firefox, could you check your Adobe Acrobat plugin version or possibly versions? You can view that on the Add-ons page. Either:
* Ctrl+Shift+a
* "3-bar" menu button (or Tools menu) > Add-ons
In the left column, click Plugins. If you find multiple versions, this can cause problems and may need to be cleaned up manually (post back on that for suggestions).
Sometimes, the settings file which stores those download handler preferences becomes corrupted and there's not much else to do than to rename or remove that file and let Firefox rebuild it.
To do that, open your current Firefox settings (AKA Firefox profile) folder using either
* "3-bar" menu button > "?" button > Troubleshooting Information
* (menu bar) Help > Troubleshooting Information
* type or paste about:support in the address bar and press Enter
In the first table on the page, click the "Show Folder" button. This will launch a new window (Windows Explorer window) listing various settings files.
Leaving that window open, switch back to Firefox and Exit, either:
* "3-bar" menu button > "power" button
* (menu bar) File > Exit
Pause while Firefox finishes its cleanup, then rename '''mimeTypes.rdf''' to something like mimeTypes.old
Start Firefox back up again and "PDF Files" should be back to their default setting of "Preview in Firefox". Try changing that to "Use Adobe Acrobat (in Firefox)" and test to see whether there's any improvement. -
HHi having trouble viewing a downloaded file from a site my iPad is telling me I don have a app to open file . And have downloaded loads of apps and still no joy . Have tried this on my android phone to and still nothing. Please can anyone help as slowly going crazy. Thanks tim
What type of file? From what site? What Apps have you downloaded for it?
Perhaps if you provide details of what you are doing we can provide more precise help. -
Error when displaying a pdf file in an iFrame
Hi,
I would like to display a pdf file in my Java Web Dynpro application. I am using an iFrame element.
The code I used is:
// test if the file exists
if( path != null)
path = "D:\\Echanges\\Facture\\" + path + ".pdf";
if (isFile(path)) // test if the file exist
wdContext.currentContextElement().setPath(path); // we set the path of the file for the iFrame url
else
wdContext.currentContextElement().setPath("D:\\Echanges\\errorDocAccess.htm"); // here we set the path of an error file to display in the iFrame
In the context, path is declared as a String variable and mapped to an iFrame. What happen when I lauch the program is the followig error:
com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=D:/Echanges/errorDocAccess.htm
I have checked the path of the error file and it is valid. How do I get to display my file ? The path is on the same server as the portal.
Thanks a lot for your help.
Thibault SchalckNot solved
-
Using IFRAME in JSF to display a PDF file
2 all,
How do i display a PDF file inside a JSF page in a IFRAME tag?
I store the PDF file location (like d:\images\pdf1.pdf) in my database. I cant give this location directly into the src attribute cos then the file will be rendered to only users who have access to that folder (the application is a internet application). IFRAME would be ideal as the display is very very neat (esp for pdf files).
To get this working i tried the examples given in balusc blogs (on image servlet) but the problem is that my servlet is not getting called. Find below the web.xml and imageDisplay.jsp pages that i tried
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>WorkFlowTool</display-name>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter>
<display-name>SecurityCheckFilter</display-name>
<filter-name>SecurityCheckFilter</filter-name>
<filter-class>filters.SecurityCheckFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SecurityCheckFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Image Servlet</servlet-name>
<servlet-class>servlets.ImageServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Image Servlet</servlet-name>
<url-pattern>/imageServlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>/jsp/index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>500</error-code>
<location>/jsp/error.jsp</location>
</error-page>
<resource-ref>
<res-ref-name>jdbc/JDDS</res-ref-name>
<res-type>java.lang.Object</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
imageDisplay.jsp
<HTML>
<HEAD>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<f:loadBundle basename="messages" var="msg" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK rel="stylesheet" type="text/css" href="../theme/Styles.css"
title="Style">
</HEAD>
<body topmargin="0" leftmargin="0">
<f:view>
<h:form id="CaseLookUp">
<h:dataTable value="#{pc_ImageDisplay.dataModel}" var="var">
<h:column id="one">
<f:facet name="header">
<h:outputText value="H1" id="HOne"/>
</f:facet>
<h:outputText value="#{var.caseID}" id="IDONE"/>
</h:column>
<h:column id="two">
<f:facet name="header">
<h:outputText value="H2" id="HTwo"/>
</f:facet>
<h:graphicImage value="imageServlet?file=#{var.PODocPath}" id="image"/>
</h:column>
</h:dataTable>
</h:form>
</f:view>
</body>
</HTML>The image servlet is what i got from balusc's site (http://balusc.blogspot.com/2007/04/imageservlet.html).
I dont know why my servlet is not getting called. Can someone help me with this pls?
okay let me post the modified code for my image servlet here
public class ImageServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public void doGet(HttpServletRequest request, HttpServletResponse response) {
// Define base path somehow. You can define it as init-param of the servlet.
// String imageFilePath = "/images";
// In a Windows environment with the Applicationserver running on the
// c: volume, the above path is exactly the same as "c:\images".
// In UNIX, it is just straightforward "/images".
// If you have stored images in the WebContent of a WAR, for example in the
// "/WEB-INF/images" folder, then you can retrieve the absolute path by:
// String imageFilePath = getServletContext().getRealPath("/WEB-INF/images");
// Get file name from request.
String imageFileName = request.getParameter("file");
System.out.println("Inside the image servlet ---->>>> " + imageFileName);
// Check if file name is supplied to the request.
// if (imageFileName != null) {
// // Strip "../" and "..\" (avoid directory sniffing by hackers!).
// imageFileName = imageFileName.replaceAll("\\.+(\\\\|/)", "");
// } else {
// // Do your thing if the file name is not supplied to the request.
// // Throw an exception, or show default/warning image, or just ignore it.
// return;
// Prepare file object.
File imageFile = new File(imageFileName);
// Check if file actually exists in filesystem.
if (!imageFile.exists()) {
// Do your thing if the file appears to be non-existing.
// Throw an exception, or show default/warning image, or just ignore it.
return;
// Get content type by filename.
String contentType = URLConnection.guessContentTypeFromName(imageFileName);
// Check if file is actually an image (avoid download of other files by hackers!).
// For all content types, see: http://www.w3schools.com/media/media_mimeref.asp
if (contentType == null || !contentType.startsWith("image")) {
// Do your thing if the file appears not being a real image.
// Throw an exception, or show default/warning image, or just ignore it.
return;
// Prepare streams.
BufferedInputStream input = null;
BufferedOutputStream output = null;
try {
// Open image file.
input = new BufferedInputStream(new FileInputStream(imageFile));
int contentLength = input.available();
// Init servlet response.
response.reset();
response.setContentLength(contentLength);
response.setContentType(contentType);
response.setHeader(
"Content-disposition", "inline; filename=\"" + imageFileName + "\"");
output = new BufferedOutputStream(response.getOutputStream());
// Write file contents to response.
while (contentLength-- > 0) {
output.write(input.read());
// Finalize task.
output.flush();
} catch (IOException e) {
// Something went wrong?
e.printStackTrace();
} finally {
// Gently close streams.
if (input != null) {
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
// This is a serious error. Do more than just printing a trace.
if (output != null) {
try {
output.close();
} catch (IOException e) {
e.printStackTrace();
// This is a serious error. Do more than just printing a trace.
}Thanks Balusc!!
I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
<h:form id="CaseLookUp">
<%
String path = request.getContextPath()+"";
out.print(path);
%>
<iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
</h:form> -
Please Help? Having trouble opening camera raw files. Already downloaded Camera Raw update. I have a pc.
If the camera is fairly new then the version of ACR you have with CS5 won't be able to read those file. You'll need to upgrade to a newer version of Photoshop or use Lightroom 5.
Once a new version of Photoshop comes out Adobe does not support updating ACR from the older version of PS. -
Display a PDF file from local drive
Hi,
I would like to display a pdf file that is actually stored on the portal server hard drive.
What I have tried to do is link an iFrame element to the url of the file: "D:
MyFolder
myFile.pdf"
But it doesn't work. I have the following error when trying to do that:
com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=D:/MyFolder/myFile.pdf
Does this means that iFrame can only display http URLs ? What are the other ways to easily display pdf files ?? I'am stuck with that problem and can't find any other solution.
I also tried with "servletResponse.getOutputStream().write(fileByteContent);" but the problem is that I am not in a PAR application, and I don't have the servletResponse element and don't know how to get it.
Thanks for your help.
Thibault SchalckHi,
You can not access the .pdf file using the nornal path (c:
), use the following code to open the pdf in ur iframe, this will work i used it in my application.
String sFileName =
strCampCodeVal"_"nReqIdVal+".pdf";
String sFile =
"C:
SBLI
BCP
barcode_files
"+sFileName;
File fFile = new File(sFile);
if ( fFile == null )
System.out.println("System can not download the
file at this time. Please try again later.");
return;
//Checking the file for existence
if ( !fFile.exists() || !fFile.canRead() )
System.out.println("You have specified an
invalid file to download. Please check and try
again.");
return;
//set the content type its important , try with applicatio/pdf also
res.setContentType("application/force-download");
//seting the header
res.setHeader("Content-disposition",
"attachment;filename=" + sFileName);
res.setHeader("Cache-control", "must-revalidate");
ServletOutputStream sosCur = res.getOutputStream();;
//reading the in and writing the stream
BufferedInputStream bisFile = null;
try
byte [] bBuffer = new byte[4096];
bisFile = new BufferedInputStream(new
FileInputStream(fFile));
int nBytes = -1;
while( (nBytes = bisFile.read(bBuffer, 0, 4096))!=-1 )
sosCur.write(bBuffer, 0, nBytes);
catch(Exception ex){
This will resove your issue.All the best..
Regards..
krishna.. -
I'm having problems opening my pdf files. I'm running wiondows Xp and have adobe reader XI(11.0.06) installed.
What kind of problems? What happens when you try? Any error messages?
-
I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and downloaded Adobe Reader X instead and that still doesn't work. I have Windows 7.
Hello,
Please follow the link to troubleshoot the printing issues with Adobe Reader:- Troubleshoot PDF printing | Acrobat, Reader.
Regards,
Nakul -
Hi There: I am having a problem where pdf files on the web (i.e., links in a Word doc) open after an extended time and only as gobbldygook ( a file containing a series of characters and letters that make no sense). This also happens for another Mac user coworker in my office, while the PCs don't have this problem... Any help/suggestions for a fix would be most appreciated!
Just adding more info - MacBookPro running 10.5.8 and using Safari as the browser. The problem comes and goes - sometimes the linked Word files will open OK, n others its just a strring of crazy characters...
Maybe you are looking for
-
Headphones show on won't switch to speakers?
Speakers stopped working, volume control shows headphones are on. Checked switch settings, checked sound controls under "settings". Tried reset several times. I understand this is not an exclusive problem. Please don't tell me to do a full reset. I c
-
I am only getting a moderate nat on my xbox. How can I get it to an open NAT? Solved! Go to Solution.
-
Hi, Can anybody plz. let me know how can i setup standard fonts for my reports to be deployed on Solaris. Same machine same browser HTML format leads to a different output styles. The column headers appear bold on NT and on Solaris few column headers
-
In ISE (ise-3315) low reliability
Hello. What will happen if ise- 3315 broke one HDD? In ISE low reliability - RAID no. How can a server for security do without RAID? How can we improve reliability?
-
A good Java book for beginners?
Hello I am new to Java language. This year I will go in university (computer science major) so I thought I could study a bit during the summer. So I have choosen to learn the basics (or more) of the Java language. I dont know any other programming la