logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
Paul Rayman Posted: Tuesday, June 26, 2018 8:23:58 AM(UTC)
 
Hi,

You should call page.GenerateContent();
Please look at this example
https://forum.patagames....F-document--using-Pdfium
matt.smokeball Posted: Friday, June 22, 2018 2:07:28 AM(UTC)
 
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();