Top Fields Constructors Methods
org.apache.pdfbox.preflight.utils

public final Class FilterHelper

extends Object
Class Inheritance
Imports
java.util.HashSet, .Set, org.apache.pdfbox.preflight.PreflightContext, .PreflightDocument, .ValidationResult.ValidationError

Field Summary

Modifier and TypeField and Description
private static final Set<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
isAuthorizedFilter(PreflightContext
the preflight context
context
,
String
the filter to check
filter
)

This method checks if the filter is authorized for the PDF file according to the preflight document specification attribute.

public static void
isAuthorizedFilterInPDFA(PreflightContext
the preflight context
context
,
String
the filter to check
filter
)

This method checks if the filter is authorized for a PDF/A file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALLOWED_FILTERSback to summary
private static final Set<String> ALLOWED_FILTERS

Constructor Detail

FilterHelperback to summary
private FilterHelper()

Method Detail

isAuthorizedFilterback to summary
public static void isAuthorizedFilter(PreflightContext context, String filter)

This method checks if the filter is authorized for the PDF file according to the preflight document specification attribute. For example according to the PDF/A-1 specification, only the LZW filter is forbidden due to Copyright compatibility. Because of the PDF/A is based on the PDF1.4 specification, all filters that aren't declared in the PDF Reference Third Edition are rejected.

Parameters
context:PreflightContext

the preflight context

filter:String

the filter to check

isAuthorizedFilterInPDFAback to summary
public static void isAuthorizedFilterInPDFA(PreflightContext context, String filter)

This method checks if the filter is authorized for a PDF/A file. According to the PDF/A-1 specification, only the LZW filter is forbidden due to Copyright compatibility. Because of the PDF/A is based on the PDF1.4 specification, all filters that aren't declared in the PDF Reference Third Edition are rejected.

Parameters
context:PreflightContext

the preflight context

filter:String

the filter to check