Developer Version 2.50b-3 not creating anything

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
fiachra
Posts: 11
Joined: Wed Jan 28 2004

Developer Version 2.50b-3 not creating anything

Post by fiachra »

Hello,

Setup:

* Windows XP Home Edition with SP2
* Delphi 5 Enterprise
* Amyuni PDF Converter 2.50b-3 (Developer Version)

I've uninstalled all previous versions of Amyuni (RAPID PDFWriter & PDF Converter 2.10 Evaluation Version) and installed PDF Converter 2.50 (entering the License and Activation codes in the PDF Converter installation). The problem is that I cannot print (i.e., save to file) anything with the Developer Version. I've copied and slightly modified the example Delphi code (see below) provided on the Amyuni website, but to no avail - I can step through all the code and it appears to be okay (i.e., none of the function calls return an error code), but no file is ever produced.

Any suggestions? I can provide you with the original License & Activation codes if they will help.

Thanks in advance,

Fiachra

Code: Select all

function DriverInit(PrinterName: PChar): LongInt; stdcall; external 'cdintf250.dll' name 'DriverInit';
function SetDefaultDirectory(Printer: LongInt; Directory: PChar): LongInt; stdcall; external 'cdintf250.dll' name 'SetDefaultDirectory' ;
function SetDefaultFileName(Printer: LongInt; FileName: PChar): LongInt; stdcall; external 'cdintf250.dll' name 'SetDefaultFileName';
function SetFileNameOptions(Printer: LongInt; Options: SmallInt): LongInt; stdcall; external 'cdintf250.dll' name 'SetFileNameOptions';
function SetDefaultPrinter(Printer: LongInt): LongInt; stdcall; external 'cdintf250.dll' name 'SetDefaultPrinter';
function EnablePrinter(Printer: LongInt; LicensedTo: PChar; ActivationCode: PChar): LongInt; stdcall; external 'cdintf250.dll' name 'EnablePrinter';

procedure TMainForm.PrintDLLClick(Sender: TObject);
const
  NoPrompt = 1;
  UseFileName = 2;

  OutputDirectory = 'C:\TEMP';
  OutputFileDLL ='C:\TEMP\DLLTEST.PDF';
  PrinterName = 'Amyuni PDF Converter';
  DocName = 'My Document';
  LicensedTo = 'Private'; // I do enter the actual license value here.
  ActivationCode = 'Private'; // I do enter the actual activation code here.

var
  pdf: LongInt;

begin
  pdf := DriverInit(PrinterName);
  SetDefaultPrinter(pdf);

  if SetDefaultDirectory(pdf, OutputDirectory) = 1 then
  begin
    if SetDefaultFileName(pdf, OutputFileDLL) = 1 then
    begin
      if SetFileNameOptions(pdf, NoPrompt + UseFileName) = 1 then
      begin
        if EnablePrinter(pdf, LicensedTo, ActivationCode) = 1 then
        begin
          RichEdit1.Print(DocName);
          SetFileNameOptions(pdf, 0);
        end;
      end;
    end;
  end;
end;
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

There is nothing that seems to be wrong in your code.

Do you have a folder called 'TEMP' on C:\ ?

It is normal that the Developer version will not print directly from Word or Excel (or any other Windows application) because this version is made to be used solely from inside your own application.

I am assuming that the PDF Printer installed on your system is called 'Amyuni PDF Converter', am I right?

If you try to print to version 2.10 or to Rapid PDF (while changing the Activation Code and printer name accordingly), will you get a pdf file?

Finally, please check that 'My Document' is effectively the print job name generated by your application, DocName should contain the print job name generated by your own aplication.

You may try to use our latest version 2.50c.

Hope this helps.
fiachra
Posts: 11
Joined: Wed Jan 28 2004

Post by fiachra »

Hi Joan,

Thanks for the reply.

Regarding your questions:

* There is a folder called 'TEMP' on C:\

* The PDF Printer is installed as 'Amyuni PDF Converter'

I uninstalled PDF Converter 2.50b-3 (Developer Version) and re-installed the evaluation version of PDF Converter 2.10i-3 (might be j-3) and the example code I posted (with the change for LicensedTo and ActivationCode) works correctly - DLLTEST.PDF is created in C:\TEMP.

As I mentioned, the developer version code appears to work fine - no error codes - but does not produce anything; while stepping through the code in Delphi, the only difference I can see in the two is that the evaluation version takes a few seconds to create the PDF (in the RichEdit1.Print(DocName) call) while the developer version makes this call very quickly. Could my developer version License and ActivationCode information be incorrect? If required, I can e-mail these to you separately to check their authentication.

I haven't been able to update to 2.50c as I cannot get access to the support/updates page - for some reason my login will not work! I will contact your sales department to see why not.

Thanks,

Fiachra
fiachra
Posts: 11
Joined: Wed Jan 28 2004

Post by fiachra »

Joan,

I've updated to PDF Converter 2.50c and still no joy. Any ideas?

Thanks,

Fiachra
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

Can you post a complete list of the printers and fax drivers you currently have installed?

The issue you are encountering is very similar to the Faxtalk issue.
http://www.amyuni.com/forum/viewtopic.php?t=426

Thanks
fiachra
Posts: 11
Joined: Wed Jan 28 2004

Post by fiachra »

Hello Jose,

Sorry for the delay in replying. I have the following 'Printers and Faxes' on my XP Home Edition Dell PC:

1. CAPTURE FAX BVRP (Port: NUL)

2. Lexmark X1100 Series (Port: USB001)

3. Microsoft Office Document Image Writer (Port: Microsoft Document Imaging Writer Port)

As I've mentioned in a previous post, I can use Amyuni Document Converter 2.10 with the License and Activation I received when we purchased 2.50, but 2.50 will not work. I don't know what has changed in 2.50??

Thanks for any assistance you can give me,

Fiachra
fiachra
Posts: 11
Joined: Wed Jan 28 2004

Post by fiachra »

Hello Jose/Joan,

I was just wondering if you had a chance to look into this?

I've just recently come back to this issue and have another problem as well; I don't know if it is related to the fact that I can't get 2.50 to work correctly.

I have a Delphi 5 program that loads a DOC file into a Microsoft Word TOleContainer. The Word container can view the file correctly, but when I go to print (save) the file as PDF (using Word's Printout method) I get the same error message every time:

"Windows cannot print due to a problem with the current printer setup."

Note: I am ensuring that the Amyuni PDF Converter is the ActivePrinter in the Word OLE Object, and I've tried every combination of Parameters for PrintOut, the last being:

Code: Select all

Filename := 'C:\TEST1.PDF'; // DOCFilename = 'C:\TEST1.DOC';
DOCViewer.WordApp.Printout(False, False, wdPrintAllDocument, Filename, EmptyParam, EmptyParam,
                    wdPrintDocumentContent, 1, EmptyParam, wdPrintAllPages, True,
                    False, DOCFilename, EmptyParam, EmptyParam);
I need to know if this is a problem with using PDF Converter with Word or TOLEContainers? I'm using the Developer Version, and although I should not be able to save as PDF from the Word application itself, I should be able to do it from within my own applications. I can e-mail you the complete test application if you require.

Thanks,

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

Post by Joan »

This error will be generated from Word if the file you are trying to print to it is open or not fully written on disk.

Could this be the case?

You can always contact support@amyuni.com if you are having problems with your code.
Post Reply