on 01-23-2007 3:43 AM
Hi,
I have set of data in webdynpro context, i would like to create table in PDF and transfer the context data to PDF.
I tried using ITEXT API's to create PDF, it is not working, please let me know the ways to generate PDF.
I don't want to use Interactive Form UI element.
I don't want intermediate conversion like creating XML and then PDF etc.
Thanks
Senthil
Hi,
I am able to create the PDF using the ITEXT, issue was related to URL generation. It is fixed.
Thanks
Senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Senthil,
write a separate class,and write the method which will return collection,before that add the itext.jar in the lib,and add the written class must be placed in src\packges,
iterate the collection store in strings that will be set to context element.we can bind the value node to UI element.
Thanks,
Balaji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have included the ITEXT.jar.
I tried creating a simple PDF (without any context data, with just some static text) using ITEXT api's it is not working.
I used this source code.
Document document = new Document(PageSize.A4);
document.open();
PdfPTable table = new PdfPTable(1);
PdfPCell cell;
cell = new PdfPCell(new Paragraph("ONE"));
table.addCell(cell);
cell = new PdfPCell(new Paragraph("TWO"));
table.addCell(cell);
document.add(table);
document.close();
byte[] b = new byte[100 * 1024];
b = document.toString().getBytes("UTF-8");
IWDCachedWebResource pdfRes = WDWebResource.getPublicCachedWebResource(b, WDWebResourceType.PDF, WDScopeType.CLIENTSESSION_SCOPE, wdThis.wdGetAPI().getComponent().getDeployableObjectPart(),"FileNameHelloText"));
I have used Window Manager to create a external window with the URL from pdfRes.getUrl() method.
After execution i get a pop up window <b>with out PDF document.</b>
I read the blog written by Prakash, in Portal we have access to HTTP Servlet Response but in WebDynpro we don't have access, if you have solution (or sample code) to create PDF let me know..
Thanks
Senthil
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.