Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - changing the font in a table cell
  FAQ FAQ  Forum Search   Register Register  Login Login

changing the font in a table cell

 Post Reply Post Reply
Author
Message
pdfOakleaf View Drop Down
Beginner
Beginner


Joined: 24 Oct 10
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote pdfOakleaf Quote  Post ReplyReply Direct Link To This Post Topic: changing the font in a table cell
    Posted: 28 Oct 10 at 12:10PM
Is there any way to set the fontto use in a table

Although I change fonts in the main document I cant see how to do with within a table

any help will be much appreciated
Phil
Back to Top
Dimitry View Drop Down
Team Player
Team Player


Joined: 18 Feb 10
Status: Offline
Points: 37
Post Options Post Options   Thanks (1) Thanks(1)   Quote Dimitry Quote  Post ReplyReply Direct Link To This Post Posted: 01 Nov 10 at 10:13PM

Table text is drawn using DrawHTMLText() engine. So you need to use a function like SetHTMLNormalFont() to select necessary font.

Here is code sample that shows how to draw several tables using different fonts:
 
// QPL: TQuickPDF;
var
  table: Integer;
  f1, f4, f10, f12: Integer;
begin
  with QPL do
  begin
    SetOrigin(1);
    f1 := AddStandardFont(1);
    f4 := AddStandardFont(4);
    f10 := AddStandardFont(10);
    f12 := AddStandardFont(12);
 
    table := CreateTable(2, 2);
    SetTableColumnWidth(table, 1, 2, 70);
    SetTableRowHeight(table, 1, 2, 30);
    SetTableCellContent(table, 1, 1, 'SOME TEXT');
    SetTableCellContent(table, 1, 2, 'SOME TEXT');
    SetTableCellContent(table, 2, 1, 'SOME TEXT');
    SetTableCellContent(table, 2, 2, 'SOME TEXT');
 
    SetHTMLNormalFont('Default', f1);
    DrawTableRows(table, 50, 50, 1000, 1, 0);
    SetHTMLNormalFont('Default', f4);
    DrawTableRows(table, 250, 50, 1000, 1, 0);
    SetHTMLNormalFont('Default', f10);
    DrawTableRows(table, 50, 150, 1000, 1, 0);
    SetHTMLNormalFont('Default', f12);
    DrawTableRows(table, 250, 150, 1000, 1, 0);
  end;
end;


Edited by Dimitry - 01 Nov 10 at 10:16PM
Regards,
Dmitry
Back to Top
pdfOakleaf View Drop Down
Beginner
Beginner


Joined: 24 Oct 10
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote pdfOakleaf Quote  Post ReplyReply Direct Link To This Post Posted: 02 Nov 10 at 1:23PM
thanks for letting me know - I'll have a play with these functions and I'm sure I'll get everything I need

thanks again
Phil
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store