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!
![]() |
DrawText and FontSize |
Post Reply ![]() |
Author | |
carlos.albert ![]() Beginner ![]() Joined: 17 Apr 07 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() Posted: 31 May 07 at 1:51PM |
Hello, we have an existing PDF document merged from various pdfs of diferent origins (PDF Printer, FastReport Renderized, etc) we want to write some text in the bottom of each page, the problem is the size of the text is not the same in all pages, the font size changes depend on the merged pdf. For example two pdf files with one page every one, we merge them and then apply the text with drawtext on each page, in the first page the font has a size and in the other the font has a diferent size. The code we use is:
QP:= TiSEDQuickPDF.Create; try QP.UnlockKey('XXXXXXXXXXXXXXXXX'); QP.LoadFromFile(FilePDF); //I have seen this in the forum QP.UseUnsafeLayers(1); // Stablish the font, the same if we stablish the font in each page QP.SetTextSize(20); for x := 1 to QP.PageCount do begin QP.SelectPage(x); // I have seen this in the forum QP.SetPageContent('q'#13#10 + Trim(QP.GetPageContent) + #13#10'Q'#13#10); QP.DrawText(10, 10, SuReferencia); QP.CompressPage; end; QP.CompressContent; QP.SaveToFile(FilePDF); finally QP.Free; end; Please, some idea??? |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Carlos!
I don't know if it helps ... but i have few ideas ;-) Put "QP.SetTextSize(20);" directly after "QP.SelectPage(x);". I don't know if "UseUnsafeLayers" and "SetPageContent" is necessary ... but if you use it i will place both after "SelectPage" to make sure that it works for the actual page. Best regards, Ingo |
|
![]() |
|
carlos.albert ![]() Beginner ![]() Joined: 17 Apr 07 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo,
>Put "QP.SetTextSize(20);" directly after "QP.SelectPage(x);". I had tried it before but same results. >I don't know if "UseUnsafeLayers" and "SetPageContent" is necessary ... but if you use it i will place both after "SelectPage" to make sure that it works for the actual page. I use it because of a post of Marian (I saw in the forum) regarding about draw text and position, I try to put it after selectPage too but no results. Thanks for your help. |
|
![]() |
|
carlos.albert ![]() Beginner ![]() Joined: 17 Apr 07 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo and Hi all,
I have resolved it calculating the size of the font in function of the size of the page, I have noticed than the size of the page is diferent so it is normal that the same size of text appears larger or smaller in pages of diferent size because the size goes in pixels and when you print it reescales to the size of the A4. |
|
![]() |
|
carlos.albert ![]() Beginner ![]() Joined: 17 Apr 07 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
Thans for all
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store