Navision & PDF Files

Hi all. I have a report that saves in HTML format but the problem is the saved document doesnt show graphics orather images. I though of saving it as PDF so how do i do this programmatically using codes like i used to save in HTML.

These are sample codes that i had writen to save as HTML, so hw do i write codes for saving as PDF



This is a link to a how to save as pdf on mibuso.

Try to search pdfcreator in Mibuso has more discussion on this topic.

Hi Guys one again. So far so good. but help me finish completly on this issue. I managed to download the pdf creator and install it. Now on the report to be ssved as pdf i wrote the following codes.


ReportID := REPORT::“Send Member Invoice Emails”;
IF Object.GET(Object.Type::Report,’’,ReportID) THEN;
FileDirectory := ‘C:’;
FileName2 := ‘INVOICES.PDF’;
PDFCreatorError := PDFCreator.cError;

IF PDFCreator.cStart(’/NoProcessingAtStartup’,TRUE) = FALSE THEN
ERROR(‘Status: Error[’ + FORMAT(PDFCreatorError.Number) + ']: ’ + PDFCreatorError.Description);

SalesHeader := “Sales Invoice Header”;
IF Cust.GET (SalesHeader.“Sell-to Customer No.”) THEN BEGIN
IF Cust.“E-Mail” <> ‘’ THEN BEGIN
EmailAdd := Cust.“E-Mail”;
WindowisOpen := TRUE;
IF FileName2 = ‘’ THEN
ERROR(‘Please specify what the file should be saved as’);

PDFCreatorOption := PDFCreator.cOptions;

PDFCreatorOption.PDFUseSecurity :=1;
PDFCreatorOption.PDFOwnerPass := 1;
PDFCreatorOption.PDFOwnerPasswordString := ‘MasterPass’;

PDFCreatorOption.PDFDisallowCopy := 1;
PDFCreatorOption.PDFDisallowModifyContents := 1;
PDFCreatorOption.PDFDisallowPrinting := 1;

PDFCreatorOption.PDFUserPass := 1;
PDFCreatorOption.PDFUserPasswordString := ‘UserPass’;

PDFCreatorOption.PDFHighEncryption := 1;

PDFCreatorOption.UseAutosave := 1;
PDFCreatorOption.UseAutosaveDirectory := 1;
PDFCreatorOption.AutosaveDirectory := FileDirectory;
PDFCreatorOption.AutosaveFormat := 0; //PDF file, you can also save in other formats
PDFCreatorOption.AutosaveFilename := FileName2;

PDFCreator.cOptions := PDFCreatorOption;
DefaultPrinter := PDFCreator.cDefaultPrinter;
PDFCreator.cDefaultPrinter := ‘PDFCreator’;
PDFCreator.cPrinterStop := FALSE;




Now when i run the report am getting this error " Recursive function calls" Any bosy with any idea how to solve this?

Can you run th edebugger, and see where it is bombing out?

Thanx. I run the debugger and got it. Now tell me i want the whole process to save the pdf file on a prespecified folder and then sent the file to a preset email address AUTOMATICALLY. What is happening at the moment is the PDF Creator is bringing a dialog box prombting me to save or sent as email.

Could it be am using the wrong version of pdf creator? This the one am using


Please assist me. Thanx in advance.

Why are you running all this code, when you could just set all this in options for autosave?

After that you would merely have to pick up the file from the location (which you have to save in NAV) using NAV internal mail or system default mail… using standard NAV objects.

ok thanx for your comments but can you please give me diraction to the outo save. Where do i set it? and how?


Unfortunately that really does not work in the real world. The idea of using the automation, is that there is no user intervention required. Using Autosave mean having to set up each computers PDFCreator, and also setting up procedures for this all to happen. I have a client that sends out about 1.200 invoices a day, and this needs to be fully automated. You can’t rish it getting messed up like that.

In the case of a client that sends say 10 invoices a day, then yes the Auto save option is fine.

Ok guys am confused. Infact am done with the saving of the file as pdf and sending it to my customer. BUT the annoying thing is that the document is password protected.

My QS is what version of pdf creator do i need to use. plz you can sent me one.


But why everybody has to have it’s own pdfcreator? The concept of a printserver / server / shared printer seems to have been forgotten in your case…

Additionally you could just set up a printer route in NAV for a specific report…

I have built several working systems like that and I just love the pdfcreator soft.