本文整理匯總了Java中com.itextpdf.text.pdf.PdfWriter.ALLOW_PRINTING屬性的典型用法代碼示例。如果您正苦於以下問題:Java PdfWriter.ALLOW_PRINTING屬性的具體用法?Java PdfWriter.ALLOW_PRINTING怎麽用?Java PdfWriter.ALLOW_PRINTING使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.itextpdf.text.pdf.PdfWriter
的用法示例。
在下文中一共展示了PdfWriter.ALLOW_PRINTING屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildPermissionMask
/**
* Build the permissions mask for iText
*
* @param options
* @return
*/
private int buildPermissionMask(Map<String, Object> options)
{
int permissions = 0;
if ((Boolean)options.get(PARAM_ALLOW_PRINT))
{
permissions = permissions | PdfWriter.ALLOW_PRINTING;
}
if ((Boolean)options.get(PARAM_ALLOW_COPY))
{
permissions = permissions | PdfWriter.ALLOW_COPY;
}
if ((Boolean)options.get(PARAM_ALLOW_CONTENT_MODIFICATION))
{
permissions = permissions | PdfWriter.ALLOW_MODIFY_CONTENTS;
}
if ((Boolean)options.get(PARAM_ALLOW_ANNOTATION_MODIFICATION))
{
permissions = permissions | PdfWriter.ALLOW_MODIFY_ANNOTATIONS;
}
if ((Boolean)options.get(PARAM_ALLOW_SCREEN_READER))
{
permissions = permissions | PdfWriter.ALLOW_SCREENREADERS;
}
if ((Boolean)options.get(PARAM_ALLOW_DEGRADED_PRINT))
{
permissions = permissions | PdfWriter.ALLOW_DEGRADED_PRINTING;
}
if ((Boolean)options.get(PARAM_ALLOW_ASSEMBLY))
{
permissions = permissions | PdfWriter.ALLOW_ASSEMBLY;
}
if ((Boolean)options.get(PARAM_ALLOW_FORM_FILL))
{
permissions = permissions | PdfWriter.ALLOW_FILL_IN;
}
return permissions;
}
示例2: getViewerPreferences
protected int getViewerPreferences() {
return PdfWriter.ALLOW_PRINTING | PdfWriter.PageLayoutSinglePage;
}
示例3: getViewerPreferences
protected int getViewerPreferences() {
return PdfWriter.ALLOW_PRINTING | PdfWriter.PageLayoutSinglePage;
}