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!
SetTextMode function is not working for me. Why? |
Post Reply |
Author | |
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
Posted: 12 May 12 at 9:17AM |
Using D2009 and QPL8.15 with following code:
QP.SetMeasurementUnits(1); QP.SetTextMode(1); QP.SelectPage(1); QP.SetOrigin(1); QP.SetTextSize(25); QP.DrawRotatedText(TXTH , TXTH, Angle, TXT); but the output is not showing Outline text. In fact it is also not showing Fill then stroke text. How to use this function for "Fill then stroke text"and how to fill desired color. Any help? Thanks in advance. |
|
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Hi all,
Changing the order of code lines fixed the outline issue as below...but how to set the outline color? QP.SetMeasurementUnits(1); QP.SelectPage(1); QP.SetOrigin(1); QP.SetTextMode(1); QP.SetTextSize(25); QP.DrawRotatedText(TXTH , TXTH, Angle, TXT); Thanks |
|
edvoigt
Senior Member Joined: 26 Mar 11 Location: Berlin, Germany Status: Offline Points: 111 |
Post Options
Thanks(0)
|
Hi,
no problem. By default textcolor and linecolor is black. You should change them: QP.SetTextSize(25); QP.SetTextMode(2); // both: outline and fillcolor QP.SetLineColor(0, 0, 0); // color for outline QP.SetLineWidth(0.5); // thickness of outline QP.SetTextColor(0.5, 0.5, 1); // textcolor=fillcolor With SetTextMode(1) you do not need SetTextColor. It's needed for TextMode(2). Choose LineWidth depending on TextSize and beware for millimeters (LineWidth) and points (TextSize). Cheers, Werner |
|
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Thanks a lot!!! It is working great.
Now I want to draw text beneath the page content (i.e. in background). Is there any function available? |
|
edvoigt
Senior Member Joined: 26 Mar 11 Location: Berlin, Germany Status: Offline Points: 111 |
Post Options
Thanks(0)
|
Hi,
yes it is. Because a PDF-Reader is working like an interpreter, the order in which the draw-commands are in the PDF determes who lays on whom, we must draw all Backgroundinfo first and the content later. So it is rather clear for a new PDF-page. But how to do it on a existing PDF? In a first step we take the the hole existing content from a existing page and build a new one in same dimensions. This goes over capturepage-functions. On the new page we put first our backgroundstuff and put as second the captured page on it. That's all. For an example look at: http://www.quickpdf.org/forum/stamping-with-a-rotated-shadowed-text-www-link_topic2081_post8876.html?KW=watermark#8876 There I used an example from Andrew, to bring a watermark under the pagecontent. Cheers again, Werner |
|
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Thanks for your prompt reply. Going to implement now...
|
|
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Dear Werner, everything is perfect but the output page text is overwritten and not displaying correctly. Any help?
|
|
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
I figured out the problem, It is when we add watermark with SetTextMode(1 or 2) function. It is creating the outline on the characters of captured page. Any suggestion?
|
|
edvoigt
Senior Member Joined: 26 Mar 11 Location: Berlin, Germany Status: Offline Points: 111 |
Post Options
Thanks(0)
|
Hi,
only a remark. Put around the Watermark-code a SaveState and LoadState, so after this all (I hope) PDF-options like Colors, Sizes, Textmode ... are in the State as before SaveState and will no more disturb drawing the captured page. SaveState; Watermark; LoadState; // as it was DrawCaptured; This solution is ever a help, if you have to mix something. In your case, SetTextMode(0) before Drawcaptured would be enough, but if you change the watermark-drawing, it may get other bad influence to the captured page. Cheers, Werner |
|
ExchangeViews
Team Player Joined: 13 Mar 12 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
Thanks. But if I use QP.NormalizePage(0) for rotated pages, It is showing just a blank page.
NormalizePage SaveState; Watermark; LoadState; // as it was DrawCaptured; |
|
edvoigt
Senior Member Joined: 26 Mar 11 Location: Berlin, Germany Status: Offline Points: 111 |
Post Options
Thanks(0)
|
Hi,
to understand what happens, ask the QPL for the Rotation inside your PDF before and after NormalizePage. Description Moves and/or rotates the contents of the page so that subsequent drawing operations are at the expected position on the page. All the page boundary boxes are adjusted to the physical size of the page and the page's rotation attribute is reset to zero. I believe, you make after NormalizePage your Rotation with the before calculated angle and put so the pagecontent outside the visible area. Cheers, Werner |
|
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