How to export to PDF file, use X++

gameover
Member Posts: 4
Hi everyone !
In axapta, I have to do a job to export a ms word file to .pdf file, withou use the pdf printer. So, anyone know the way to do it in X++ (have any COM... )?
thank to any suggestion !
In axapta, I have to do a job to export a ms word file to .pdf file, withou use the pdf printer. So, anyone know the way to do it in X++ (have any COM... )?
thank to any suggestion !
0
Comments
-
Hi All,
After search around in AOT, I found the PDFViewer is class to write a PDF file.
I examined the PDFViewer class, but don't know how to begin (I must call
which method, in which order to achieve a PDF file ?).
and I try to create an instance of the PDFViewer class :
public void new(PrintJobHeader _jobsCursor, PrintJobPages _pagesCursor)
but I cannot know where to achieve the PrintJobHeader class/object and
PrintJobPages class/object.
in the main() method of PDFViewer class, I tried :
PDFViewer pdf = new PDFViewer(null, null);
TextBuffer tb = new TextBuffer();
int catalogObj, infoObj;
int xrefOffset;
pdf.writePDFHeader(tb.getText());
catalogObj = pdf.writePDFCatalog(tb);
infoObj = pdf.writePDFInfoObject('From Job', 'PV', 'Test');
xrefOffset = pdf.writePDFXref();
pdf.writePDFTrailer();
pdf.writePDFStartXRef(xrefOffset);
tb = pdf.buf();
tb.toFile('c:\\ttt1.pdf');
the buf() method is my method added to get the buffer. But it doesn't work (the PDF file isn't "well formed" !),
have any advise ??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