Rank: Newbie
Groups: Registered
Joined: 1/6/2016(UTC) Posts: 2  Location: ?New Jersey
|
The PdfTextObject does not have a setter - how do I accomplish this Edited by user Wednesday, January 6, 2016 2:11:18 PM(UTC)
| Reason: Not specified
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
Please look at example below: Code:
//Create new text object with stock font
var to = PdfTextObject.Create();
to.Font = PdfFont.CreateStock(pdfViewer1.Document, FontStockNames.Arial);
//Set text to TextObject
to.TextUnicode = "Sample text";
//Scale text object with scale factor = 50
to.Transform(50, 0, 0, 50, 0, 0);
//Set object location in page coordinates
to.Location = new PointF(100, 100);
//Set object color
to.StrokeColor = Color.Black;
//Insert object to a page
Document.Pages[0].PageObjects.InsertObject(to);
Please take a note, the pdfium is more a viewer than an editor and original engine has no functionality for working with text objects. Unfortunately at the moment we can't save changes made in the text objects to the file, but the changes will be seen in the viewer, and they can be sended to the printer.
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
|
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot 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