Print Page | Close Window

help with shared printer settings

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=587
Printed Date: 30 Apr 24 at 4:48PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: help with shared printer settings
Posted By: hbarclay
Subject: help with shared printer settings
Date Posted: 28 Dec 06 at 12:41PM
I recently posted some sample Delphi code to do DDE to Acrobat. I have been testing with this code and everything was looking good until I tried to print to a printer that is using windows sharing from another workstation.

I could print to local printers, and to networked printers without a problem. However when I tried to print to the shared printer, it would print, but I could not change the printer preferences to set duplex or form size or number of copies.

I went back to chicks pdfp program, and what I found was that the original pdfp.exe had the same problem, but the newer pdfp8 program did not. I am still using Acrobat 7 so the changes to detect version 8 were not an issue.

When I compared the pdfp.c files from the original and from pdfp8 there really are very few changes. One change was that a call to HideAdobe immediately after executing the DDE command had been commented out in the original code, but was not commented out in the pdfp8 code.

I added a call to HideAdobe to my Delphi code and now it works for local, networked and shared printers.  So the only problem I am left with is that I don't understand how this call made it work. Why does a call to HideAdobe after the command to print has been sent, cause the printer preference setting to work?

Thanks
Harry

 



Replies:
Posted By: chicks
Date Posted: 28 Dec 06 at 3:29PM
I wasn't aware of the limitation, and was equally unaware that I fixed it! I have no idea why a call to HideAdobe would cause this.


Posted By: hbarclay
Date Posted: 28 Dec 06 at 6:07PM
Originally posted by chicks chicks wrote:

I wasn't aware of the limitation, and was equally unaware that I fixed it! I have no idea why a call to HideAdobe would cause this.


Mystery solved.

It turns out you just happened to have a HideAdobe call commented out in a spot where the routine needs a delay when going to this shared printer.

A simple application.processmessages or a sleep with a reasonable delay will have the same affect as the HideAdobe call.

Do you normally print to Shared windows printers? I'm just wondering if this problem is unique to our network setup, or if this is just something you don't usually do so it's never been a problem.

Thanks
Harry




Posted By: chicks
Date Posted: 28 Dec 06 at 6:24PM
I don't recall ever using a shared Windows printer. In the office, we have many networked printers, and at home I use a USB laser printer.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk