Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] DyanPDF isColorPage (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] TransitionWindow in Cocoa?
Next thread: [MBS] [ANN] 13.1fc1


Re: [MBS] PortAudio bug?   -   Garth Hjelte
  [MBS] DyanPDF isColorPage   -   Peter Truskier
   Re: [MBS] DyanPDF isColorPage   -   Christian Schmitz
   Re: [MBS] DyanPDF isColorPage   -   Peter Truskier
   Re: [MBS] DyanPDF isColorPage   -   Christian Schmitz

[MBS] DyanPDF isColorPage
Date: 06.05.13 19:32 (Mon, 6 May 2013 11:32:24 -0700)
From: Peter Truskier
Hi,

I am wondering whether the function "isColorPage" is designed to take into consideration whether the page will actually contain color marks on the page, or merely whether objects with a nominal color fill or stroke exist on the page.

For example, if a page contains a text object with a red fill color, BUT the contents of that text object is nothing but one or more space characters, will the function return true or false?

The DynaPDF reference says "The function does not return when a color is set, the color must be used by an object.", but this doesn't quite answer the question in the case of an empty string...

Re: [MBS] DyanPDF isColorPage
Date: 06.05.13 20:00 (Mon, 6 May 2013 21:00:27 +0200)
From: Christian Schmitz

Am 06.05.2013 um 20:54 schrieb Peter Truskier <<email address removed>>:

>
> Right. Sounds like the key word here is "might" which is what I was guessing, though not hoping for ;-)

You could do your own if you like via the parser interface.

Greetings
Christian

Re: [MBS] DyanPDF isColorPage
Date: 06.05.13 19:54 (Mon, 6 May 2013 11:54:04 -0700)
From: Peter Truskier
On May 6, 2013, at 11:37 AM, Christian Schmitz wrote:

>
> Am 06.05.2013 um 20:32 schrieb Peter Truskier <<email address removed>>:
>
>> Hi,
>>
>> I am wondering whether the function "isColorPage" is designed to take into consideration whether the page will actually contain color marks on the page, or merely whether objects with a nominal color fill or stroke exist on the page.
>
> Well, it's more like, if it says b/w than it is b/w.
> If it says true, the page may have colors.

Right. Sounds like the key word here is "might" which is what I was guessing, though not hoping for ;-)

>
>> For example, if a page contains a text object with a red fill color, BUT the contents of that text object is nothing but one or more space characters, will the function return true or false?
>
> Looking on code, it looks like a space will be enough to mark the page as having color.

Great. Thanks for looking into it, Christian...

>
>> The DynaPDF reference says "The function does not return when a color is set, the color must be used by an object.", but this doesn't quite answer the question in the case of an empty string…
>
>
> Well, if you set color to red, than to black and finally write text, you have black text and the red color is ignored.
>
> Greetings
> Christian

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] DyanPDF isColorPage
Date: 06.05.13 19:37 (Mon, 6 May 2013 20:37:32 +0200)
From: Christian Schmitz

Am 06.05.2013 um 20:32 schrieb Peter Truskier <<email address removed>>:

> Hi,
>
> I am wondering whether the function "isColorPage" is designed to take into consideration whether the page will actually contain color marks on the page, or merely whether objects with a nominal color fill or stroke exist on the page.

Well, it's more like, if it says b/w than it is b/w.
If it says true, the page may have colors.

> For example, if a page contains a text object with a red fill color, BUT the contents of that text object is nothing but one or more space characters, will the function return true or false?

Looking on code, it looks like a space will be enough to mark the page as having color.

> The DynaPDF reference says "The function does not return when a color is set, the color must be used by an object.", but this doesn't quite answer the question in the case of an empty string…

Well, if you set color to red, than to black and finally write text, you have black text and the red color is ignored.

Greetings
Christian

-