Get Content of Pgf
Hello again!
So my issue today goes as follows:
I have formatted text in my document which I want to
1. Catch it
2. Write the text to the end of the previous paragraph
3. Delete the original pgf
So here is what I have so far:
//MOVE + DELETE NOTE TEXTS
function MoveNoteText(doc)
{
for(var i = 0; i < countNT; i++){
var note = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
while (note.ObjectValid()) {
if (note.Name == "Geschenk" || note.Name == "Achtung" || note.Name == "Hinweis") {
pgf = note.PrevPgfInFlow;
tl = new TextLoc(pgf, Constants.FV_OBJ_END_OFFSET-1);
doc.AddText(tl, "PLACEHOLDER-TEXT-ICON");
note.Delete();
}
else if(note.Name == "Hinweis_text") {
text = Content of Paragraph should be caught here
pgf = note.PrevPgfInFlow;
tl = new TextLoc(pgf, Constants.FV_OBJ_END_OFFSET-1);
doc.AddText(tl, text);
note.Delete();
}
note = note.NextPgfInFlow;
}
}
}I am stuck at the point on which I want to get the text inside the pgf (if "Hinweis_text") ... Dont know how to do that. I kind of found out how to get the Text Items:
text = note.GetText(-1); //To get all TI
But how can I fetch the text?
Thanks in advance!
