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 - DrawText as black only
  FAQ FAQ  Forum Search   Register Register  Login Login

DrawText as black only

 Post Reply Post Reply
Author
Message
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post Topic: DrawText as black only
    Posted: 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.
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 25 Sep 14 at 12:01PM
Erico,

 
Calling QP.SetTextMode(3) will allow you to draw "invisible" text.

Andrew.
Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post 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")
}
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post 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.
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