Hey,
I use the pdf converter in navision.
In my code i print a few reports to pdf with the
OCX "Common Driver Interface Control". This works fine without any problems.
But when i am not working in navision and i just want to print a word document or a txt file to the amyuni printer i always get this error message: "Printer not activated - Errorcode -30".
I need to fix this problem because i want to print to a pdf-file in any application.
Here is the code i use.
pdfConverter.DriverInit('Amyuni PDF Converter');
pdfConverter.EnablePrinter(textcompanylic,TextLicence);
pdfConverter.DefaultDirectory(lsavetodir);
pdfConverter.FileNameOptionsEx(1 + 2 + 4 + 16 + 128 );
pdfConverter.DefaultFileName(lsavetodir + lTxtFilename);
pdfConverter.SetDefaultPrinter;
lrecJob.SETRANGE("No.",lpDocumentNo);
pdfConverter.EnablePrinter(textcompanylic,TextLicence); // i also do a second enable printer just before the print job
REPORT.RUNMODAL(lpReportID,FALSE,FALSE,lrecJob);
// for mailing the pdf with outlook
IF lbolMail = TRUE THEN BEGIN
IF NOT lrecCustomer.GET(lcustomer) THEN
lrecCustomer.INIT;
IF lrecCustomer."E-Mail" <> '' THEN
lmailto := lrecCustomer."E-Mail"
ELSE
lmailto := txtnoemail;
lsubject := 'subject test';
lbody := 'body test';
lAttachment := lsavetodir + lTxtFilename + ';' + lTxtFilename;
IF CheckFileExists(lsavetodir + lTxtFilename) = TRUE THEN BEGIN
pdfConverter.EnablePrinter(textcompanylic,TextLicence);
pdfConverter.SendMail(lmailto,'','',lsubject,lbody,lAttachment,2);
END;
END;
pdfConverter.RestoreDefaultPrinter;
pdfConverter.FileNameOptions := 0;
pdfConverter.DriverEnd();
CLEAR(pdfConverter);
Any idea ?
Printer not activated - Errorcode -30 Navision
Hello,
Are you trying to print from word directly? Are you using the Developer version of the PDF Converter? If both answers are affirmation then it’s normal to get an error, the Developer version of the Converter doesn’t have a user interface and should be used only programmatically. If you wish to print directly from word on offer windows applications you need to use the end user version of the Converter
Hope this helps
Are you trying to print from word directly? Are you using the Developer version of the PDF Converter? If both answers are affirmation then it’s normal to get an error, the Developer version of the Converter doesn’t have a user interface and should be used only programmatically. If you wish to print directly from word on offer windows applications you need to use the end user version of the Converter
Hope this helps