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.
| 构造器和说明 |
|---|
Document() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittransformpublic 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 setIsNewLayout(boolean flag)
public Document setIsNoAssembleDoc(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 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 在接口中 DocumentComponentoutputStream - 输出流public Document getDocument()
getDocument 在接口中 DocumentComponentpublic String getContent()
public Integer getTotalPage()
Copyright © 2025. All rights reserved.