Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Selecting hidden text.

New Here ,
Jul 07, 2008 Jul 07, 2008

Copy link to clipboard

Copied

Hi,
I have a question regarding fdk 8.0. How do I go about selecting hidden text in a document? F_ApiSetTextRange will not select a hidden text range, is there an another function I can use to select text from the hidden page of a document?

Kind Regards.

Views

368
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 07, 2008 Jul 07, 2008

Copy link to clipboard

Copied

Hi Jim (Nabors?),

This is an unusual request. How do you know that the text is not selected, when you can't see the page? Are you actually trying to do something else, like cut and paste or something?

The FDK ref implies that you can get the hidden page ID with FP_HiddenPage and then drill down to the first paragraph, but I must say that it seems like a very tricky proposition to manipulate text there. Even if it is possible, it would be not much fun to test and debug. There are important conditional markers on that page that delimit the hidden "chunks" and I bet it would be higgly-piggly if you messed those up.

Russ

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2008 Jul 07, 2008

Copy link to clipboard

Copied

Hi Russ,
To answer your questions, I know the text isn't selected using the Errno variable. I was playing with the cut, paste options using the hidden page. I'm a bit confused as to how I could possibly go about manipulating conditional, hidden text using the api. There seems to be some scope for cutting/pasting hidden text but the docs are unclear as to how to go about this or if it is even advisable to do so. I am also slightly confused as to how accessible the hidden page/hidden flow is (though by your response it may be unwise to manipulate it at all). I am writing a small program to manipulate conditionals using the api, so am interested to learn the limitations of the api in this respect. Thanks for your input.

J

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2008 Jul 07, 2008

Copy link to clipboard

Copied

I'd probably "show" the conditional text .. do the manipulations, then hide it. I'm with Russ on this, working with content on a hidden page seems fraught with danger.

...scott

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 08, 2008 Jul 08, 2008

Copy link to clipboard

Copied

Jim,

I haven't done this before, so it is just a guess, but I'd think you could get the first paragraph on the hidden page as follows. I didn't test this. Of course, getting the first paragraph ID is only a small part of the battle. I think the real challenge would be using it to navigate the invisible page and set up the F_TextLoc structures.

1 - Get the hidden page ID

pageId = F_ApiGetId(FV_SessionId, docId, FP_HiddenPage);

2 - Get the page frame

frameId = F_ApiGetId(docId, pageId, FP_PageFrame);

3- Maybe iterate over child frames to find the text frame. I don't know if this is necessary. In any case, once you have a paragraph, you should have the correct frame.

if(F_ApiGetId(docId, frameId, FP_FirstGraphicInFrame))
frameId = F_ApiGetId(docId, frameId, FP_FirstGraphicInFrame);
while(frameId)
{
if(F_ApiGetId(docId, frameId, FP_FirstPgf)) break;
else frameId = F_ApiGetId(docId, frameId, FP_NextGraphicInFrame);
}

pgfId = F_ApiGetId(docId, frameId, FP_FirstPgf);

Russ

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2008 Jul 09, 2008

Copy link to clipboard

Copied

LATEST
Hi Scott and Russ,
Thanks for your replies, I was originally showing the conditional text in order to move it but as doing this changes the uid of the text in question it is not ideal for my purposes (this is the main reason I am attempting to select the hidden text explicitly). Thanks to both of you for your help, I'm lookign into Russ's method at the minute.

Thanks again,
Jim

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines