473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Printing a large PDF document that is added by EMBED tag

Raj
Hi,
I have the following problem. I am displaying and printing a PDF file
that is generated by my Application server. The print dialogs comes up
correctly for the small PDF for the larger PDFs ,the print dialog for
the Acrobat reader does not comes up. I believe this is because print
method is called before the complete loading of the PDF document.

<html>
<Head>
<script>
function printNow()
var x = document.getElementById("PDF");
x.click();
x.setActive();
x.focus();
x.print();
</script>
</head>
<body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0
onLoad="setTimeout('printNow();', 1000)" >
<script language="javascript" >
var myString ="<%=request.getContextPath()%>" +
window.location.search.substring(1);
document.write('<EMBED name="PDF" SRC="' + myString + '" WIDTH=100%
HEIGHT=100% fullscreen="yes">');
</script>
</body>
</html>

Here if I increase the setTimeOut period for the larger report then the
print dialogs shows up. However, I do not know the size of the PDFs so
I cannot decide the time at design time. Is there a way to findout the
loading of the PDF document is complete.

So far , i have tried the following
1. Instead of onLoad, I tried calling the printNow() function in the
body after the EMBED. That does not help
2. Tried using the windows.document.pdf.ReadyStatus. It returns
complete even before complete document is loaded.

Any help is very much appreciated.

Thank you.
Raj

Feb 28 '06 #1
1 3546
Hi Raj,

I am also facing the same issue. Did you find out a work around for
this? If yes, could you please share it to us.

Thank you,
Chinna

Mar 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Kerri McDonald | last post by:
We have an application where the user fills out many screens and when they are done, we are supposed to display the text they entered in a word or excel format. That is fairly easily accomplished...
1
by: Raju Joseph | last post by:
Hi All, I have a small problem at hand and am looking for suggestions. I have created a wrapper for word 2000 for our application which is in VB.NET 2003. Everything works fine in the sense...
5
by: Stefania Scott | last post by:
I am trying to print a word document from Access. The code I've written works well in my computer but does not in the one were it is needed. Here the piece of code: 'doc path strObjectPath =...
7
by: Dennis C. Drumm | last post by:
I was wondering if someone could suggest were/how I could get started with setting up printing of a collection of text that includes tables from a grid and other supporting information about the...
2
by: orekin | last post by:
Hi There When printing in C#, it seems that the printer 'shifts' the print area down and to the right. So, even if the print document's DefaultPrintSettings margins are set to 0, the printed...
2
by: Raj | last post by:
Hi, I have the following problem. I am displaying and printing a PDF file that is generated by my Application server. The print dialogs comes up correctly for the small PDF for the larger PDFs...
6
by: Lenny Wintfeld | last post by:
Hi I'm attempting additions/changes to a Java program that (among other things) uses XSLT to transform a large (96 Mb) XML file. It runs fine on small XML files but generates OutOfMemory...
4
by: vunet.us | last post by:
When I create <embed name='myembed'object in HTML and say later on: var svgDoc = document.myembed.getSVGDocument() SVG document gets found. But when I create SVG document using DOM: var...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.