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 as black only |
Post Reply
|
| Author | |
erico
Senior Member
Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
Post Options
Thanks(0)
Quote Reply
Topic: DrawText as black onlyPosted: 24 Sep 14 at 8:07PM |
|
I am manipulating gray scale PDF, but when I add text, they become CMYk. How can I add text and retain "no color"? I only see SetTextColor for rgb and SetTextColorCMYK for 4 color.
|
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 Sep 14 at 12:01PM |
|
Erico,
Calling QP.SetTextMode(3) will allow you to draw "invisible" text. Andrew. |
|
![]() |
|
erico
Senior Member
Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 Sep 14 at 2:54PM |
|
I don't want invisible text. Perhaps I worded my erquest incorrectly. I want "black" only, so wen I pass my output through color separation, I do not have C-M-Y components, only K.
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 Sep 14 at 12:26PM |
|
Hi Erico,
but SetTextColor(0, 0, 0) will be black - that's what you want? Cheers and welcome here, Ingo |
|
|
Cheers,
Ingo |
|
![]() |
|
erico
Senior Member
Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 Oct 14 at 3:38PM |
|
Thanks Ingo and Andrew for taking the time to respond. You steered me in the right direction.
I've now solved my problem. It appears changing pages resets the text color to a default 0/0/0 RGB black, which is not the same as 0/0/0/1 CMYK black for color separation purposes. This does not work: SetTextColorCMYK(0,0,0,1) for each(Page in myDocument) { SelectPage(page) DrawText(x,y,"sting") } This does: for each(Page in myDocument) { SelectPage(page) SetTextColorCMYK(0,0,0,1) DrawText(x,y,"string") } |
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Oct 14 at 10:49AM |
|
Erico,
When you call QP.SelectPage then we have no idea what the current defaults are for the new page so you need to call the drawing functions to select pens, linewidth, fonts, NormalizePage, SetPageSize, colours etc. Andrew.
|
|
![]() |
|
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