Hi All,
Did anybody know how to conecrt the PDF format to RTF format in iText ?
Basically, I passed the cb into function to print the detail report.
Ir works for PDF formaT but I don't know know how to convert it to RTF format.
Especially the detail report need to print on exactly postion of A4 paper.
Please help.
Simon
..........................................................................
writer = class com.lowagie.text.pdf.PdfWriter::getInstance(document, class
java.io.FileOutputStream(outputDocFilePath))
if (document != null)
{
//Open the Document
document.open()
// Get the Content Byte, it mya be needed later (i.e. to generate BarCodes)
cb = writer.getDirectContent()
tableDetail = createDetail(SEQUENC_NUMBER, P_N, DESCRIPTION, RMA, S_N, QTY,
valueFont,cb,detail_column)
..........................................................................
..........................................................................
..........................................................................
..........................................................................
/*******************************
create detail function
********************************/
function createDetail(SEQUENC_NUMBER, P_N, DESCRIPTION, RMA, S_N, QTY,
valueFont,cb,column )
{
bf = BaseFont::createFont(BaseFont::COURIER, DEFAULT_FONT_ENCODING,
BaseFont::EMBEDDED)
fontSmall = class com.lowagie.text.Font(bf, DEFAULT_FONT_SIZE)
cb.beginText()
cb.setFontAndSize(bf, DEFAULT_FONT_SIZE)
cb.setCharacterSpacing(0)
cb.setWordSpacing(0)
cb.showTextAligned(PdfContentByte::ALIGN_LEFT, SEQUENC_NUMBER, 4 , column,
0)
cb.showTextAligned(PdfContentByte::ALIGN_LEFT, DESCRIPTION, 150, column,
0)
cb.showTextAligned(PdfContentByte::ALIGN_RIGHT, QTY, 403 , column, 0)
cb.showTextAligned(PdfContentByte::ALIGN_LEFT, S_N, 423 , column, 0)
cb.showTextAligned(PdfContentByte::ALIGN_LEFT, RMA, 150 , column-10, 0)
cb.showTextAligned(PdfContentByte::ALIGN_LEFT, P_N, 423 , column-10, 0)
cb.endText()
}
Simon
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions