public class TextHandler extends AbstractTextHandler
Copyright (c) 2020-2024 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
document, log
Constructor and Description |
---|
TextHandler(Document document)
有参构造
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
processDouble(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Character character,
Character next,
List<String> specialFontNames,
PDFont font,
Float fontSize)
处理双字符
|
protected boolean |
processSingle(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Character character,
List<String> specialFontNames,
PDFont font,
Float fontSize)
处理单字符
|
void |
writeText(FontConfiguration fontConfiguration,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
TextLineInfo text)
写入文本
|
getContext, getTextHeight, getTextWidth, splitLines, splitText
getDocument
public TextHandler(Document document)
document
- 文档public void writeText(FontConfiguration fontConfiguration, org.apache.pdfbox.pdmodel.PDPageContentStream contentStream, TextLineInfo text)
writeText
in class AbstractTextHandler
fontConfiguration
- 字体配置contentStream
- 内容流text
- 文本protected boolean processSingle(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream, Character character, List<String> specialFontNames, PDFont font, Float fontSize)
contentStream
- 内容流character
- 字符specialFontNames
- 特殊字体名称font
- 字体fontSize
- 字体大小protected boolean processDouble(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream, Character character, Character next, List<String> specialFontNames, PDFont font, Float fontSize)
contentStream
- 内容流character
- 字符next
- 下一个字符specialFontNames
- 特殊字体名称font
- 字体fontSize
- 字体大小Copyright © 2024. All rights reserved.