Modifier and Type | Field and Description |
---|---|
protected Deque<PDFont> |
PDAbstractContentStream.fontStack |
Modifier and Type | Method and Description |
---|---|
void |
PDDocument.addFontToSubset(PDFont font)
add the font to be subset
|
void |
PDAbstractContentStream.setFont(PDFont font,
float fontSize)
Set the font and font size to draw text with.
|
Modifier and Type | Field and Description |
---|---|
protected Map<String,PDFont> |
Context.fontMap
字体字典
|
Modifier and Type | Method and Description |
---|---|
PDFont |
Document.getFont()
获取字体
|
PDFont |
Page.getFont()
获取字体
|
PDFont |
Context.getFont(String fontName)
获取字体
|
Modifier and Type | Method and Description |
---|---|
PDFont |
TextareaWatermark.getFont()
获取字体
|
PDFont |
Textarea.getFont()
获取字体
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
TextHandler.processDouble(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Character character,
Character next,
List<String> specialFontNames,
PDFont font,
Float fontSize)
处理双字符
|
protected boolean |
TextHandler.processSingle(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Character character,
List<String> specialFontNames,
PDFont font,
Float fontSize)
处理单字符
|
Modifier and Type | Method and Description |
---|---|
protected String |
CommentProcessor.initDefaultStyleString(PDFont font,
Float fontSize,
Color fontColor)
初始化默认样式
|
void |
ReplaceProcessor.replaceText(PDFont font,
Map<String,String> replaceMap,
int... pageIndexes)
替换文本
|
protected void |
ReplaceProcessor.replaceText(org.apache.pdfbox.pdmodel.PDPage page,
PDFont font,
Map<String,String> replaceMap)
替换文本
|
Modifier and Type | Method and Description |
---|---|
protected String |
FormProcessor.createDefaultAppearance(PDFont font)
创建默认样式字符串
|
Modifier and Type | Method and Description |
---|---|
PDFont |
FontHandler.getPDFont(PDDocument document,
String fontName)
获取pdfbox字体
|
PDFont |
FontHandler.getPDFont(PDDocument document,
String fontName,
boolean embedSubset)
获取pdfbox字体
|
Modifier and Type | Method and Description |
---|---|
void |
FontHandler.addToSubset(PDDocument document,
PDFont font,
String text)
添加文本关联
|
Modifier and Type | Field and Description |
---|---|
protected PDFont |
DefaultFreeTextAppearanceHandler.font
字体
|
Modifier and Type | Method and Description |
---|---|
protected PDFont |
DefaultFreeTextAppearanceHandler.getDefaultFont()
获取默认字体
|
PDFont |
DefaultResourceCache.getFont(org.apache.pdfbox.cos.COSObject indirect) |
Modifier and Type | Method and Description |
---|---|
void |
DefaultResourceCache.put(org.apache.pdfbox.cos.COSObject indirect,
PDFont font) |
Constructor and Description |
---|
DefaultFreeTextAppearanceHandler(Document document,
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation annotation,
PDFont font)
有参构造
|
Modifier and Type | Method and Description |
---|---|
static Map<org.apache.pdfbox.cos.COSName,PDFont> |
TextTokenUtil.initResourceFontMap(org.apache.pdfbox.pdmodel.PDResources resources)
初始化资源字体字典
|
Modifier and Type | Method and Description |
---|---|
static String |
TextTokenUtil.getTextForToken(Object token,
PDFont font)
获取文本
|
static float |
TextUtil.getTextRealWidth(Context context,
String text,
PDFont font,
float fontSize,
float characterSpacing,
List<String> specialFontNames)
获取文本真实宽度
|
static void |
TextTokenUtil.joinString(StringBuilder builder,
Object token,
PDFont font)
拼接字符串
|
static void |
TextTokenUtil.processNotSameLengthReplaceText(PDDocument document,
org.apache.pdfbox.pdmodel.PDResources resources,
PDFont font,
TextTokenInfo info,
String replaceText)
处理不同长度替换文本
|
static void |
TextTokenUtil.processReplaceText(PDDocument document,
org.apache.pdfbox.pdmodel.PDResources resources,
PDFont font,
Object token,
String value)
处理替换文本
|
static void |
TextTokenUtil.processSameLengthReplaceText(PDDocument document,
org.apache.pdfbox.pdmodel.PDResources resources,
PDFont font,
TextTokenInfo info,
String replaceText)
处理相同长度替换文本
|
static boolean |
TextTokenUtil.replaceTextForToken(org.apache.commons.logging.Log log,
PDDocument document,
org.apache.pdfbox.pdmodel.PDResources resources,
List<Object> tokens,
PDFont font,
Map<String,String> replaceMap)
替换文本
|
static List<String> |
TextUtil.splitLines(Context context,
String text,
float lineWidth,
PDFont font,
float fontSize,
float characterSpacing,
List<String> specialFontNames)
拆分文本段落(换行)
|
static String |
TextUtil.splitText(Context context,
String text,
float lineWidth,
PDFont font,
float fontSize,
float characterSpacing,
List<String> specialFontNames)
拆分文本(单行)
|
static boolean |
TextTokenUtil.tryReplaceTextForNormal(org.apache.commons.logging.Log log,
PDDocument document,
org.apache.pdfbox.pdmodel.PDResources resources,
List<Object> tokens,
PDFont font,
Map<String,String> replaceMap)
尝试替换正常文本
|
static boolean |
TextTokenUtil.tryReplaceTextForSpecial(org.apache.commons.logging.Log log,
PDDocument document,
org.apache.pdfbox.pdmodel.PDResources resources,
List<Object> tokens,
PDFont font,
Map<String,String> replaceMap)
尝试替换特殊文本
|
static void |
TextUtil.writeText(Context context,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
String text,
List<String> specialFontNames,
PDFont font,
Float fontSize)
写入文本
|
Copyright © 2024. All rights reserved.