summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-02-14 18:26:20 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-15 15:05:06 +0000
commit49058400ea8ddf753010dc73e7d381b7a35993ae (patch)
treedc6739a113c88129f6082f7f5ae7d10f99dde727 /public
parent1c467fd5145e7f61ab03b608cf9e9581022b4428 (diff)
downloadpdfium-49058400ea8ddf753010dc73e7d381b7a35993ae.tar.xz
Add public API for adding text with standard fonts
BUG=pdfium:667 Change-Id: I05e301385a7af4b6ce27dc0b885e23646abf3dd9 Reviewed-on: https://pdfium-review.googlesource.com/2711 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index a43d181c81..c8d7a44c8e 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -386,6 +386,26 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
int fillmode,
FPDF_BOOL stroke);
+// Create a new text object using one of the standard PDF fonts.
+//
+// document - handle to the document.
+// font - string containing the font name, without spaces.
+// font_size - the font size for the new text object.
+//
+// Returns a handle to a new text object, or NULL on failure
+DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
+ FPDF_BYTESTRING font,
+ float font_size);
+
+// Set the text for a textobject. If it had text, it will be replaced.
+//
+// text_object - handle to the text object.
+// text - string containing the text to be added.
+//
+// Returns TRUE on success
+DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object,
+ FPDF_BYTESTRING text);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus