Page 1 of 1
Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Thu Feb 15, 2024 4:23 pm
by zarkogajic
Hi Support,
I'm playing with the op.document.replaceFonts ...
I had a crazy idea of specifying: I only want to change fonts "inside" the bottom half of a page (or pages).
I've tried specifying the "Custom" and the "CustomRect" values - but nothing happens - no changes to the document.
This, I guess means, op.document.replaceFonts ignores PagesRange's Custom/CustomRect values (i.e. is not implemented)?
p.s.
I can do the change on all pages, page range, etc ... I would really want to specify a rectangle (on a page) where the operation would do its magical work ....
-žarko
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Tue Feb 27, 2024 2:02 am
by Vasyl - PDF-XChange
Hi Zarko.
You are right, it is not implemented yet.
But seems the idea isn't too crazy and we will make a feature request to do it in the future.
Cheers.
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Wed Feb 28, 2024 11:21 am
by zarkogajic
Hi Vasyl,
But seems the idea isn't too crazy and we will make a feature request to do it in the future.

Wohoo
Am actually looking into being possible to do the following:
image.png
So, specify (in this sample 4) custom rectangles on a page and have the magic do its work ...
-žarko
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Thu Feb 29, 2024 4:34 am
by Vasyl - PDF-XChange
It will not be so difficult to change just the color of the selected fragments of text. As shown in your screenshot.
But it will be incredibly difficult to change the font for text-fragments exactly and only covered by the selection rectangle. Because when you change font - it may (will) reflow the other text in the text block.
If you want only to change the color of text - maybe it can be implemented as a separate feature, like HighlightText tool, but it will change the color of the selected text instead of adding the highlight-comment to it.
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Thu Feb 29, 2024 6:16 am
by zarkogajic
Hi Vasyl,
Yes, I only need color changing (keep font type/size..).
-žarko
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Tue Apr 30, 2024 10:16 am
by zarkogajic
Hi Support,
Any movements here regarding the suggested improvement?
-žarko
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Tue Apr 30, 2024 10:55 am
by Stefan - PDF-XChange
Hello zarkogajic,
I did ask Vasyl if he wants a ticket, but have not heard back. I will ask him now if that found it's way in 386, and if not what further steps he would like us to take!
Kind regards,
Stefan
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Tue Apr 30, 2024 11:46 am
by zarkogajic
Hi Stefan
Ok, thanks ...
-žarko
Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Tue Apr 30, 2024 12:01 pm
by Stefan - PDF-XChange
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Fri May 03, 2024 6:06 am
by Vasyl - PDF-XChange
Hi Zarko.
We had a conversation with our devs and found that using the ReplaceFonts operation in current implementation - is the wrong way to proceed in your case. Because when you have two or more rectangles to change text-color inside all of them, when you try to process such rectangles one by one, literally on the first or second rectangle, after using the ReplaceFonts on it - the text on the page might be slightly repositioned (or even reflowed in the worst case). So the following rectangles might quickly lose their 'relationship' with the original text...
Maybe in the future, especially for cases when ReplaceFonts is used only to replace text-colors - we will use another method that will not cause such text fluctuations...
Cheers.
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect SOLVED
Posted: Fri May 03, 2024 6:29 am
by zarkogajic
Hi Vasyl,
Ok, thanks.
What I'm really up to, you might remember, is something else: (still) looking how to change the text color "behind" link annotation.
-žarko
Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Fri May 03, 2024 10:31 am
by Stefan - PDF-XChange
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Wed Sep 04, 2024 10:05 pm
by Paul - PDF-XChange
Hi, Zarko,
today I received notification that ticket RT#6793: FR: Adding IOperation PagesRange.RangeTypes Custom and CustomRect has made it's way into the next build.
Please test it in 10.4.0.390 when it is available next week.
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Wed Sep 11, 2024 3:01 pm
by zarkogajic
Hi Paul,
Woohoooo works like a charm!!
Thanks for implementing!
-žarko
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Fri Sep 13, 2024 1:56 pm
by zarkogajic
Hi Support,
Actually I think I've found a bug behavior.
I have an OCR'ed document where trying to replace fonts (IOperation) in some sections of the document would end up with "The parameter is incorrect". Tested with EU Editor (selected the same section) same issue.
I'll send you the document....
p.s.
I thought it was related to this (but was wrong):
viewtopic.php?t=43806
-žarko
Re: Some IOperation PagesRange.RangeTypes Custom and CustomRect
Posted: Fri Sep 13, 2024 9:26 pm
by Paul - PDF-XChange
Hi, zarkogajic
the devs are looking into it now.
