Convert a html report in pdf format

DarkHorse
Member Posts: 389
Hello, yesterday I've asked how to send and e-mail automatily whithout confirmation. Still with the same, I'd like now to know how to send the a print report in .pdf format automatily. Now I send by mail a purchase order in html format automatily using the codeunit 397 in a button. I've installed Acrobat 5 that convert a document in .pdf format and I believed that setting the pdf printer at the report it should run, but this is not like this. Now the code is the following:
RecOrderRESET;
RecOrder.SETRANGE("Document Type","Document Type");
RecOrder.SETRANGE("No.","No.");
IF RecOrder.FIND('-') THEN BEGIN
IF RecOrder.GET("Pay-to Vendor No.") THEN BEGIN
rptOrder.SETTABLEVIEW(RecPedido);
rptOrder.SAVEASHTML('C:\Purchasing Order.html');
SLEEP(2000);
CodeMail.NewMessage(RecVendor."E-Mail",'','PURCHASING ORDER ' + "No.",
'Please, fin enclosed our new order ' + "No.",'C:\Purchasing Order.html,TRUE);
END;
END;
RecOrder is the table Purchase Header
rptOrder is the print report
I've changed also the C:\Purchasing Order.html by C:\Purchsing Order.pdf, but the result is the same. How can I do it?
Thanks in advance.
RecOrderRESET;
RecOrder.SETRANGE("Document Type","Document Type");
RecOrder.SETRANGE("No.","No.");
IF RecOrder.FIND('-') THEN BEGIN
IF RecOrder.GET("Pay-to Vendor No.") THEN BEGIN
rptOrder.SETTABLEVIEW(RecPedido);
rptOrder.SAVEASHTML('C:\Purchasing Order.html');
SLEEP(2000);
CodeMail.NewMessage(RecVendor."E-Mail",'','PURCHASING ORDER ' + "No.",
'Please, fin enclosed our new order ' + "No.",'C:\Purchasing Order.html,TRUE);
END;
END;
RecOrder is the table Purchase Header
rptOrder is the print report
I've changed also the C:\Purchasing Order.html by C:\Purchsing Order.pdf, but the result is the same. How can I do it?
Thanks in advance.
0
Comments
-
You have to use automation or command line tools to convert HTML to PDF. You are missing that.0
-
Thank you. But, which ones command lines are they?; I've no idea.
Thanks.0 -
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions