public class Document extends Object implements DocumentComponent
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-fop is licensed under the 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.
Constructor and Description |
---|
Document() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transform
public Document setConfigPath(String configPath)
configPath
- 配置文件路径public Document setEncryptionLength(Integer length)
注:长度仅为40、128、256
length
- 长度public Document setOwnerPassword(String password)
password
- 密码public Document setUserPassword(String password)
password
- 密码public Document setIsNoPrint(Boolean flag)
flag
- 是否禁止打印public Document setIsNoEdit(Boolean flag)
flag
- 是否禁止编辑public Document setIsNoAssembleDoc(Boolean flag)
flag
- 是否禁止文档组合public Document setIsNoCopy(Boolean flag)
flag
- 是否禁止复制public Document setIsNoAccessContent(Boolean flag)
flag
- 是否禁止复制内容用于辅助工具public Document setIsNoPrintHQ(Boolean flag)
flag
- 是否禁止页面提取public Document setIsNoAnnotations(Boolean flag)
flag
- 是否禁止注释public Document setIsNoFillForm(Boolean flag)
flag
- 是否禁止填写表单public Document setSubject(String subject)
subject
- 主题public Document setKeywords(String keywords)
keywords
- 关键词public Document setCreator(String creator)
creator
- 创建者public Document setCreationDate(Date date)
date
- 创建时间public Document addPage(PageComponent... pages)
注:不推荐添加多个页面,会影响总页码的准确性
pages
- 页面组件列表public Document addBookmark(BookmarkComponent... bookmarks)
bookmarks
- 书签组件列表public Document addBookmark(List<BookmarkComponent> bookmarks)
bookmarks
- 书签组件列表public void save(String path)
path
- 保存路径public void save(OutputStream outputStream)
outputStream
- 输出流public Document transform()
public void transform(OutputStream outputStream)
transform
in interface DocumentComponent
outputStream
- 输出流public Document getDocument()
getDocument
in interface DocumentComponent
public String getContent()
public Integer getTotalPage()
Copyright © 2025. All rights reserved.