Hi
We are trying to use AmyUni PDF converter 2.06 on Windows 2000 Terminal Server. We have been using a Navision Attain application developed for our organisation for some time successfully on a stand alone desktop/s and need to move some users onto a windows 2000 terminal server.
The printing/conversion works fine if the user has Administrator rights, however if they do not we get the following error -
There was an error found when printing the document "..." to LPT1
Do you want to retry the job?
This is some of the code used to generate the report
PDFConverter.DriverInit('Navision PDF Converter');
PDFConverter.FileNameOptions(3);
PDFConverter.DefaultDirectory(ENVIRON('TEMP') + '\');
PDFConverter.SetDefaultPrinter;
FileName := 'EFT Remittance ' + EFTHeader."No." + '.pdf';
...
...
TempFileName := ENVIRON('TEMP') + STRSUBSTNO('\EFT_%1_%2.pdf',EFTLine2."Transfer No.",EFTLine2."Line No.");
PDFConverter.DefaultFileName(TempFileName);
REPORT FORMAT
REPORT.RUNMODAL(50006,FALSE,TRUE,EFTLine2);
...
PDFConverter.FileNameOptions(0);
PDFConverter.RestoreDefaultPrinter;
Any help appreciated!
Thanks,
Justin
0
Comments
Maybe this code will works...
TempDir := ENVIRON('TEMP')+'\';
TempFileName := 'temp.pdf';
PDFConverter.DriverInit('Navision PDF Converter');
PDFConverter.EnablePrinter(Company Name,Licence Key);
PDFConverter.FileNameOptionsEx(1 + 2 + 16 + 128 + 512 + 131072 + 2097152);
PDFConverter.FontEmbedding(TRUE); {always use this !!}
PDFConverter.DefaultDirectory(TempDir);
PDFConverter.DefaultFileName(TempDir + TempFileName);
//sometimes this code is useful:
rec.SETRECFILTER;
//use this code just before the printing:
PDFConverter.SetDefaultPrinter;
REPORT.RUNMODAL(50006,FALSE,TRUE,Rec);
//close the printer driver:
PDFConverter.DriverEnd;
CLEAR(PDFConverter);
/regards
Morten
I Managed to solve the problem by changing the registry permissions using regedt32. I found it worked by adding write permissions to the registry keys used by amyuni.
Regards,
Justin
But registry permissions did not help.
Does someone have solution for this?
Thanks