StartDoc hangs on Vista 64-bit

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
j_kumarkiri
Posts: 3
Joined: Mon Nov 10 2008

StartDoc hangs on Vista 64-bit

Post by j_kumarkiri » Tue Nov 11 2008

Hi,
1)
I am using trial version of Amyuni PDF converter 3.0 on Vista 64-bit platform.
When I call StartDoc() ,it hangs the whole application,but it works perfectly fine on Windows 2003 32-bit.

I even tried ,functions
SetFileNameOptions(hPDFPrinter,NoPrompt + UseFileName);
SetDefaultFileName (hPDFPrinter, "c:\\output.pdf");
StartDoc(...);
but the probelm remains as it is !

2)
To test whether only StartDoc() hangs on vista , I wrote a sample application(other than my project)
In which I called BatchConvertEx (hPDFPrinter,"*.txt"); same ,it works perfectly fine on 2k3 32-bit environment ,but again it hangs on Vista 64-bit platform and some times gives error "Too small data area to be passed to system call".

I want to know , is there any solution ,so that StartDoc() will be called smoothly on Vista 64-bit platform.

I need your help

thanks

Jafar K

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: StartDoc hangs on Vista 64-bit

Post by Joan » Tue Nov 11 2008

Hello,

Did you attache the PDF Printer on Vista 64bits to a Nul: port that you create yourself? If not please do that.

If you did, please try version 3.03 of the Converter that is currently online.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark

j_kumarkiri
Posts: 3
Joined: Mon Nov 10 2008

Re: StartDoc hangs on Vista 64-bit

Post by j_kumarkiri » Tue Nov 11 2008

Hi,
Thanks for your valuable reply,

The PDF printer that I am using is created by install.exe which comes with the trial version setup.
as ,
Install.exe -s "My PDF Printer" -n "Evaluation Version Developer Pro" -c 07EFCDAB01000.........

so my questions are ,
1)Do I have to manually set "My PDF Printer" printer's port as NUL ; if yes , may I know how ?
2)Does Install.exe has any command line parameter to to change port ?
3)
a)Suppose I install "Quicken" Software then will my program run ? because I think they might be using same files but versions might different(same files names with different versions )
b)If older Amyuni PDF converter is replaced by newer one,does newer one supports older activation key,which is used by previous library ?



Needs your help again

thanks

Jafar K

David
Amyuni Team
Posts: 89
Joined: Mon Dec 18 2006

Re: StartDoc hangs on Vista 64-bit

Post by David » Thu Nov 13 2008

Hello

1) Attach printer to NUL: port on 64bit system.

Code: Select all


1) Make sure that you are logged in as a user with administrator rights.
2) Select Control Panel, and click Printers.
3) Right-click the Amyuni PDF Converter icon and select Run as administrator and Properties.
3) Click Continue.
4) Select the Ports tab, then click the Add Port... button.
5) Select Local Port and click the New Port... button.
6) Enter NUL: for the new port name and click OK. Close the Printer Ports window.
7) Ensure that the NUL: port is selected in the Ports list.
8) Select the Advanced tab.
9) Select the Spool print documents radio button to make the options below it clickable.
10) Clear (uncheck) the box labeled Enable advanced printing features.
11) Select the Print directly to printer radio button again.
12) Click the Apply button, and then click OK.

2) By default, the Amyuni printer will install to the first available printer port. When installing you can attach the printer to a specific port by specifying the port as follows

Code: Select all

Install -s "My PDF Printer;NUL:" -n "Evaluation Developer License" -c "07ABCDA0ABCDABCDABCD012301230123....."

The above syntax will install the printer to the NUL: port.

3) You can run different versions of the PDF Converter on the same system. For more detail on this refer to the following article that describes this in detailL viewtopic.php?f=13&t=2438

4) The License and activation codes are backward compatible i.e. version 3 codes will enable version 3 and older versions of the printer. Older versions of the license will not enable newer versions of the printer

Hope that helps?
David
Amyuni Custom Development
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php

lrios80
Posts: 1
Joined: Wed Nov 19 2008

Re: StartDoc hangs on Vista 64-bit

Post by lrios80 » Tue Nov 25 2008

Install -s "My PDF Printer;NUL:"
Is there any way to specify the printer settings (disable advanced printer settings) from the install command?

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: StartDoc hangs on Vista 64-bit

Post by Joan » Thu Nov 27 2008

Not in the command line but in the Install.ini file that is stored in the same folder as Install.exe
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark

PeterHuang
Posts: 1
Joined: Fri Dec 12 2008

Re: StartDoc hangs on Vista 64-bit

Post by PeterHuang » Tue Dec 16 2008

1) > Install -s "My PDF Printer;NUL:" -n "Evaluation Developer License" -c "07ABCDA0ABCDABCDABCD012301230123....."

> The above syntax will install the printer to the NUL: port.

I tried the above (with my liscencee info of course) and my printer did not install. The following was in the install.log:

.
.
.
Installing Amyuni PDF printer driver
---------------------------------------------------------------
----
Installing Amyuni PDF printer
Error Code: 1796
The specified port is unknown.
---------------------------------------------------------------
----
Printer setup failed
Error Code: 1796
The specified port is unknown.
---------------------------------------------------------------

Without the ;NUL: part, the printer installs fine.

Also, if the Nul: port previously existed, the printer installs fine.

It seems that the ;NUL: part can connect the printer to the Nul: port but cannot create it. Is there a way to force the latter?

2) >> Is there any way to specify the printer settings (disable advanced printer settings) from the install command?lrios80

> Not in the command line but in the Install.ini file that is stored in the same folder as Install.exe

What exactly needs to be put in the install.ini to configure the "disable advacned printer features", "Spool print documents so program finishes printing faster" and "Start printing immediately". We have end users who will need these settings and it would not be very good if they had to configure these manually.

3) It appears that attaching the printer to port 'nul:' is not neccessary to prevent the crash I was experiencing. I this setting needed - (because the printer is now going through the spooler?) We are trying to keep the settings as similar as possible between 64-bit and 32-bit windows

4) What 'advance printing featuers are we losing by turning off this option?

5) Is there a reason why the 2.50 version of the converter worked on 64-bit machine but the 3.03 version is now exhibiting this problem?

David
Amyuni Team
Posts: 89
Joined: Mon Dec 18 2006

Re: StartDoc hangs on Vista 64-bit

Post by David » Tue Dec 16 2008

Hello

1) The port needs to exist before you can use the install to install the printer to a specific port. In this case the NUL port needs to exist on the machine before you can attache to printer to the port. The Amyuni installer will not create a port on that system.

The following Microsoft help article provides a good guide on how to programatically create a port: http://support.microsoft.com/kb/321025

2) The "Advanced printing" features cannot be configured via the Amyuni install.ini file. Unfortunately, the information provided earlier that the advanced features can be configured via the the install.ini was incorrect.

3) In the case of the PDF Converter, there is nothing lost when you disable the "Advanced printing features" option.

4) The workaround is for both version 2.5 and 3.0 of the Amyuni printers. The problem with printing on 64bits occurs on some 64bit systems and not all 64bit systems. After thoroughly debugging the issues, we found the issues were being caused at the operating system level. This unfortunately we have little or even no control over that.

Hope that helps?
David
Amyuni Custom Development
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php

MGR
Posts: 20
Joined: Thu Apr 09 2009

Re: StartDoc hangs on Vista 64-bit

Post by MGR » Mon Apr 20 2009

I figured out a way to disable the advanced printing features and change to use spooling instead of printing directly to the printer, without having to use the printer properties user interface.

1) Set the following registry keys (where "Printer Name" is the name of your custom PDF printer):

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Printer Name]
"ChangeID"=dword:1
"Attributes"=dword:00001000

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Printers\Printer Name]
"ChangeID"=dword:1
"Attributes"=dword:00001000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\Printer Name]
"ChangeID"=dword:1
"Attributes"=dword:00001000

2) Stop and start the print spooler (from a command prompt or batch file):

net stop spooler
net start spooler

The reason this works is that the "Attributes" of 0x1000 corresponds to the spooler enabled ("spool print documents so program finishes printing faster" with "start printing immediately") instead of "print directly to printer", and also corresponds to "enable advanced printing feature" unchecked. And ChangeID is usually a time stamp, but in my testing, it can be anything, as long as it's the same value for all three registry keys.

Post Reply