473,804 Members | 3,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The print() function, PDF's, ASP, and other exciting things, etc...

15 New Member
Hi,

I'm writing an ASP application that can display PDF files in a frame.

The user can save or download the PDF, but I need to know when they do this so I can add an activity record to my database.

My first thought was to disable the PDF tool bar and allow saving and printing from buttons that I CREATE. This would allow me to trap the action. I was able to do this for saving using the LoadFromFile method in ASP.

However, printing has been a bit of a nightmare.

Initially, I simply added:

top.framename.f ocus();
top.framename.p rint();

...to a javascript event. This works excellent in Firefox! Firefox calls the Adobe Reader Print command just as if I had pressed Print from the reader's toolbar.

To my dismay... Internet Explorer will not, and can not, perform this same feat. I was able to create test scripts that would correctly print the frame when it's in HTML, but the moment the frame is a PDF, IE stops working.

Any way, Can anyone help me? Is there a way to trigger a PDF to print from an outside program (ASP or Javascript) that will work in IE and Firefox?


PS, I'm aware that experienced users could always find ways around. This is a downside to using PDF's and the uncompromising Adobe Reader.
Mar 20 '08 #1
1 1650
mrhoo
428 Contributor
What about your server logs? Don't they record the page each request comes from? Once it is in an iframe they have already downloaded it.
Mar 22 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1724
by: yooyoo | last post by:
I am implementing print template solution. I would like to use it in asp app. I open new document then generate print preview then print and finally close preview window, but I am not able to close previewed document. I try to move document window out of screen - somewhere like 9999999,9999999 position, view preview then print and finnaly close preview window. Then document window is invisible but still exists. How can I close the document...
3
37222
by: Felix Natter | last post by:
hi, is there a way (html/css/javascript) to force IE to print background-colors exactly as specified in html/stylesheets? I tried to use @media print { ... } to override IE's "print background colors + images" option, but it doesn't work. Any other idea? I'd like to avoid relying on the user for setting this option.
21
5741
by: Steel | last post by:
Hi at all, I have a very long html page with many photo. Therefore the best to print this page is to print the some page as PDF. Therefore I maked a PDF file like my page to print best. I'ld want that when the user press the print button in the browser , it print automatically the pdf file and not the html page. To do that I insert at the top of my page: <link media="print" rel="alternate" href="printthepage.pdf"> But it do not work and...
16
660
by: John Baker | last post by:
HI; I feel like a fool..I put CUTE FTP in my last request for help --it should have been CUTE PDF! I have FTP on my mind because I have been working on a web based application, and somehow my brain got stuck on it..sorry! Hi: I need some help writing code that will "print" a report using Cute PDF.
3
11550
by: Jeff Mason | last post by:
Hi, I'm looking for a component or code which will allow me to print an existing PDF file from a VB.NET app. I need the ability to specify the PDF file and the printer name on which it is to print, then have the document, er, print. That's it.
13
3045
by: Daniel Crespo | last post by:
Hi to all, I want to print a PDF right from my python app transparently. With "transparently" I mean that no matter what program handles the print petition, the user shouldn't be noticed about it. For example, when I want to print a PDF, Adobe Acrobat fires and keep opened. This is what I don't want to happen (and I thing there are a lot of people who want this too). So I just want to send the PDF to the right handler and print it....
1
3602
by: Glenn Venzke | last post by:
I'm trying to use system.diagnostics.process to print a pdf from ASP.NET 2.0 webservice (using a network printer). It works fine in an executable, but fails in asp.net. What happens is that the executable runs & Acrobat gets launched with no exceptions thrown, but the process is running under the ASPNET account & the printing never takes place. I found out that the ASPNET account, by design, is prohibited from doing certain things, so I ...
6
20456
by: Filips Benoit | last post by:
Dear All, All 3 codes, copied from internet, triggers error 429 : ActiveX component can't create object ! No compile error. I have the reference set to Adobe Acrobat 7.0 Type Library I do not have the full version of Adobe Reader 7.0 ! The final goal is to print a PDF-file from access after selecting the file in a browser.
0
3118
by: EricJudge06 | last post by:
We are converting some reports from Crystal Reports to Microsoft SQL Reporting Services (SSRS) in an ASP 2.0 VB.Net web app. Crystal had a function called PrintToPrinter which was being used to programmatically print to a network printer that we specified in the code as soon as the user clicked a button on the screen. The printer dialog box did not appear. It was true one-click printing. I need to figure out how to do the same thing in...
0
9588
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7625
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.