|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packagecom.itextpdf.kernel.utilsas colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.
Creates new empty instance of CompareResult with given limit of difference messages.Class CompareTool.CompareResult, Map@param messageLimit maximum number of difference messages handled by this CompareResult.
Returns map with ObjectPath as keys and difference descriptions as values.Class CompareTool.CompareResult, int getErrorCount()@return differences map which could be used to find in the document objects that are different.
Returns number of differences between two documents met during comparison.Class CompareTool.CompareResult, String getReport()@return number of differences.
Converts this CompareResult into text form.Class CompareTool.CompareResult, boolean isOk()@return text report of the differences between two documents.
Is used to define if documents are considered equal after comparison.Class CompareTool.CompareResult, void writeReportToXml(OutputStream)@return true if documents are equal, false otherwise.
Converts this CompareResult into xml form.@param stream output stream to which xml report will be written. @throws ParserConfigurationException @throws TransformerException
Class that helps to find two corresponding objects in the comparing documents and also keeps track of the already met in comparing process parent indirect objects.
You could say that ObjectPath instance consists of two parts: direct path and indirect path. Direct path definespath to the currently comparing objects in relation to base objects. It could be empty, which would mean thatcurrently comparing objects are base objects themselves. Base objects are the two indirect objects from the comparingdocuments which are in the same position in the pdf trees. Another part, indirect path, defines which indirectobjects were met during comparison process to get to the current base objects. Indirect path is needed to avoidinfinite loops during comparison.
Creates an instance of the ArrayPathItem.Class CompareTool.ObjectPath.ArrayPathItem, int getIndex()@param index the index which defines element of the PdfArray to which the transition was performed.
The index which defines element of the PdfArray to which the transition was performed. See ArrayPathItem for more info.@return the index which defines element of the array to which the transition was performed
Creates an instance of the DictPathItem.Class CompareTool.ObjectPath.DictPathItem, PdfName getKey()@param key the key which defines to which entry of the PdfDictionary the transition was performed.
The key which defines to which entry of the PdfDictionary the transition was performed. See DictPathItem for more info.@return a PdfName which is the key which defines to which entry of the dictionary the transition was performed.
Creates IndirectPathItem instance for two corresponding objects from two comparing documents.@param cmpObject an object from the cmp document. @param outObject an object from the out document.
Creates an xml node that describes this direct path item.@param document xml document, to which this xml node will be added. @return an xml node describing direct path item.
Creates an instance of the OffsetPathItem.Class CompareTool.ObjectPath.OffsetPathItem, int getOffset()@param offset bytes offset to the specific position in PdfStream.
The bytes offset of the stream which defines specific position in the PdfStream, to which transition was performed.@return an integer defining bytes offset to the specific position in stream.
Creates ObjectPath with corresponding base objects in two documents.Class CompareTool.ObjectPath, Stack@param baseCmpObject base object in cmp document. @param baseOutObject base object in out document.
Gets indirect path which denotes sequence of the indirect references that were passed in comparing process to get to the current base objects.Class CompareTool.ObjectPath, Stack@return indirect path to the current base objects.
Gets local (or direct) path that denotes sequence of the path items from base object to the comparing direct object.Class CompareTool.ObjectPath, boolean isComparing(PdfIndirectReference, PdfIndirectReference)@return direct path to the comparing object.
This method is used to define if given objects were already met in the path to the current base objects. If this method returns true it basically means that we found a loop in the objects structure and that we already compared these objects.Class CompareTool.ObjectPath, void pushArrayItemToPath(int)@param cmpObject cmp object to check if it was already met in base objects path. @param outObject out object to check if it was already met in base objects path. @return true if given objects are contained in the path and therefore were already compared.
Adds array item to the direct path. See ArrayPathItem.Class CompareTool.ObjectPath, void pushDictItemToPath(PdfName)@param index index in the array of the direct object to be compared.
Adds dictionary item to the direct path. See DictPathItem.Class CompareTool.ObjectPath, void pushOffsetToPath(int)@param key key in the dictionary to which corresponds direct object to be compared.
Adds offset item to the direct path. See OffsetPathItem.Class CompareTool.ObjectPath, ObjectPath resetDirectPath(PdfIndirectReference, PdfIndirectReference)@param offset offset to the specific byte in the stream that is compared.
Creates a new ObjectPath instance with two new given base objects, which are supposed to be nested in the base objects of the current instance of the ObjectPath. This method is used to avoid infinite loop in case of circular references in pdf documents objects structure.Class CompareTool.ObjectPath, Node toXmlNode(Document)
Basically, this method creates copy of the current ObjectPath instance, but resets information of the direct paths, and also adds current ObjectPath instance base objects to the indirect references chain that denotes a path to the new base objects.@param baseCmpObject new base object in cmp document. @param baseOutObject new base object in out document. @return new ObjectPath instance, which stores chain of the indirect references which were already met to get to the new base objects.
Creates an xml node that describes a direct path stored in this ObjectPath instance.@param document xml document, to which this xml node will be added. @return an xml node describing direct path.
Simple method that compares two given PdfArrays by content. This is "deep" comparing, which means that all nested objects are also compared by content.Class CompareTool, boolean compareBooleans(PdfBoolean, PdfBoolean)@param outArray array to compare. @param cmpArray array to compare. @return true if arrays are equal by content, otherwise false. @throws IOException
Simple method that compares two given PdfBooleans.Class CompareTool, CompareResult compareByCatalog(PdfDocument, PdfDocument)@param outBoolean boolean to compare. @param cmpBoolean boolean to compare. @return true if booleans are equal, otherwise false.
Compares two PDF documents by content starting from Catalog dictionary and then recursively comparing corresponding objects which are referenced from it. You can roughly imagine it as depth-first traversal of the two trees that represent pdf objects structure of the documents.Class CompareTool, boolean compareDictionaries(PdfDictionary, PdfDictionary)
The main difference between this method and the .compareByContent(String, String, String, String) methods is the return value. This method returns a CompareResult class instance, which could be used in code, however compareByContent methods in case of the differences simply return String value, which could only be printed. Also, keep in mind that this method doesn't perform visual comparison of the documents.
For more explanations about what is outDoc and cmpDoc see last paragraph of the CompareTool class description.@param outDocument the absolute path to the output file, which is to be compared to cmp-file. @param cmpDocument the absolute path to the cmp-file, which is to be compared to output file. @return the report of comparison of two files in the form of the custom class instance. See CompareResult for more info. @throws IOException
Simple method that compares two given PdfDictionaries by content. This is "deep" comparing, which means that all nested objects are also compared by content.Class CompareTool, String compareDocumentInfo(String, String)@param outDict dictionary to compare. @param cmpDict dictionary to compare. @return true if dictionaries are equal by content, otherwise false. @throws IOException
Compares document info dictionaries of two pdf documents.Class CompareTool, String compareDocumentInfo(String, String, byte[], byte[])@param outPdf the absolute path to the output file, which info is to be compared to cmp-file info. @param cmpPdf the absolute path to the cmp-file, which info is to be compared to output file info. @return text report of the differences in documents infos. @throws IOException
This method overload is used to compare two encrypted PDF documents. Document passwords are passed with outPass and cmpPass parameters.Class CompareTool, String compareLinkAnnotations(String, String)
Compares document info dictionaries of two pdf documents.@param outPdf the absolute path to the output file, which info is to be compared to cmp-file info. @param cmpPdf the absolute path to the cmp-file, which info is to be compared to output file info. @param outPass password for the encrypted document specified by the outPdf absolute path. @param cmpPass password for the encrypted document specified by the cmpPdf absolute path. @return text report of the differences in documents infos. @throws IOException
Compares if two documents has identical link annotations on corresponding pages.Class CompareTool, boolean compareNames(PdfName, PdfName)@param outPdf the absolute path to the output file, which links are to be compared to cmp-file links. @param cmpPdf the absolute path to the cmp-file, which links are to be compared to output file links. @return text report of the differences in documents links. @throws IOException
Simple method that compares two given PdfNames.Class CompareTool, boolean compareNumbers(PdfNumber, PdfNumber)@param outName name to compare. @param cmpName name to compare. @return true if names are equal, otherwise false.
Simple method that compares two given PdfNumbers.Class CompareTool, boolean compareStreams(PdfStream, PdfStream)@param outNumber number to compare. @param cmpNumber number to compare. @return true if numbers are equal, otherwise false.
Simple method that compares two given PdfStreams by content. This is "deep" comparing, which means that all nested objects are also compared by content.Class CompareTool, boolean compareStrings(PdfString, PdfString)@param outStream stream to compare. @param cmpStream stream to compare. @return true if stream are equal by content, otherwise false. @throws IOException
Simple method that compares two given PdfStrings.Class CompareTool, String compareTagStructures(String, String)@param outString string to compare. @param cmpString string to compare. @return true if strings are equal, otherwise false.
Compares tag structures of the two PDF documents.Class CompareTool, String compareVisually(String, String, String, String)
This method creates xml files in the same folder with outPdf file. These xml files contain documents tag structures converted into the xml structure. These xml files are compared if they are equal.@param outPdf the absolute path to the output file, which tags are to be compared to cmp-file tags. @param cmpPdf the absolute path to the cmp-file, which tags are to be compared to output file tags. @return text report of the differences in documents tags. @throws IOException @throws ParserConfigurationException @throws SAXException
Compares two documents visually. For the comparison two external tools are used: Ghostscript and ImageMagick. For more info about needed configuration for visual comparison process see CompareTool class description.Class CompareTool, String compareVisually(String, String, String, String, Map
During comparison for every page of two documents an image file will be created in the folder specified by outPath absolute path. Then those page images will be compared and if there are any differences for some pages, another image file will be created with marked differences on it.@param outPdf the absolute path to the output file, which is to be compared to cmp-file. @param cmpPdf the absolute path to the cmp-file, which is to be compared to output file. @param outPath the absolute path to the folder, which will be used to store image files for visual comparison. @param differenceImagePrefix file name prefix for image files with marked differences if there is any. @return string containing list of the pages that are visually different, or null if there are no visual differences. @throws InterruptedException @throws IOException
Compares two documents visually. For the comparison two external tools are used: Ghostscript and ImageMagick. For more info about needed configuration for visual comparison process see CompareTool class description.Class CompareTool, boolean compareXmls(String, String)
During comparison for every page of two documents an image file will be created in the folder specified by outPath absolute path. Then those page images will be compared and if there are any differences for some pages, another image file will be created with marked differences on it.
It is possible to ignore certain areas of the document pages during visual comparison. This is useful for example in case if documents should be the same except certain page area with date on it. In this case, in the folder specified by the outPath, new pdf documents will be created with the black rectangles at the specified ignored areas, and visual comparison will be performed on these new documents.@param outPdf the absolute path to the output file, which is to be compared to cmp-file. @param cmpPdf the absolute path to the cmp-file, which is to be compared to output file. @param outPath the absolute path to the folder, which will be used to store image files for visual comparison. @param differenceImagePrefix file name prefix for image files with marked differences if there is any. @param ignoredAreas a map with one-based page numbers as keys and lists of ignored rectangles as values. @return string containing list of the pages that are visually different, or null if there are no visual differences. @throws InterruptedException @throws IOException
Utility method that provides simple comparison of the two xml files.Class CompareTool, boolean compareXmls(byte[], byte[])@param xmlFilePath1 absolute path to the first xml file to compare. @param xmlFilePath2 absolute path to the second xml file to compare. @return true if xml structures are identical, false otherwise. @throws ParserConfigurationException @throws SAXException @throws IOException
Utility method that provides simple comparison of the two xml files stored in byte arrays.Class CompareTool, String compareXmp(String, String)@param xml1 first xml file data to compare. @param xml2 second xml file data to compare. @return true if xml structures are identical, false otherwise. @throws ParserConfigurationException @throws SAXException @throws IOException
Compares xmp metadata of the two given PDF documents.Class CompareTool, String compareXmp(String, String, boolean)@param outPdf the absolute path to the output file, which xmp is to be compared to cmp-file. @param cmpPdf the absolute path to the cmp-file, which xmp is to be compared to output file. @return text report of the xmp differences, or null if there are no differences.
Compares xmp metadata of the two given PDF documents.Class CompareTool, CompareTool disableCachedPagesComparison()@param outPdf the absolute path to the output file, which xmp is to be compared to cmp-file. @param cmpPdf the absolute path to the cmp-file, which xmp is to be compared to output file. @param ignoreDateAndProducerProperties true, if to ignore differences in date or producer xmp metadata properties. @return text report of the xmp differences, or null if there are no differences.
Disables the default logic of pages comparison. This option makes sense only for CompareTool.compareByCatalog(PdfDocument, PdfDocument) method.Class CompareTool, CompareTool enableEncryptionCompare()By default, pages are treated as special objects and if they are met in the process of comparison, then they are not checked as objects, but rather simply checked that they has same page numbers in both documents. This behaviour is intended for the CompareTool.compareByContent set of methods, because in them documents are compared in page by page basis. Thus, we don't need to check if pages are of the same content when they are met in comparison process, we are sure that we will compare their content or we have already compared them.
However, if you would use CompareTool.compareByCatalog with default behaviour of pages comparison, pages won't be checked at all, every time when reference to the page dictionary is met, only page numbers will be compared for both documents. You can say that in this case, comparison will be performed for all document's catalog entries except /Pages (However in fact, document's page tree structures will be compared, but pages themselves - won't).
@return this CompareTool instance.
Enables the comparison of the encryption properties of the documents. Encryption properties comparison results are returned along with all other comparison results.Class CompareTool, ReaderProperties getCmpReaderProperties()
IMPORTANT NOTE: this flag affect only the comparison made by compareByContent methods!@return this CompareTool instance.
Documents for comparison are opened in reader mode. This method is intended to alter ReaderProperties which are used to open cmp document. This is particularly useful for comparison of encrypted documents.Class CompareTool, ReaderProperties getOutReaderProperties()For more explanations about what is outDoc and cmpDoc see last paragraph of the CompareTool class description.
@return ReaderProperties instance which will be later passed to the cmp document PdfReader.
Documents for comparison are opened in reader mode. This method is intended to alter ReaderProperties which are used to open output document. This is particularly useful for comparison of encrypted documents.Class CompareTool, CompareTool setCompareByContentErrorsLimit(int)For more explanations about what is outDoc and cmpDoc see last paragraph of the CompareTool class description.
@return ReaderProperties instance which will be later passed to the output document PdfReader.
Sets the maximum errors count which will be returned as the result of the comparison.Class CompareTool, CompareTool setGenerateCompareByContentXmlReport(boolean)@param compareByContentMaxErrorCount the errors count. @return this CompareTool instance.
Enables or disables the generation of the comparison report in the form of the xml document.
IMPORTANT NOTE: this flag affect only the comparison made by compareByContent methods!@param generateCompareByContentXmlReport true to enable xml report generation, false - to disable. @return this CompareTool instance.