473,386 Members | 1,795 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.

repost: 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

Mar 1 '06 #1
2 1432
Raj wrote:
[the same as two days before:
<11**********************@v46g2000cwv.googlegroups .com>]


First of all, sorry for being off-topic, but I consider it important to
say the following here, in public.

This is the fourth time in a row I had to observe an article here with a
Subject starting with "repost:" referring to content that was not canceled
at all before. It is enough now!

news:11**********************@z14g2000cwz.googlegr oups.com
(11 Feb 2006 12:16:44 -0800)
news:11*********************@g44g2000cwa.googlegro ups.com
(12 Feb 2006 17:39:48 -0800; not really a duplicate,
but the same subject and poster)

news:lC*******************@news20.bellglobal.com
(Tue, 14 Feb 2006 09:15:37 -0500)
news:XO*******************@news20.bellglobal.com
(Tue, 14 Feb 2006 09:29:03 -0500; not a duplicate, but a demanding, and
utterly nonsensical top-post on the same subject, by the same person)
news:iv*******************@news20.bellglobal.com
(Mon, 20 Feb 2006 14:11:04 -0500)

news:11*************@corp.supernews.com (Sat, 18 Feb 2006 08:55:55 -0800)
news:12************@corp.supernews.com (Tue, 28 Feb 2006 06:35:03 -0800)

JFYI: Usually a repost on NetNews is something that is done by the a server
administrator or the original author, if an article has been canceled
unauthorized deliberately (by a troll), or canceled authorized accidentally
(by the original poster).

So probably I have to filter out postings with Subjects starting with
"repost:" from users of these service providers, who appear to confuse
this discussion group with a support forum on the Web; people who therefore
probably think that the chances for an article to get followups increase
the more often and the more frequent the article is posted or referred to,
when the exact opposite is true; people who have probably never heard of
Netiquette[1], or the Breidbart Index[2].

<URL:http://www.jibbering.com/faq/faq_notes/clj_posts.html>
Score adjusted

PointedEars
___________
[1] <URL:http://en.wikipedia.org/wiki/Netiquette>
[2] <URL:http://en.wikipedia.org/wiki/Breidbart_Index>
Mar 2 '06 #2
Raj
Pardon my ignorance on the Netiquette.

Mar 2 '06 #3

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

Similar topics

2
by: Ohaya | last post by:
Hi, We've been having a problem with one particular page that has a button on it, and a "tall" image (top-to-bottom). The button calls some simple Javascript to print the frame in which the...
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...
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
1
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...
3
by: Beavis | last post by:
I hate to repost a message, but I am still at the same point where I was when I originally posted, and hopefully someone else will see this one... Ok, so I have gone off and documented the...
1
by: D-Someone | last post by:
I am re-posting this message as originially it did not get a single response.. Any ideas? -------------- I am trying to come up with a good design for a web service that has some user logic...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.