Print Page | Close Window

Table Functionality

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1226
Printed Date: 17 Jan 26 at 12:39AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Table Functionality
Posted By: MrPopup
Subject: Table Functionality
Date Posted: 27 Sep 09 at 7:51PM

We have been experimenting use the new table functionality, and have hit a problem where we seem to have no control of the font size for cell text.  No matter what sequence of code we use the font size is microscopic!

Has anyone else experienced this issue?

Sample (Jade code):


            table := qp.createTable(10,5);

           qp.setTableColumnWidth(table,1,1,30);

            qp.setTableColumnWidth(table,2,2,80);

            qp.setTableColumnWidth(table,3,3,60);

            qp.setTableColumnWidth(table,4,4,40);

            qp.setTableColumnWidth(table,5,5,60);

            qp.setTableBorderColor(table,0,1,1,1);

            qp.setTableBorderWidth(table,0,.1);

            qp.setTableCellBorderColor(table,1,1,10,5,0,0,0,0);

            qp.setTableCellBorderWidth(table,1,1,10,5,0,.1);

            qp.setTableRowHeight(table,1,10,5);

            qp.setTableCellAlignment(table,1,1,10,5,0);

            qp.setTableCellTextSize(table,1,1,10,5,5);

            qp.setTableCellContent(table,1,1,"<b>Dates:</b>");

            qp.setTableCellContent(table,1,2,"<b>From:</b>");

qp.setTableCellContent(table,1,3,"<b>Subject:</b>");

qp.setTableCellContent(table,1,4,"<b>Original:</b>");

qp.setTableCellContent(table,1,5,"<b>Action:</b>");

            qp.drawTableRows(table,

                        5,

                        top,

                        8*10,

                        1,

                        10);

Tracing code shows that all quickpdf function calls are successful; however the font is so small as to be unreadable.  We have tried all values (in setTableCelltextSize) from 1 to 100!

Thank you for any assistance.

Charles




Replies:
Posted By: MrPopup
Date Posted: 28 Sep 09 at 4:09AM
Apologies for the post.
Release 7.16 solved the problem.
Charles


Posted By: stakon
Date Posted: 22 Jan 10 at 12:33PM
Good Day,
 
I recently discovered that QuickPDF supports table creation/manipulation and while trying to fill cells with Greek text, the usual unreadable fonts appear...

I see that the DrawHTMLText() function is used when we put content in a cell.
Obviously this does not take into account previous SelectFont() calls which is used for the normal DrawText().

In the manual's given appendix Appendix A: Supported HTML tags, the font tag doesn't contain any "face" field, so i'm afraid i cannot use Greek text within TableCells created with QuickPDF.

Can anybody confirm/deny this restriction?

PS. I tried using :

SetTableCellContent(tableTitle,2,1,
"<font face=\"Courier New {1253}\">Ελληνικά</font>");
 but this also failed.

Thanx in advance,
Stakon.

*****EDIT*****
I found out that there is no problem with the fonts.
All i had to do was SetHTMLNormalFont("default",your_font_id);





Posted By: stakon
Date Posted: 25 Jan 10 at 10:01AM
Good day,

it seems there is another issue when working with tables.
While adding some text in a cell works fine, when i change the cell alignment to CENTER the text isn't drawn in the PDF. When cell alignment is  LEFT everything is ok.

Even if i reduce the TextSize, this behavior remains.

Any ideas?

Here i post you some code how to reproduce this error:

    int tablePDF = pdf_dll->CreateTable(1,1);
    pdf_dll->SetTableColumnWidth(tablePDF,1,1,full_box_w);
    pdf_dll->SetTableRowHeight(tablePDF,1,1,5);
    pdf_dll->SetTableCellTextSize(tablePDF,1,1,1,1,7);
    pdf_dll->SetTableCellTextColor(tablePDF,1,1,1,1,1,0,0);
    pdf_dll->SetTableCellBackgroundColor(tablePDF,1,1,1,1,0.6,0.6,0.6);
    pdf_dll->SetTableBorderColor(tablePDF,0,0,1,0);
    //pdf_dll->SetTableCellAlignment(tablePDF,1,1,1,1,1); <--UNCOMMENT THIS TO REPRODUCE ERROR
    pdf_dll->SetTableCellContent(tablePDF,1,1,"<b>SOME TEXT</b>");
    pdf_dll->DrawTableRows(tablePDF,right_limit - full_box_w,current_h,1000,1,0);


Thanx in advance,
stakon.



Posted By: Ingo
Date Posted: 25 Jan 10 at 10:34AM
Hi Stakon!

Please keep in mind if you've discovered a real bug in QuickPDF you should post it in the official webpages from the library ;-)

Cheers, Ingo



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk