ContentReplacer Class |
PDFDoc doc("../../TestFiles/BusinessCardTemplate.pdf"); doc.InitSecurityHandler(); ContentReplacer replacer; Page pg = doc.GetPage(1); Image img = Image::Create(doc, "../../TestFiles/peppers.jpg"); replacer.AddImage(page.GetMediaBox(), img.GetSDFObj()); replacer.AddString("NAME", "John Smith"); replacer.AddString("JOB_TITLE", "Software Developer"); replacer.Process(page);
Namespace: pdftron.PDF
public sealed class ContentReplacer : IClosable
The ContentReplacer type exposes the following members.
Name | Description | |
---|---|---|
![]() | ContentReplacer |
Create a new ContentReplacer object, to which replacement rules will be added.
The same object can be used to 'Process' multiple pages.
|
Name | Description | |
---|---|---|
![]() | AddImage |
Replace the image that best fits 'target_region' with 'replacement_image'.
|
![]() | AddString |
Any text of the form "[template_text]" will be replaced by "replacement_text".
|
![]() | AddText |
All text inside 'target_region' will be deleted and replaced with 'replacement_text'.
|
![]() | Close | |
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | Process | |
![]() | SetMatchStrings |
Change the delimiters from '[' and ']' to arbitary strings.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |