Sendmail errors PDFConverter v2.50

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
Posts: 1
Joined: Fri Jul 31 2009

Sendmail errors PDFConverter v2.50

Post by TimSimmonds » Wed Aug 19 2009


We're using the developer version of the PDFConverter (v2.50) in a Windows 2003 Server / Citrix environment.

I'm coding within MS Dynamics Nav(ision).

My problem is that I can get a sample PDF file to email only once per session. Subsequent tries give an error code 11. I have to restart my database session to get it to work again.

Also when the email is sent, the file attached has a strange filename with no PDF extension (eg. it looks like something like "ø_'ëèàI").

Coding is;

Name DataType Subtype Length
PDFConverter OCX Common Driver Interface Control

PDFConverter.FileNameOptions := 1+2; //1=noprompt,2=usefilename,4=concatenate,8=disable compression,16=enable embedded fonts

REPORT.RUNMODAL(ReportSelection."Report ID",FALSE,TRUE,PurchHeader);

PDFConverter.FileNameOptions := 0;

ReturnCode := PDFConverter.SendMail('','','','test','a pdf is attached',FileName,1);

IF ReturnCode > 0 THEN
MESSAGE('error occured : %1',ReturnCode);

IF PDFConverter.GetLastErrorMsg <> '' THEN

I can save the pdf file and use Outlook automation to send the email, but I thought it would be neater to use the PDF Converter sendmail functions instead.

Any help would be appreciated.

REgards, Tim

Amyuni Team
Posts: 550
Joined: Tue Oct 01 2002

Re: Sendmail errors PDFConverter v2.50

Post by Jose » Fri Aug 21 2009


Can you please verify the FileName variable in the SendMail() function? This variable should be made up of the string value that will appear it the email and a directory path to the actual file. These two values need to be separated by a ";"

Quote from our documenation.
Series of file names and their captions as they should appear in the email attachment. The file name is the full path of the file to send, the caption is the name of the file as seen by the recipient. The syntax for sending multiple files is as follows: file1;caption1;file2;caption2;....

SendMail( "", "", "", "Testing email capabilities", "Please find attached the requested document.", "c:\\temp1.pdf;document1.pdf;c:\\temp2.pdf;document2.pdf", 2 );

Hope this helps?
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing -

Post Reply