Rank: Member
Groups: Registered
Joined: 4/15/2018(UTC) Posts: 24   Location: Sydney Thanks: 2 times
|
Hi We're trying to create some text and insert it into a document, which is displayed in the WPF viewer. I've been able to create a text string and add it to the document at the X, Y. But it doesn't persist in the document. If you scroll a few pages away the come back, it disappears. It also doesn't get saved with the document. I've been looking through past posts and there doesn't seem to be much I can find to help with this. Could you please provide some assistance in how we can get this to happen? Trying to add annotations similar to what is accomplished in Acrobat. The text should be persisted over any viewer, I'm hoping. The code below is what I've done that seems to add the text in (still not sure about the Viewer.Invalidate* methods either, is this correct?). Thanks for your help! Code:
var obj = PdfTextObject.Create(Text, X, Y, Font, FontSize);
obj.FillColor = Color.BlueViolet;
obj.StrokeColor = Color.BlueViolet;
Page.PageObjects.Add(obj);
Viewer.InvalidateMeasure();
Viewer.InvalidateVisual();
Viewer.UpdateDocLayout();
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
|
 1 user thanked Paul Rayman for this useful post.
|
|
|
|
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close