├── .openlogic.yaml
├── README
├── ant
├── .ant.properties
├── .ant.test.properties
├── compile.xml
├── pom.xml
├── release.xml
└── site.xml
├── build.xml
├── core
└── com
│ └── lowagie
│ ├── text
│ ├── Anchor.java
│ ├── Annotation.java
│ ├── BadElementException.java
│ ├── Cell.java
│ ├── Chapter.java
│ ├── ChapterAutoNumber.java
│ ├── Chunk.java
│ ├── DocListener.java
│ ├── DocWriter.java
│ ├── Document.java
│ ├── DocumentException.java
│ ├── Element.java
│ ├── ElementListener.java
│ ├── ElementTags.java
│ ├── ExceptionConverter.java
│ ├── Font.java
│ ├── FontFactory.java
│ ├── FontFactoryImp.java
│ ├── GreekList.java
│ ├── Header.java
│ ├── HeaderFooter.java
│ ├── Image.java
│ ├── ImgCCITT.java
│ ├── ImgJBIG2.java
│ ├── ImgRaw.java
│ ├── ImgTemplate.java
│ ├── ImgWMF.java
│ ├── Jpeg.java
│ ├── Jpeg2000.java
│ ├── LargeElement.java
│ ├── List.java
│ ├── ListItem.java
│ ├── MPL-1.1.txt
│ ├── MarkedObject.java
│ ├── MarkedSection.java
│ ├── Meta.java
│ ├── PageSize.java
│ ├── Paragraph.java
│ ├── Phrase.java
│ ├── Rectangle.java
│ ├── RectangleReadOnly.java
│ ├── RomanList.java
│ ├── Row.java
│ ├── RtfElementInterface.java
│ ├── Section.java
│ ├── SimpleCell.java
│ ├── SimpleTable.java
│ ├── SpecialSymbol.java
│ ├── SplitCharacter.java
│ ├── Table.java
│ ├── TextElementArray.java
│ ├── Utilities.java
│ ├── ZapfDingbatsList.java
│ ├── ZapfDingbatsNumberList.java
│ ├── apache_license.txt
│ ├── exceptions
│ │ ├── BadPasswordException.java
│ │ ├── IllegalPdfSyntaxException.java
│ │ ├── InvalidPdfException.java
│ │ └── UnsupportedPdfException.java
│ ├── factories
│ │ ├── ElementFactory.java
│ │ ├── GreekAlphabetFactory.java
│ │ ├── RomanAlphabetFactory.java
│ │ └── RomanNumberFactory.java
│ ├── html
│ │ ├── HtmlEncoder.java
│ │ ├── HtmlParser.java
│ │ ├── HtmlPeer.java
│ │ ├── HtmlTagMap.java
│ │ ├── HtmlTags.java
│ │ ├── HtmlWriter.java
│ │ ├── Markup.java
│ │ ├── SAXmyHtmlHandler.java
│ │ ├── WebColors.java
│ │ └── simpleparser
│ │ │ ├── ALink.java
│ │ │ ├── ChainedProperties.java
│ │ │ ├── FactoryProperties.java
│ │ │ ├── HTMLWorker.java
│ │ │ ├── ImageProvider.java
│ │ │ ├── Img.java
│ │ │ ├── IncCell.java
│ │ │ ├── IncTable.java
│ │ │ └── StyleSheet.java
│ ├── lgpl.txt
│ ├── misc_licenses.txt
│ ├── pdf
│ │ ├── AcroFields.java
│ │ ├── ArabicLigaturizer.java
│ │ ├── AsianFontMapper.java
│ │ ├── BadPdfFormatException.java
│ │ ├── Barcode.java
│ │ ├── Barcode128.java
│ │ ├── Barcode39.java
│ │ ├── BarcodeCodabar.java
│ │ ├── BarcodeDatamatrix.java
│ │ ├── BarcodeEAN.java
│ │ ├── BarcodeEANSUPP.java
│ │ ├── BarcodeInter25.java
│ │ ├── BarcodePDF417.java
│ │ ├── BarcodePostnet.java
│ │ ├── BaseField.java
│ │ ├── BaseFont.java
│ │ ├── BidiLine.java
│ │ ├── BidiOrder.java
│ │ ├── ByteBuffer.java
│ │ ├── CFFFont.java
│ │ ├── CFFFontSubset.java
│ │ ├── CJKFont.java
│ │ ├── CMYKColor.java
│ │ ├── CMapAwareDocumentFont.java
│ │ ├── ColorDetails.java
│ │ ├── ColumnText.java
│ │ ├── DefaultFontMapper.java
│ │ ├── DefaultSplitCharacter.java
│ │ ├── DocumentFont.java
│ │ ├── EnumerateTTC.java
│ │ ├── ExtendedColor.java
│ │ ├── ExtraEncoding.java
│ │ ├── FdfReader.java
│ │ ├── FdfWriter.java
│ │ ├── FontDetails.java
│ │ ├── FontMapper.java
│ │ ├── FontSelector.java
│ │ ├── GlyphList.java
│ │ ├── GrayColor.java
│ │ ├── HyphenationAuto.java
│ │ ├── HyphenationEvent.java
│ │ ├── IntHashtable.java
│ │ ├── LZWDecoder.java
│ │ ├── MappedRandomAccessFile.java
│ │ ├── MultiColumnText.java
│ │ ├── OcspClient.java
│ │ ├── OcspClientBouncyCastle.java
│ │ ├── OutputStreamCounter.java
│ │ ├── OutputStreamEncryption.java
│ │ ├── PRAcroForm.java
│ │ ├── PRIndirectReference.java
│ │ ├── PRStream.java
│ │ ├── PRTokeniser.java
│ │ ├── PageResources.java
│ │ ├── PatternColor.java
│ │ ├── PdfAcroForm.java
│ │ ├── PdfAction.java
│ │ ├── PdfAnnotation.java
│ │ ├── PdfAppearance.java
│ │ ├── PdfArray.java
│ │ ├── PdfBoolean.java
│ │ ├── PdfBorderArray.java
│ │ ├── PdfBorderDictionary.java
│ │ ├── PdfCell.java
│ │ ├── PdfChunk.java
│ │ ├── PdfColor.java
│ │ ├── PdfContentByte.java
│ │ ├── PdfContentParser.java
│ │ ├── PdfContents.java
│ │ ├── PdfCopy.java
│ │ ├── PdfCopyFields.java
│ │ ├── PdfCopyFieldsImp.java
│ │ ├── PdfCopyForms.java
│ │ ├── PdfCopyFormsImp.java
│ │ ├── PdfDashPattern.java
│ │ ├── PdfDate.java
│ │ ├── PdfDestination.java
│ │ ├── PdfDeveloperExtension.java
│ │ ├── PdfDictionary.java
│ │ ├── PdfDocument.java
│ │ ├── PdfEFStream.java
│ │ ├── PdfEncodings.java
│ │ ├── PdfEncryption.java
│ │ ├── PdfEncryptor.java
│ │ ├── PdfException.java
│ │ ├── PdfFileSpecification.java
│ │ ├── PdfFont.java
│ │ ├── PdfFormField.java
│ │ ├── PdfFormXObject.java
│ │ ├── PdfFunction.java
│ │ ├── PdfGState.java
│ │ ├── PdfGraphics2D.java
│ │ ├── PdfICCBased.java
│ │ ├── PdfImage.java
│ │ ├── PdfImportedPage.java
│ │ ├── PdfIndirectObject.java
│ │ ├── PdfIndirectReference.java
│ │ ├── PdfLayer.java
│ │ ├── PdfLayerMembership.java
│ │ ├── PdfLine.java
│ │ ├── PdfLister.java
│ │ ├── PdfLiteral.java
│ │ ├── PdfMediaClipData.java
│ │ ├── PdfName.java
│ │ ├── PdfNameTree.java
│ │ ├── PdfNull.java
│ │ ├── PdfNumber.java
│ │ ├── PdfNumberTree.java
│ │ ├── PdfOCG.java
│ │ ├── PdfOCProperties.java
│ │ ├── PdfObject.java
│ │ ├── PdfOutline.java
│ │ ├── PdfPCell.java
│ │ ├── PdfPCellEvent.java
│ │ ├── PdfPKCS7.java
│ │ ├── PdfPRow.java
│ │ ├── PdfPSXObject.java
│ │ ├── PdfPTable.java
│ │ ├── PdfPTableEvent.java
│ │ ├── PdfPage.java
│ │ ├── PdfPageElement.java
│ │ ├── PdfPageEvent.java
│ │ ├── PdfPageEventHelper.java
│ │ ├── PdfPageLabels.java
│ │ ├── PdfPages.java
│ │ ├── PdfPattern.java
│ │ ├── PdfPatternPainter.java
│ │ ├── PdfPrinterGraphics2D.java
│ │ ├── PdfPublicKeyRecipient.java
│ │ ├── PdfPublicKeySecurityHandler.java
│ │ ├── PdfReader.java
│ │ ├── PdfReaderInstance.java
│ │ ├── PdfRectangle.java
│ │ ├── PdfRendition.java
│ │ ├── PdfResources.java
│ │ ├── PdfShading.java
│ │ ├── PdfShadingPattern.java
│ │ ├── PdfSigGenericPKCS.java
│ │ ├── PdfSignature.java
│ │ ├── PdfSignatureAppearance.java
│ │ ├── PdfSmartCopy.java
│ │ ├── PdfSpotColor.java
│ │ ├── PdfStamper.java
│ │ ├── PdfStamperImp.java
│ │ ├── PdfStream.java
│ │ ├── PdfString.java
│ │ ├── PdfStructureElement.java
│ │ ├── PdfStructureTreeRoot.java
│ │ ├── PdfTable.java
│ │ ├── PdfTemplate.java
│ │ ├── PdfTextArray.java
│ │ ├── PdfTransition.java
│ │ ├── PdfTransparencyGroup.java
│ │ ├── PdfWriter.java
│ │ ├── PdfXConformanceException.java
│ │ ├── Pfm2afm.java
│ │ ├── PushbuttonField.java
│ │ ├── RadioCheckField.java
│ │ ├── RandomAccessFileOrArray.java
│ │ ├── SequenceList.java
│ │ ├── ShadingColor.java
│ │ ├── SimpleBookmark.java
│ │ ├── SimpleNamedDestination.java
│ │ ├── SpotColor.java
│ │ ├── StampContent.java
│ │ ├── StandardDecryption.java
│ │ ├── TSAClient.java
│ │ ├── TSAClientBouncyCastle.java
│ │ ├── TextField.java
│ │ ├── TrueTypeFont.java
│ │ ├── TrueTypeFontSubSet.java
│ │ ├── TrueTypeFontUnicode.java
│ │ ├── Type1Font.java
│ │ ├── Type3Font.java
│ │ ├── Type3Glyph.java
│ │ ├── VerticalText.java
│ │ ├── XfaForm.java
│ │ ├── XfdfReader.java
│ │ ├── codec
│ │ │ ├── Base64.java
│ │ │ ├── BmpImage.java
│ │ │ ├── CCITTG4Encoder.java
│ │ │ ├── GifImage.java
│ │ │ ├── JBIG2Image.java
│ │ │ ├── JBIG2SegmentReader.java
│ │ │ ├── PngImage.java
│ │ │ ├── TIFFConstants.java
│ │ │ ├── TIFFDirectory.java
│ │ │ ├── TIFFFaxDecoder.java
│ │ │ ├── TIFFField.java
│ │ │ ├── TIFFLZWDecoder.java
│ │ │ ├── TiffImage.java
│ │ │ └── wmf
│ │ │ │ ├── InputMeta.java
│ │ │ │ ├── MetaBrush.java
│ │ │ │ ├── MetaDo.java
│ │ │ │ ├── MetaFont.java
│ │ │ │ ├── MetaObject.java
│ │ │ │ ├── MetaPen.java
│ │ │ │ └── MetaState.java
│ │ ├── collection
│ │ │ ├── PdfCollection.java
│ │ │ ├── PdfCollectionField.java
│ │ │ ├── PdfCollectionItem.java
│ │ │ ├── PdfCollectionSchema.java
│ │ │ ├── PdfCollectionSort.java
│ │ │ └── PdfTargetDictionary.java
│ │ ├── crypto
│ │ │ ├── AESCipher.java
│ │ │ ├── ARCFOUREncryption.java
│ │ │ └── IVGenerator.java
│ │ ├── draw
│ │ │ ├── DottedLineSeparator.java
│ │ │ ├── DrawInterface.java
│ │ │ ├── LineSeparator.java
│ │ │ └── VerticalPositionMark.java
│ │ ├── events
│ │ │ ├── FieldPositioningEvents.java
│ │ │ ├── IndexEvents.java
│ │ │ ├── PdfPCellEventForwarder.java
│ │ │ ├── PdfPTableEventForwarder.java
│ │ │ └── PdfPageEventForwarder.java
│ │ ├── fonts
│ │ │ ├── Courier-Bold.afm
│ │ │ ├── Courier-BoldOblique.afm
│ │ │ ├── Courier-Oblique.afm
│ │ │ ├── Courier.afm
│ │ │ ├── FontsResourceAnchor.java
│ │ │ ├── Helvetica-Bold.afm
│ │ │ ├── Helvetica-BoldOblique.afm
│ │ │ ├── Helvetica-Oblique.afm
│ │ │ ├── Helvetica.afm
│ │ │ ├── Symbol.afm
│ │ │ ├── Times-Bold.afm
│ │ │ ├── Times-BoldItalic.afm
│ │ │ ├── Times-Italic.afm
│ │ │ ├── Times-Roman.afm
│ │ │ ├── ZapfDingbats.afm
│ │ │ ├── cmap_info.txt
│ │ │ ├── cmaps
│ │ │ │ ├── CMap.java
│ │ │ │ ├── CMapParser.java
│ │ │ │ └── CodespaceRange.java
│ │ │ ├── glyphlist.txt
│ │ │ └── mustRead.html
│ │ ├── hyphenation
│ │ │ ├── ByteVector.java
│ │ │ ├── CharVector.java
│ │ │ ├── Hyphen.java
│ │ │ ├── Hyphenation.java
│ │ │ ├── HyphenationException.java
│ │ │ ├── HyphenationTree.java
│ │ │ ├── Hyphenator.java
│ │ │ ├── PatternConsumer.java
│ │ │ ├── SimplePatternParser.java
│ │ │ └── TernaryTree.java
│ │ ├── interfaces
│ │ │ ├── PdfAnnotations.java
│ │ │ ├── PdfDocumentActions.java
│ │ │ ├── PdfEncryptionSettings.java
│ │ │ ├── PdfPageActions.java
│ │ │ ├── PdfRunDirection.java
│ │ │ ├── PdfVersion.java
│ │ │ ├── PdfViewerPreferences.java
│ │ │ └── PdfXConformance.java
│ │ ├── internal
│ │ │ ├── PdfAnnotationsImp.java
│ │ │ ├── PdfVersionImp.java
│ │ │ ├── PdfViewerPreferencesImp.java
│ │ │ ├── PdfXConformanceImp.java
│ │ │ ├── PolylineShape.java
│ │ │ └── PolylineShapeIterator.java
│ │ └── parser
│ │ │ ├── ContentOperator.java
│ │ │ ├── GraphicsState.java
│ │ │ ├── Matrix.java
│ │ │ ├── PdfContentReaderTool.java
│ │ │ ├── PdfContentStreamProcessor.java
│ │ │ ├── PdfTextExtractor.java
│ │ │ └── SimpleTextExtractingPdfContentStreamProcessor.java
│ └── xml
│ │ ├── SAXiTextHandler.java
│ │ ├── SAXmyHandler.java
│ │ ├── TagMap.java
│ │ ├── XmlDomWriter.java
│ │ ├── XmlParser.java
│ │ ├── XmlPeer.java
│ │ ├── simpleparser
│ │ ├── EntitiesToSymbol.java
│ │ ├── EntitiesToUnicode.java
│ │ ├── IanaEncodings.java
│ │ ├── SimpleXMLDocHandler.java
│ │ ├── SimpleXMLDocHandlerComment.java
│ │ └── SimpleXMLParser.java
│ │ └── xmp
│ │ ├── DublinCoreSchema.java
│ │ ├── LangAlt.java
│ │ ├── PdfA1Schema.java
│ │ ├── PdfSchema.java
│ │ ├── XmpArray.java
│ │ ├── XmpBasicSchema.java
│ │ ├── XmpMMSchema.java
│ │ ├── XmpReader.java
│ │ ├── XmpSchema.java
│ │ └── XmpWriter.java
│ └── tools
│ ├── BuildTutorial.java
│ ├── ConcatPdf.java
│ ├── EncryptPdf.java
│ ├── Executable.java
│ ├── HandoutPdf.java
│ ├── SplitPdf.java
│ └── ToolboxAvailable.java
├── rtf
└── com
│ └── lowagie
│ └── text
│ └── rtf
│ ├── RtfAddableElement.java
│ ├── RtfBasicElement.java
│ ├── RtfElement.java
│ ├── RtfExtendedElement.java
│ ├── RtfMapper.java
│ ├── RtfWriter2.java
│ ├── direct
│ └── RtfDirectContent.java
│ ├── document
│ ├── RtfCodePage.java
│ ├── RtfDocument.java
│ ├── RtfDocumentHeader.java
│ ├── RtfDocumentSettings.java
│ ├── RtfGenerator.java
│ ├── RtfInfoElement.java
│ ├── RtfInfoGroup.java
│ ├── RtfPageSetting.java
│ ├── RtfProtection.java
│ ├── RtfProtectionSetting.java
│ └── output
│ │ ├── RtfByteArrayBuffer.java
│ │ ├── RtfDataCache.java
│ │ ├── RtfDiskCache.java
│ │ ├── RtfEfficientMemoryCache.java
│ │ ├── RtfMemoryCache.java
│ │ └── RtfNilOutputStream.java
│ ├── field
│ ├── RtfAnchor.java
│ ├── RtfField.java
│ ├── RtfPageNumber.java
│ ├── RtfTOCEntry.java
│ ├── RtfTableOfContents.java
│ └── RtfTotalPageNumber.java
│ ├── graphic
│ ├── RtfImage.java
│ ├── RtfShape.java
│ ├── RtfShapePosition.java
│ └── RtfShapeProperty.java
│ ├── headerfooter
│ ├── RtfHeaderFooter.java
│ └── RtfHeaderFooterGroup.java
│ ├── list
│ ├── RtfList.java
│ ├── RtfListItem.java
│ ├── RtfListLevel.java
│ ├── RtfListTable.java
│ └── RtfPictureList.java
│ ├── parser
│ ├── RtfImportMappings.java
│ ├── RtfImportMgr.java
│ ├── RtfParser.java
│ ├── RtfParserState.java
│ ├── ctrlwords
│ │ ├── RtfCtrlWordData.java
│ │ ├── RtfCtrlWordHandler.java
│ │ ├── RtfCtrlWordListener.java
│ │ ├── RtfCtrlWordMap.java
│ │ ├── RtfCtrlWordMgr.java
│ │ └── RtfCtrlWordType.java
│ ├── destinations
│ │ ├── RtfDestination.java
│ │ ├── RtfDestinationColorTable.java
│ │ ├── RtfDestinationDocument.java
│ │ ├── RtfDestinationFontTable.java
│ │ ├── RtfDestinationInfo.java
│ │ ├── RtfDestinationListTable.java
│ │ ├── RtfDestinationListener.java
│ │ ├── RtfDestinationMgr.java
│ │ ├── RtfDestinationNull.java
│ │ ├── RtfDestinationShppict.java
│ │ └── RtfDestinationStylesheetTable.java
│ ├── enumerations
│ │ └── RtfColorThemes.java
│ ├── exceptions
│ │ ├── RtfParserException.java
│ │ └── RtfUnknownCtrlWordException.java
│ └── properties
│ │ ├── RtfCtrlWordPropertyType.java
│ │ ├── RtfProperty.java
│ │ └── RtfPropertyListener.java
│ ├── style
│ ├── RtfColor.java
│ ├── RtfColorList.java
│ ├── RtfFont.java
│ ├── RtfFontList.java
│ ├── RtfParagraphStyle.java
│ ├── RtfStyleTypes.java
│ └── RtfStylesheetList.java
│ ├── table
│ ├── RtfBorder.java
│ ├── RtfBorderGroup.java
│ ├── RtfCell.java
│ ├── RtfRow.java
│ └── RtfTable.java
│ └── text
│ ├── RtfAnnotation.java
│ ├── RtfChapter.java
│ ├── RtfChunk.java
│ ├── RtfNewPage.java
│ ├── RtfParagraph.java
│ ├── RtfPhrase.java
│ ├── RtfSection.java
│ ├── RtfTab.java
│ └── RtfTabGroup.java
├── rups
└── com
│ └── lowagie
│ └── rups
│ ├── Rups.java
│ ├── controller
│ ├── PdfReaderController.java
│ ├── PdfRendererController.java
│ └── RupsController.java
│ ├── io
│ ├── FileChooserAction.java
│ ├── FileCloseAction.java
│ ├── OutputStreamResource.java
│ ├── TextAreaOutputStream.java
│ └── filters
│ │ └── PdfFilter.java
│ ├── model
│ ├── BackgroundTask.java
│ ├── IndirectObjectFactory.java
│ ├── ObjectLoader.java
│ ├── PageLoader.java
│ ├── PdfFile.java
│ ├── Permissions.java
│ ├── ProgressDialog.java
│ ├── TreeNodeFactory.java
│ └── XfaFile.java
│ └── view
│ ├── Console.java
│ ├── MessageAction.java
│ ├── PageNavigationAction.java
│ ├── PageNavigationListener.java
│ ├── RupsMenuBar.java
│ ├── icons
│ ├── IconActionListener.java
│ ├── IconButton.java
│ ├── IconFetcher.java
│ ├── IconTreeCellRenderer.java
│ ├── IconTreeNode.java
│ ├── array.png
│ ├── attribute.png
│ ├── boolean.png
│ ├── copyright_notice.txt
│ ├── dictionary.png
│ ├── form.png
│ ├── name.png
│ ├── navigation_first.png
│ ├── navigation_last.png
│ ├── navigation_next.png
│ ├── navigation_previous.png
│ ├── null.png
│ ├── number.png
│ ├── outline.png
│ ├── page.png
│ ├── pages.png
│ ├── pdf.png
│ ├── pi.png
│ ├── ref.png
│ ├── ref_recursive.png
│ ├── stream.png
│ ├── string.png
│ ├── tag.png
│ ├── text.png
│ └── xfa.png
│ ├── itext
│ ├── FormTree.java
│ ├── OutlineTree.java
│ ├── PagesTable.java
│ ├── PdfObjectPanel.java
│ ├── PdfTree.java
│ ├── StreamTextArea.java
│ ├── XRefTable.java
│ ├── XfaTextArea.java
│ ├── XfaTree.java
│ └── treenodes
│ │ ├── FormTreeNode.java
│ │ ├── OutlineTreeNode.java
│ │ ├── PdfObjectTreeNode.java
│ │ ├── PdfPageTreeNode.java
│ │ ├── PdfPagesTreeNode.java
│ │ ├── PdfTrailerTreeNode.java
│ │ ├── XdpTreeNode.java
│ │ └── XfaTreeNode.java
│ ├── models
│ ├── DictionaryTableModel.java
│ ├── JTableAutoModel.java
│ ├── JTableAutoModelInterface.java
│ └── PdfArrayTableModel.java
│ └── renderer
│ ├── PageField.java
│ ├── PagePanel.java
│ └── ToolBar.java
├── test.xml
└── toolbox
└── com
└── lowagie
└── toolbox
├── 1t3xt.gif
├── AbstractTool.java
├── ToolMenuItems.java
├── Toolbox.java
├── Versions.java
├── arguments
├── AbstractArgument.java
├── BitsetArgument.java
├── ColorArgument.java
├── FileArgument.java
├── FileArrayArgument.java
├── FloatArgument.java
├── ImageArgument.java
├── IntegerArgument.java
├── OptionArgument.java
├── PageSizeArgument.java
├── StringArgument.java
└── filters
│ ├── DirFilter.java
│ ├── ImageFilter.java
│ ├── PdfFilter.java
│ └── U3DFilter.java
├── plugins
├── Add3D.java
├── Bookmarks2XML.java
├── Burst.java
├── CompressDecompressPageContent.java
├── Concat.java
├── ConcatN.java
├── Decrypt.java
├── Divide.java
├── DvdCover.java
├── Encrypt.java
├── ExtractAttachments.java
├── Handouts.java
├── HtmlBookmarks.java
├── ImageXRefViewer.java
├── InspectPDF.java
├── KnitTiff.java
├── NUp.java
├── Normalize.java
├── PhotoAlbum.java
├── RemoveLaunchApplication.java
├── ReversePages.java
├── SelectedPages.java
├── Split.java
├── Tiff2Pdf.java
├── Txt2Pdf.java
├── Watermarker.java
├── XML2Bookmarks.java
├── rotate.png
├── translate.png
└── zoom.png
├── swing
├── CustomDialog.java
├── EventDispatchingThread.java
├── FileList.java
└── PdfInformationPanel.java
└── tools.txt
/.openlogic.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: iText 2.1.7 Source
3 | platform_id: all
4 | platform_version: all
5 | distribution_file_uuid_string: openlogic-itext-2.1.7-all-src-1
6 | platform_vendor: all
7 | version_visibility: public
8 | description: iText 2.1.7 Source
9 | platform_arch: all
10 | distribution_file_uuid: 93f85f0983f7c4dc8975fead316a58f831bc142f486ec789783d003b73b2276a
11 | distribution_version: 1
12 | distribution_flavor: ""
13 | distribution_raw_file: 2.1.7/iText-src-2.1.7.tar.gz
14 | notify: "yes"
15 | package_version: 2.1.7
16 | package_id: itext
17 | release_date: "2010-04-15"
18 | distribution_notes: ""
19 | distribution_type: src
20 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | itext2
2 | -----------------------------------------------------------------------------
3 | This is a fork of the original iText 2.1.7 source code, as downloaded from
4 | http://olex.openlogic.com/packages/itext/2.1.7. The original authors released
5 | this version of iText under both LGPL v2 and MPL v 1.1 licenses. This
6 | distribution retains those licenses. You can read the terms of those licenses
7 | at the link above.
8 |
9 | Subsequent versions of iText were released under Affero GPL and GPL. Those
10 | licenses govern iText version 5.0 and later. It appears the wgen-iText
11 | github repo forked from iText, 5.0.2.
12 |
13 |
--------------------------------------------------------------------------------
/ant/.ant.properties:
--------------------------------------------------------------------------------
1 | releasenumber=2.1.7
2 | releasedate=2009-07-07
3 |
4 | itext.home=../..
5 |
6 | itext.src=${itext.home}/src
7 | itext.www=${itext.home}/www
8 | itext.build=${itext.home}/build
9 | itext.lib=${itext.home}/lib
10 |
11 | itext.jar=${itext.lib}/iText.jar
12 | jfreechart.jar=${itext.lib}/jfreechart.jar
13 | jcommon.jar=${itext.lib}/jcommon.jar
14 | servlet.jar=${itext.lib}/servlet.jar
15 |
16 | bc.jdk=jdk14
17 | bc.version=138
18 |
19 | lib.bcmail=bcmail-${bc.jdk}-${bc.version}.jar
20 | lib.bcprov=bcprov-${bc.jdk}-${bc.version}.jar
21 | lib.bctsp=bctsp-${bc.jdk}-${bc.version}.jar
22 | lib.dom4j=pdf-renderer.jar
23 | lib.pdf-renderer=dom4j-1.6.1.jar
24 |
25 | itext.src.lowagie=${itext.www}/lowagie
26 | itext.src.tutorial=${itext.www}/tutorial
27 | itext.src.examples=${itext.www}/examples
28 |
29 | itext.bin=${itext.build}/bin
30 | itext.docs=${itext.build}/docs
31 | itext.lowagie=${itext.build}/lowagie
32 | itext.tutorial=${itext.build}/tutorial
33 | itext.examples=${itext.build}/examples
34 | itext.webapp=${itext.build}/webapp
35 | itext.release=${itext.build}/release
36 | itext.downloads=${itext.build}/downloads
37 | itext.dist=${itext.release}/dist
38 | itext.sf=${itext.release}/sf
39 | itext.maven=${itext.release}/maven
40 |
41 | itext.bin.temp=${itext.build}/bin.temp
42 | itext.jnlp=${itext.build}/jnlp
43 |
44 | itext.rups.src=${itext.src}/rups
45 | itext.rups.bin=${itext.build}/bin.rups
46 | itext.rups.jar=${itext.lib}/iText-rups.jar
47 |
48 | itext.toolbox.src=${itext.src}/toolbox
49 | itext.toolbox.bin=${itext.build}/bin.toolbox
50 | itext.toolbox.jar=${itext.lib}/iText-toolbox.jar
51 |
52 | itext.rtf.src=${itext.src}/rtf
53 | itext.rtf.bin=${itext.build}/bin.rtf
54 | itext.rtf.jar=${itext.lib}/iText-rtf.jar
55 |
56 | itext.keystore.filename=${itext.lib}/.keystore
57 | itext.keystore.password=dummypass
58 | itext.keystore.alias=itext
59 | itext.keystore.storetype=jks
60 | itext.keystore.dname=CN=iText Self-Signed Certificate
61 |
62 | itext.jdk.core=1.4
63 | itext.jdk.rups=1.5
64 | itext.jdk.toolbox=1.5
--------------------------------------------------------------------------------
/ant/.ant.test.properties:
--------------------------------------------------------------------------------
1 | itext.home=..
2 | itext.build=${itext.home}/build
3 | itext.lib=${itext.home}/lib
4 |
5 | junit.jar=${itext.lib}/junit-4.4.jar
6 |
7 | itext.src.test=${itext.home}/test
8 |
9 | itext.bin.examples=${itext.build}/bin.examples
10 | itext.bin.test=${itext.build}/test
11 | itext.bin.data=${itext.build}/test.data
12 | itext.reports=${itext.build}/reports
13 |
14 | itext.rtf.test=${itext.build}/test.rtf
15 |
16 | itext.jdk.examples=1.4
17 | itext.jdk.test=1.5
18 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/ElementListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: ElementListener.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2001, 2002 by Bruno Lowagie.
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text;
51 |
52 | import java.util.EventListener;
53 |
54 | /**
55 | * A class that implements ElementListener
will perform some
56 | * actions when an Element
is added.
57 | *
58 | * @see DocListener
59 | */
60 |
61 | public interface ElementListener extends EventListener {
62 |
63 | // methods
64 |
65 | /**
66 | * Signals that an Element
was added to the Document
.
67 | *
68 | * @param element a high level object
69 | * @return true
if the element was added, false
if not.
70 | * @throws DocumentException when a document isn't open yet, or has been closed
71 | */
72 |
73 | public boolean add(Element element) throws DocumentException; // [L0]
74 | }
--------------------------------------------------------------------------------
/core/com/lowagie/text/RtfElementInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: RtfElementInterface.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2008 by Bruno Lowagie
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text;
51 |
52 | /**
53 | * The RTF jar depends on the iText jar, but the iText jar may not
54 | * depend on the RTF jar. This interface offers a temporary solution
55 | * until we find a more elegant way to solve this.
56 | * @since 2.1.0
57 | */
58 | public interface RtfElementInterface {
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/TextElementArray.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: TextElementArray.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright (c) 1999, 2000, 2001, 2002 Bruno Lowagie.
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text;
51 |
52 | /**
53 | * Interface for a text element to which other objects can be added.
54 | *
55 | * @see Phrase
56 | * @see Paragraph
57 | * @see Section
58 | * @see ListItem
59 | * @see Chapter
60 | * @see Anchor
61 | * @see Cell
62 | */
63 |
64 | public interface TextElementArray extends Element {
65 |
66 | /**
67 | * Adds an object to the TextElementArray
.
68 | *
69 | * @param o an object that has to be added
70 | * @return true
if the addition succeeded; false
otherwise
71 | */
72 | public boolean add(Object o);
73 | }
--------------------------------------------------------------------------------
/core/com/lowagie/text/exceptions/BadPasswordException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: BadPasswordException.java 3665 2009-01-26 22:32:15Z xlv $
3 | *
4 | * Copyright 2007 by Bruno Lowagie.
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.exceptions;
51 |
52 | import java.io.IOException;
53 |
54 | /**
55 | * Typed exception used when opening an existing PDF document.
56 | * Gets thrown when the document isn't a valid PDF document.
57 | * @since 2.1.5 It was written for iText 2.0.8, but moved to another package
58 | */
59 | public class BadPasswordException extends IOException {
60 |
61 | /** Serial Version UID. */
62 | private static final long serialVersionUID = -4333706268155063964L;
63 |
64 | /**
65 | * Creates an exception saying the user password was incorrect.
66 | */
67 | public BadPasswordException(String message) {
68 | super(message);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/exceptions/IllegalPdfSyntaxException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: IllegalPdfSyntaxException.java 3820 2009-03-25 10:30:01Z blowagie $
3 | *
4 | * Copyright 2009 by Bruno Lowagie.
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2009 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2009 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.exceptions;
51 |
52 | /**
53 | * Typed exception used when creating PDF syntax that isn't valid.
54 | * @since 2.1.6
55 | */
56 | public class IllegalPdfSyntaxException extends IllegalArgumentException {
57 |
58 | /** Serial version ID */
59 | private static final long serialVersionUID = -643024246596031671L;
60 |
61 | /**
62 | * Creates an exception saying the PDF syntax isn't correct.
63 | * @param message some extra info about the exception
64 | */
65 | public IllegalPdfSyntaxException(String message) {
66 | super(message);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/exceptions/InvalidPdfException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: InvalidPdfException.java 3665 2009-01-26 22:32:15Z xlv $
3 | *
4 | * Copyright 2009 Bruno Lowagie
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2009 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2009 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.exceptions;
51 |
52 | import java.io.IOException;
53 |
54 | /**
55 | * Typed exception used when opening an existing PDF document.
56 | * Gets thrown when the document isn't a valid PDF document.
57 | * @since 2.1.5
58 | */
59 | public class InvalidPdfException extends IOException {
60 |
61 | /** a serial version UID */
62 | private static final long serialVersionUID = -2319614911517026938L;
63 |
64 | /**
65 | * Creates an instance of a NoPdfException.
66 | * @param message the reason why the document isn't a PDF document according to iText.
67 | */
68 | public InvalidPdfException(String message) {
69 | super(message);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/html/simpleparser/ALink.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2005 Paulo Soares
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 |
48 | package com.lowagie.text.html.simpleparser;
49 |
50 | import com.lowagie.text.Paragraph;
51 | /**
52 | *
53 | * @author psoares
54 | */
55 | public interface ALink {
56 | boolean process(Paragraph current, ChainedProperties cprops);
57 | }
58 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/html/simpleparser/ImageProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2007 Paulo Soares
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 |
48 |
49 | package com.lowagie.text.html.simpleparser;
50 |
51 | import com.lowagie.text.DocListener;
52 | import com.lowagie.text.Image;
53 | import java.util.HashMap;
54 |
55 | public interface ImageProvider {
56 | Image getImage(String src, HashMap h, ChainedProperties cprops, DocListener doc);
57 | }
58 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/html/simpleparser/Img.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2005 Paulo Soares
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 |
48 | package com.lowagie.text.html.simpleparser;
49 |
50 | import java.util.HashMap;
51 |
52 | import com.lowagie.text.DocListener;
53 | import com.lowagie.text.Image;
54 |
55 | /**
56 | *
57 | * @author psoares
58 | */
59 | public interface Img {
60 | boolean process(Image img, HashMap h, ChainedProperties cprops, DocListener doc);
61 | }
62 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/OcspClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: OcspClient.java 3959 2009-06-09 08:31:05Z blowagie $
3 | *
4 | * Copyright 2009 Paulo Soares
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2005 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2009 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf;
51 |
52 | /**
53 | * Interface for the OCSP Client.
54 | * @since 2.1.6
55 | */
56 | public interface OcspClient {
57 | /**
58 | * Gets an encoded byte array.
59 | * @return a byte array
60 | */
61 | public byte[] getEncoded();
62 | }
63 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfBorderArray.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PdfBorderArray.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 1999, 2000, 2001, 2002 Bruno Lowagie
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf;
51 |
52 | /**
53 | * A PdfBorderArray
defines the border of a PdfAnnotation
.
54 | *
55 | * @see PdfArray
56 | */
57 |
58 | public class PdfBorderArray extends PdfArray {
59 |
60 | // constructors
61 |
62 | /**
63 | * Constructs a new PdfBorderArray
.
64 | */
65 |
66 | public PdfBorderArray(float hRadius, float vRadius, float width) {
67 | this(hRadius, vRadius, width, null);
68 | }
69 |
70 | /**
71 | * Constructs a new PdfBorderArray
.
72 | */
73 |
74 | public PdfBorderArray(float hRadius, float vRadius, float width, PdfDashPattern dash) {
75 | super(new PdfNumber(hRadius));
76 | add(new PdfNumber(vRadius));
77 | add(new PdfNumber(width));
78 | if (dash != null)
79 | add(dash);
80 | }
81 | }
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfMediaClipData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2003 Galo Gimenez
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 | package com.lowagie.text.pdf;
48 |
49 | import java.io.IOException;
50 |
51 | public class PdfMediaClipData extends PdfDictionary {
52 |
53 | PdfMediaClipData(String file, PdfFileSpecification fs, String mimeType) throws IOException {
54 | put(PdfName.TYPE,new PdfName("MediaClip"));
55 | put(PdfName.S, new PdfName("MCD"));
56 | put(PdfName.N, new PdfString("Media clip for "+file));
57 | put(new PdfName("CT"), new PdfString(mimeType));
58 | PdfDictionary dic = new PdfDictionary();
59 | dic.put(new PdfName("TF"), new PdfString("TEMPACCESS"));
60 | put(new PdfName("P"), dic);
61 | put(PdfName.D, fs.getReference());
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfOCG.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004 by Paulo Soares.
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 | package com.lowagie.text.pdf;
48 |
49 | /**
50 | * The interface common to all layer types.
51 | *
52 | * @author Paulo Soares (psoares@consiste.pt)
53 | */
54 | public interface PdfOCG {
55 |
56 | /**
57 | * Gets the PdfIndirectReference
that represents this layer.
58 | * @return the PdfIndirectReference
that represents this layer
59 | */
60 | public PdfIndirectReference getRef();
61 |
62 | /**
63 | * Gets the object representing the layer.
64 | * @return the object representing the layer
65 | */
66 | public PdfObject getPdfObject();
67 | }
68 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfOCProperties.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004 by Paulo Soares.
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 | package com.lowagie.text.pdf;
48 |
49 | /**
50 | * This class represents the /OCProperties entry in the document catalog
51 | * and holds the optional content properties dictionary, which contains
52 | * a list of all the optional content groups in the document, as well as information
53 | * about the default and alternate configurations for optional content.
54 | *
55 | * @author Paulo Soares (psoares@consiste.pt)
56 | */
57 | public class PdfOCProperties extends PdfDictionary {
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfPageElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PdfPageElement.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 1999, 2000, 2001, 2002 Bruno Lowagie
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf;
51 |
52 | /**
53 | * The PdfPageElement
interface has to be implemented by PdfPage
and PdfPages
.
54 | *
55 | * @see PdfPage
56 | * @see PdfPages
57 | */
58 |
59 | interface PdfPageElement {
60 |
61 | /**
62 | * Set the value for the Parent key in the Page or Pages Dictionary.
63 | *
64 | * @param reference an indirect reference to a PdfPages
-object
65 | */
66 |
67 | public void setParent(PdfIndirectReference reference);
68 |
69 | /**
70 | * Checks if this page element is a tree of pages.
71 | *
72 | * @return true
if it's a tree of pages;
73 | * false
if it's a single page
74 | */
75 |
76 | public boolean isParent();
77 | }
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfPrinterGraphics2D.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PdfPrinterGraphics2D.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2004 Paulo Soares and Alexandru Carstoiu
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2005 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2005 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf;
51 |
52 | import java.awt.print.PrinterGraphics;
53 | import java.awt.print.PrinterJob;
54 |
55 | /**
56 | * This is an extension class for the sole purpose of implementing the
57 | * {@link java.awt.print.PrinterGraphics PrinterGraphics} interface.
58 | */
59 | public class PdfPrinterGraphics2D extends PdfGraphics2D implements PrinterGraphics
60 | {
61 | private PrinterJob printerJob;
62 |
63 | public PdfPrinterGraphics2D(PdfContentByte cb, float width, float height, FontMapper fontMapper,
64 | boolean onlyShapes, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) {
65 | super(cb, width, height, fontMapper, onlyShapes, convertImagesToJPEG, quality);
66 | this.printerJob = printerJob;
67 | }
68 |
69 | public PrinterJob getPrinterJob() {
70 | return printerJob;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfPublicKeyRecipient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PdfPublicKeyRecipient.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2006 Paulo Soares
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2007 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2007 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf;
51 |
52 | import java.security.cert.Certificate;
53 |
54 | public class PdfPublicKeyRecipient {
55 |
56 | private Certificate certificate = null;
57 |
58 | private int permission = 0;
59 |
60 | protected byte[] cms = null;
61 |
62 | public PdfPublicKeyRecipient(Certificate certificate, int permission)
63 | {
64 | this.certificate = certificate;
65 | this.permission = permission;
66 | }
67 |
68 | public Certificate getCertificate() {
69 | return certificate;
70 | }
71 |
72 | public int getPermission() {
73 | return permission;
74 | }
75 |
76 | protected void setCms(byte[] cms) {
77 | this.cms = cms;
78 | }
79 |
80 | protected byte[] getCms() {
81 | return cms;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfRendition.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2003 Galo Gimenez
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 | package com.lowagie.text.pdf;
48 |
49 | import java.io.IOException;
50 |
51 | /**
52 | * A Rendition dictionary (pdf spec 1.5)
53 | */
54 | public class PdfRendition extends PdfDictionary {
55 | PdfRendition(String file, PdfFileSpecification fs, String mimeType) throws IOException{
56 | put(PdfName.S, new PdfName("MR"));
57 | put(PdfName.N, new PdfString("Rendition for "+file));
58 | put(PdfName.C, new PdfMediaClipData(file, fs, mimeType));
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/PdfXConformanceException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PdfXConformanceException.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2004 Paulo Soares
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2005 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2005 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf;
51 |
52 | /**
53 | *
54 | * @author psoares
55 | */
56 | public class PdfXConformanceException extends RuntimeException {
57 |
58 | private static final long serialVersionUID = 9199144538884293397L;
59 |
60 | /** Creates a new instance of PdfXConformanceException. */
61 | public PdfXConformanceException() {
62 | }
63 |
64 | /**
65 | * Creates a new instance of PdfXConformanceException.
66 | * @param s
67 | */
68 | public PdfXConformanceException(String s) {
69 | super(s);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/codec/wmf/MetaObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: MetaObject.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2001, 2002 Paulo Soares
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.pdf.codec.wmf;
51 |
52 | public class MetaObject {
53 | public static final int META_NOT_SUPPORTED = 0;
54 | public static final int META_PEN = 1;
55 | public static final int META_BRUSH = 2;
56 | public static final int META_FONT = 3;
57 | public int type = META_NOT_SUPPORTED;
58 |
59 | public MetaObject() {
60 | }
61 |
62 | public MetaObject(int type) {
63 | this.type = type;
64 | }
65 |
66 | public int getType() {
67 | return type;
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/collection/PdfCollection.java:
--------------------------------------------------------------------------------
1 | package com.lowagie.text.pdf.collection;
2 |
3 | import com.lowagie.text.pdf.PdfDictionary;
4 | import com.lowagie.text.pdf.PdfName;
5 | import com.lowagie.text.pdf.PdfString;
6 |
7 | public class PdfCollection extends PdfDictionary {
8 |
9 | /** A type of PDF Collection */
10 | public static final int DETAILS = 0;
11 | /** A type of PDF Collection */
12 | public static final int TILE = 1;
13 | /** A type of PDF Collection */
14 | public static final int HIDDEN = 2;
15 |
16 | /**
17 | * Constructs a PDF Collection.
18 | * @param type the type of PDF collection.
19 | */
20 | public PdfCollection(int type) {
21 | super(PdfName.COLLECTION);
22 | switch(type) {
23 | case TILE:
24 | put(PdfName.VIEW, PdfName.T);
25 | break;
26 | case HIDDEN:
27 | put(PdfName.VIEW, PdfName.H);
28 | break;
29 | default:
30 | put(PdfName.VIEW, PdfName.D);
31 | }
32 | }
33 |
34 | /**
35 | * Identifies the document that will be initially presented
36 | * in the user interface.
37 | * @param description the description that was used when attaching the file to the document
38 | */
39 | public void setInitialDocument(String description) {
40 | put(PdfName.D, new PdfString(description, null));
41 | }
42 |
43 | /**
44 | * Sets the Collection schema dictionary.
45 | * @param schema an overview of the collection fields
46 | */
47 | public void setSchema(PdfCollectionSchema schema) {
48 | put(PdfName.SCHEMA, schema);
49 | }
50 |
51 | /**
52 | * Gets the Collection schema dictionary.
53 | * @return schema an overview of the collection fields
54 | */
55 | public PdfCollectionSchema getSchema() {
56 | return (PdfCollectionSchema)get(PdfName.SCHEMA);
57 | }
58 |
59 | /**
60 | * Sets the Collection sort dictionary.
61 | * @param sort a collection sort dictionary
62 | */
63 | public void setSort(PdfCollectionSort sort) {
64 | put(PdfName.SORT, sort);
65 | }
66 | }
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/collection/PdfCollectionSchema.java:
--------------------------------------------------------------------------------
1 | package com.lowagie.text.pdf.collection;
2 |
3 | import com.lowagie.text.pdf.PdfDictionary;
4 | import com.lowagie.text.pdf.PdfName;
5 |
6 | public class PdfCollectionSchema extends PdfDictionary {
7 | /**
8 | * Creates a Collection Schema dictionary.
9 | */
10 | public PdfCollectionSchema() {
11 | super(PdfName.COLLECTIONSCHEMA);
12 | }
13 |
14 | /**
15 | * Adds a Collection field to the Schema.
16 | * @param name the name of the collection field
17 | * @param field a Collection Field
18 | */
19 | public void addField(String name, PdfCollectionField field) {
20 | put(new PdfName(name), field);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/collection/PdfCollectionSort.java:
--------------------------------------------------------------------------------
1 | package com.lowagie.text.pdf.collection;
2 |
3 | import com.lowagie.text.pdf.PdfArray;
4 | import com.lowagie.text.pdf.PdfBoolean;
5 | import com.lowagie.text.pdf.PdfDictionary;
6 | import com.lowagie.text.pdf.PdfName;
7 | import com.lowagie.text.pdf.PdfObject;
8 |
9 | public class PdfCollectionSort extends PdfDictionary {
10 |
11 | /**
12 | * Constructs a PDF Collection Sort Dictionary.
13 | * @param key the key of the field that will be used to sort entries
14 | */
15 | public PdfCollectionSort(String key) {
16 | super(PdfName.COLLECTIONSORT);
17 | put(PdfName.S, new PdfName(key));
18 | }
19 |
20 | /**
21 | * Constructs a PDF Collection Sort Dictionary.
22 | * @param keys the keys of the fields that will be used to sort entries
23 | */
24 | public PdfCollectionSort(String[] keys) {
25 | super(PdfName.COLLECTIONSORT);
26 | PdfArray array = new PdfArray();
27 | for (int i = 0; i < keys.length; i++) {
28 | array.add(new PdfName(keys[i]));
29 | }
30 | put(PdfName.S, array);
31 | }
32 |
33 | /**
34 | * Defines the sort order of the field (ascending or descending).
35 | * @param ascending true is the default, use false for descending order
36 | */
37 | public void setSortOrder(boolean ascending) {
38 | PdfObject o = get(PdfName.S);
39 | if (o instanceof PdfName) {
40 | put(PdfName.A, new PdfBoolean(ascending));
41 | }
42 | else {
43 | throw new IllegalArgumentException("You have to define a boolean array for this collection sort dictionary.");
44 | }
45 | }
46 |
47 | /**
48 | * Defines the sort order of the field (ascending or descending).
49 | * @param ascending an array with every element corresponding with a name of a field.
50 | */
51 | public void setSortOrder(boolean[] ascending) {
52 | PdfObject o = get(PdfName.S);
53 | if (o instanceof PdfArray) {
54 | if (((PdfArray)o).size() != ascending.length) {
55 | throw new IllegalArgumentException("The number of booleans in this array doesn't correspond with the number of fields.");
56 | }
57 | PdfArray array = new PdfArray();
58 | for (int i = 0; i < ascending.length; i++) {
59 | array.add(new PdfBoolean(ascending[i]));
60 | }
61 | put(PdfName.A, array);
62 | }
63 | else {
64 | throw new IllegalArgumentException("You need a single boolean for this collection sort dictionary.");
65 | }
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/fonts/FontsResourceAnchor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2004 by Paulo Soares.
3 | *
4 | * The contents of this file are subject to the Mozilla Public License Version 1.1
5 | * (the "License"); you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
7 | *
8 | * Software distributed under the License is distributed on an "AS IS" basis,
9 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10 | * for the specific language governing rights and limitations under the License.
11 | *
12 | * The Original Code is 'iText, a free JAVA-PDF library'.
13 | *
14 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
15 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
16 | * All Rights Reserved.
17 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
18 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
19 | *
20 | * Contributor(s): all the names of the contributors are added in the source code
21 | * where applicable.
22 | *
23 | * Alternatively, the contents of this file may be used under the terms of the
24 | * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
25 | * provisions of LGPL are applicable instead of those above. If you wish to
26 | * allow use of your version of this file only under the terms of the LGPL
27 | * License and not to allow others to use your version of this file under
28 | * the MPL, indicate your decision by deleting the provisions above and
29 | * replace them with the notice and other provisions required by the LGPL.
30 | * If you do not delete the provisions above, a recipient may use your version
31 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
32 | *
33 | * This library is free software; you can redistribute it and/or modify it
34 | * under the terms of the MPL as stated above or under the terms of the GNU
35 | * Library General Public License as published by the Free Software Foundation;
36 | * either version 2 of the License, or any later version.
37 | *
38 | * This library is distributed in the hope that it will be useful, but WITHOUT
39 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
40 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
41 | * details.
42 | *
43 | * If you didn't download this code from the following link, you should check if
44 | * you aren't using an obsolete version:
45 | * http://www.lowagie.com/iText/
46 | */
47 | package com.lowagie.text.pdf.fonts;
48 |
49 | /**
50 | * A class to facilitate the loading of resources
51 | *
52 | * @author Paulo Soares (psoares@consiste.pt)
53 | */
54 | public class FontsResourceAnchor {
55 |
56 | /**
57 | * Creates a FontsResourceAnchor
58 | */
59 | public FontsResourceAnchor() {
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/fonts/cmaps/CodespaceRange.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2005, www.fontbox.org
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. Neither the name of fontbox; nor the names of its
14 | * contributors may be used to endorse or promote products derived from this
15 | * software without specific prior written permission.
16 | *
17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
21 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | * http://www.fontbox.org
29 | *
30 | */
31 | package com.lowagie.text.pdf.fonts.cmaps;
32 |
33 | /**
34 | * This represents a single entry in the codespace range.
35 | *
36 | * @author Ben Litchfield (ben@benlitchfield.com)
37 | * @version $Revision: 3646 $
38 | * @since 2.1.4
39 | */
40 | public class CodespaceRange
41 | {
42 |
43 | private byte[] start;
44 | private byte[] end;
45 |
46 | /**
47 | * Creates a new instance of CodespaceRange.
48 | */
49 | public CodespaceRange()
50 | {
51 | }
52 |
53 | /** Getter for property end.
54 | * @return Value of property end.
55 | *
56 | */
57 | public byte[] getEnd()
58 | {
59 | return this.end;
60 | }
61 |
62 | /** Setter for property end.
63 | * @param endBytes New value of property end.
64 | *
65 | */
66 | public void setEnd(byte[] endBytes)
67 | {
68 | end = endBytes;
69 | }
70 |
71 | /** Getter for property start.
72 | * @return Value of property start.
73 | *
74 | */
75 | public byte[] getStart()
76 | {
77 | return this.start;
78 | }
79 |
80 | /** Setter for property start.
81 | * @param startBytes New value of property start.
82 | *
83 | */
84 | public void setStart(byte[] startBytes)
85 | {
86 | start = startBytes;
87 | }
88 |
89 | }
--------------------------------------------------------------------------------
/core/com/lowagie/text/pdf/fonts/mustRead.html:
--------------------------------------------------------------------------------
1 |
2 |
12 | | This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. Col | 13 |
SimpleXMLParser
.
51 | * @author Paulo Soares (psoares@consiste.pt)
52 | */
53 | public interface SimpleXMLDocHandlerComment {
54 | /**
55 | * Called when a comment is found.
56 | * @param text the comment text
57 | */
58 | public void comment(String text);
59 | }
--------------------------------------------------------------------------------
/rtf/com/lowagie/text/rtf/RtfExtendedElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: RtfExtendedElement.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2001, 2002, 2003, 2004 by Mark Hall
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 |
50 | package com.lowagie.text.rtf;
51 |
52 | import java.io.IOException;
53 | import java.io.OutputStream;
54 |
55 | /**
56 | * The RtfExtendedElement interface is to be used for elements that also
57 | * write data into the definition part of the rtf document
58 | *
59 | * @version $Id: RtfExtendedElement.java 3373 2008-05-12 16:21:24Z xlv $
60 | * @author Mark Hall (Mark.Hall@mail.room3b.eu)
61 | * @author Thomas Bickel (tmb99@inode.at)
62 | */
63 | public interface RtfExtendedElement extends RtfBasicElement
64 | {
65 | /**
66 | * Write the definition part of the element
67 | *
68 | * @param out The OutputStream
to write the element definition to
69 | */
70 | public void writeDefinition(OutputStream out) throws IOException;
71 | }
72 |
--------------------------------------------------------------------------------
/rtf/com/lowagie/text/rtf/parser/enumerations/RtfColorThemes.java:
--------------------------------------------------------------------------------
1 | package com.lowagie.text.rtf.parser.enumerations;
2 |
3 | /**
4 | * Specifies the color theme values for use in Color Tables.
5 | *
6 | * @author Howard Shank (hgshank@yahoo.com)
7 | * @since 2.0.8
8 | */
9 | public final class RtfColorThemes {
10 | public static final int THEME_UNDEFINED = -1;
11 | public static final int THEME_MAINDARKONE = 0;
12 | public static final int THEME_MAINDARKTWO = 1;
13 | public static final int THEME_MAINLIGHTONE = 2;
14 | public static final int THEME_MAINLIGHTTWO = 3;
15 | public static final int THEME_ACCENTONE = 4;
16 | public static final int THEME_ACCENTTWO = 5;
17 | public static final int THEME_ACCENTTHREE = 6;
18 | public static final int THEME_ACCENTFOUR = 7;
19 | public static final int THEME_ACCENTFIVE = 8;
20 | public static final int THEME_ACCENTSIX = 9;
21 | public static final int THEME_HYPERLINK = 10;
22 | public static final int THEME_FOLLOWEDHYPERLINK = 11;
23 | public static final int THEME_BACKGROUNDONE = 12;
24 | public static final int THEME_TEXTONE = 13;
25 | public static final int THEME_BACKGROUNDTWO = 14;
26 | public static final int THEME_TEXTTWO = 15;
27 | public static final int THEME_MAX = 15;
28 | }
29 |
--------------------------------------------------------------------------------
/rtf/com/lowagie/text/rtf/parser/exceptions/RtfUnknownCtrlWordException.java:
--------------------------------------------------------------------------------
1 | package com.lowagie.text.rtf.parser.exceptions;
2 |
3 | /**
4 | * @since 2.1.0
5 | */
6 | public class RtfUnknownCtrlWordException extends RtfParserException {
7 |
8 | /**
9 | * Generated serial version UID.
10 | */
11 | private static final long serialVersionUID = 7243046509505727849L;
12 |
13 | // constructors
14 |
15 | /**
16 | * Constructs a RtfParserException
whithout a message.
17 | */
18 | public RtfUnknownCtrlWordException() {
19 | super("Unknown control word.");
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/rtf/com/lowagie/text/rtf/parser/properties/RtfCtrlWordPropertyType.java:
--------------------------------------------------------------------------------
1 | /* $Id: RtfCtrlWordPropertyType.java 3373 2008-05-12 16:21:24Z xlv $
2 | *
3 | * Copyright 2007 by Howard Shank (hgshank@yahoo.com)
4 | *
5 | * The contents of this file are subject to the Mozilla Public License Version 1.1
6 | * (the "License"); you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
8 | *
9 | * Software distributed under the License is distributed on an "AS IS" basis,
10 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 | * for the specific language governing rights and limitations under the License.
12 | *
13 | * The Original Code is 'iText, a free JAVA-PDF library'.
14 | *
15 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
16 | * the Initial Developer are Copyright (C) 1999-2006 by Bruno Lowagie.
17 | * All Rights Reserved.
18 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
19 | * are Copyright (C) 2000-2006 by Paulo Soares. All Rights Reserved.
20 | *
21 | * Contributor(s): all the names of the contributors are added in the source code
22 | * where applicable.
23 | *
24 | * Alternatively, the contents of this file may be used under the terms of the
25 | * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the
26 | * provisions of LGPL are applicable instead of those above. If you wish to
27 | * allow use of your version of this file only under the terms of the LGPL
28 | * License and not to allow others to use your version of this file under
29 | * the MPL, indicate your decision by deleting the provisions above and
30 | * replace them with the notice and other provisions required by the LGPL.
31 | * If you do not delete the provisions above, a recipient may use your version
32 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
33 | *
34 | * This library is free software; you can redistribute it and/or modify it
35 | * under the terms of the MPL as stated above or under the terms of the GNU
36 | * Library General Public License as published by the Free Software Foundation;
37 | * either version 2 of the License, or any later version.
38 | *
39 | * This library is distributed in the hope that it will be useful, but WITHOUT
40 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
41 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
42 | * details.
43 | *
44 | * If you didn't download this code from the following link, you should check if
45 | * you aren't using an obsolete version:
46 | * http://www.lowagie.com/iText/
47 | */
48 | package com.lowagie.text.rtf.parser.properties;
49 |
50 | /**
51 | * @since 2.1.0
52 | */
53 | public class RtfCtrlWordPropertyType {
54 | public static final int UNIDENTIFIED = -1;
55 | public static final int PROPERTY = 0;
56 | public static final int CHARACTER = 1;
57 | public static final int SPECIAL = 2;
58 | public static final int DESTINATION = 3;
59 | }
60 |
--------------------------------------------------------------------------------
/rtf/com/lowagie/text/rtf/parser/properties/RtfPropertyListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: RtfPropertyListener.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2007 by Howard Shank (hgshank@yahoo.com)
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2006 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2006 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 | package com.lowagie.text.rtf.parser.properties;
50 |
51 | import java.util.EventListener;
52 |
53 | /**
54 | * RtfPropertyListener
interface for handling events.
55 | *
56 | * @author Howard Shank (hgshank@yahoo.com)
57 | *
58 | * @since 2.0.8
59 | */
60 | public interface RtfPropertyListener extends EventListener {
61 | /**
62 | *
63 | */
64 | public void beforePropertyChange(String propertyName);
65 | /**
66 | *
67 | */
68 | public void afterPropertyChange(String propertyName);
69 | }
70 |
--------------------------------------------------------------------------------
/rtf/com/lowagie/text/rtf/style/RtfStyleTypes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: RtfStyleTypes.java 3373 2008-05-12 16:21:24Z xlv $
3 | *
4 | * Copyright 2007 by Howard Shank (hgshank@yahoo.com)
5 | *
6 | * The contents of this file are subject to the Mozilla Public License Version 1.1
7 | * (the "License"); you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 | *
10 | * Software distributed under the License is distributed on an "AS IS" basis,
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 | * for the specific language governing rights and limitations under the License.
13 | *
14 | * The Original Code is 'iText, a free JAVA-PDF library'.
15 | *
16 | * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17 | * the Initial Developer are Copyright (C) 1999-2006 by Bruno Lowagie.
18 | * All Rights Reserved.
19 | * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20 | * are Copyright (C) 2000-2006 by Paulo Soares. All Rights Reserved.
21 | *
22 | * Contributor(s): all the names of the contributors are added in the source code
23 | * where applicable.
24 | *
25 | * Alternatively, the contents of this file may be used under the terms of the
26 | * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the
27 | * provisions of LGPL are applicable instead of those above. If you wish to
28 | * allow use of your version of this file only under the terms of the LGPL
29 | * License and not to allow others to use your version of this file under
30 | * the MPL, indicate your decision by deleting the provisions above and
31 | * replace them with the notice and other provisions required by the LGPL.
32 | * If you do not delete the provisions above, a recipient may use your version
33 | * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34 | *
35 | * This library is free software; you can redistribute it and/or modify it
36 | * under the terms of the MPL as stated above or under the terms of the GNU
37 | * Library General Public License as published by the Free Software Foundation;
38 | * either version 2 of the License, or any later version.
39 | *
40 | * This library is distributed in the hope that it will be useful, but WITHOUT
41 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42 | * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43 | * details.
44 | *
45 | * If you didn't download this code from the following link, you should check if
46 | * you aren't using an obsolete version:
47 | * http://www.lowagie.com/iText/
48 | */
49 | package com.lowagie.text.rtf.style;
50 |
51 | /**
52 | * RtfStyleTypes
contains the different types of Stylesheet entries
53 | * that exist in RTF.
54 | *
55 | * @author Howard Shank (hgshank@yahoo.com)
56 | * @since 2.0.8
57 | */
58 | public final class RtfStyleTypes {
59 | /**
60 | * Indicates paragraph style.
61 | */
62 | public final static int PARAGRAPH = 0;
63 | /**
64 | * Indicates character style.
65 | */
66 | public final static int CHARACTER = 0;
67 | /**
68 | * Indicates section style.
69 | */
70 | public final static int SECTION = 2;
71 | /**
72 | * Indicates Table style.
73 | */
74 | public final static int TABLE = 3;
75 | /**
76 | * Indicates table definition style.
77 | */
78 | public final static int TABLE_STYLE_DEFINITION = 4;
79 | }
80 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/Rups.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: Rups.java 3242 2008-04-13 23:00:20Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups;
22 |
23 | import java.awt.Dimension;
24 | import java.awt.Toolkit;
25 |
26 | import javax.swing.JFrame;
27 |
28 | import com.lowagie.rups.controller.RupsController;
29 |
30 | /**
31 | * iText RUPS is a tool that combines SUN's PDF Renderer (to view PDF
32 | * documents), iText's PdfReader (to inspect the internal structure of a
33 | * PDF file), and iText's PdfStamper to manipulate a PDF file.
34 | */
35 | public class Rups {
36 |
37 | /** The version String; this String may only be changed by Bruno Lowagie. */
38 | public static final String VERSION = "RUPS 0.0.1 (by lowagie.com)";
39 |
40 | // main method
41 | /**
42 | * Main method of this PdfFrame class.
43 | * @param args no arguments needed
44 | */
45 | public static void main(String[] args) {
46 | startApplication();
47 | }
48 |
49 | // methods
50 |
51 | /**
52 | * Initializes the main components of the Rups application.
53 | */
54 | public static void startApplication() {
55 | JFrame frame = new JFrame();
56 | // size and location
57 | Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
58 | frame.setSize((int)(screen.getWidth() * .90), (int)(screen.getHeight() * .90));
59 | frame.setLocation((int)(screen.getWidth() * .05), (int)(screen.getHeight() * .05));
60 | frame.setResizable(true);
61 |
62 | // title bar
63 | frame.setTitle("iText RUPS");
64 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
65 |
66 | // the content
67 | RupsController controller = new RupsController(frame.getSize());
68 | frame.setJMenuBar(controller.getMenuBar());
69 | frame.getContentPane().add(controller.getMasterComponent(), java.awt.BorderLayout.CENTER);
70 | frame.setVisible(true);
71 | }
72 |
73 | // other member variables
74 |
75 | /** Serial Version UID. */
76 | private static final long serialVersionUID = 4386633640535735848L;
77 |
78 | }
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/io/FileChooserAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: FileChooserAction.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.io;
22 |
23 | import java.awt.event.ActionEvent;
24 | import java.io.File;
25 | import java.util.Observable;
26 |
27 | import javax.swing.AbstractAction;
28 | import javax.swing.JFileChooser;
29 | import javax.swing.filechooser.FileFilter;
30 |
31 | /**
32 | * Allows you to browse the file system and forwards the file
33 | * to the object that is waiting for you to choose a file.
34 | */
35 | public class FileChooserAction extends AbstractAction {
36 |
37 | /** An object that is expecting the result of the file chooser action. */
38 | protected Observable observable;
39 | /** A file filter to apply when browsing for a file. */
40 | protected FileFilter filter;
41 | /** Indicates if you're browsing to create a new or an existing file. */
42 | protected boolean newFile;
43 | /** The file that was chosen. */
44 | protected File file;
45 |
46 | /**
47 | * Creates a new file chooser action.
48 | * @param observable the object waiting for you to select file
49 | * @param caption a description for the action
50 | * @param filter a filter to apply when browsing
51 | * @param newFile indicates if you should browse for a new or existing file
52 | */
53 | public FileChooserAction(Observable observable, String caption, FileFilter filter, boolean newFile) {
54 | super(caption);
55 | this.observable = observable;
56 | this.filter = filter;
57 | this.newFile = newFile;
58 | }
59 |
60 | /**
61 | * Getter for the file.
62 | */
63 | public File getFile() {
64 | return file;
65 | }
66 |
67 | /**
68 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
69 | */
70 | public void actionPerformed(ActionEvent evt) {
71 | JFileChooser fc = new JFileChooser();
72 | if (filter != null) {
73 | fc.setFileFilter(filter);
74 | }
75 | int okCancel;
76 | if (newFile) {
77 | okCancel = fc.showSaveDialog(null);
78 | }
79 | else {
80 | okCancel = fc.showOpenDialog(null);
81 | }
82 | if (okCancel == JFileChooser.APPROVE_OPTION) {
83 | file = fc.getSelectedFile();
84 | observable.notifyObservers(this);
85 | }
86 | }
87 |
88 | /** A serial version UID. */
89 | private static final long serialVersionUID = 2225830878098387118L;
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/io/FileCloseAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: FileCloseAction.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.io;
22 |
23 | import java.awt.event.ActionEvent;
24 | import java.awt.event.ActionListener;
25 | import java.util.Observable;
26 |
27 | /**
28 | * Action that tells an observable to close a file and/or releases
29 | * resources relevant for the file that is being closed.
30 | */
31 | public class FileCloseAction implements ActionListener {
32 |
33 | /** An object that allows you to close a file. */
34 | protected Observable observable;
35 |
36 | /**
37 | * Creates the close action.
38 | * @param observable the object that expects you to close a file.
39 | */
40 | public FileCloseAction(Observable observable) {
41 | this.observable = observable;
42 | }
43 |
44 | /**
45 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
46 | */
47 | public void actionPerformed(ActionEvent evt) {
48 | observable.notifyObservers(this);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/io/OutputStreamResource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: OutputStreamResource.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.io;
22 |
23 | import java.io.IOException;
24 | import java.io.OutputStream;
25 |
26 | /**
27 | * An object that implements this interface is a resource that
28 | * can be written to an OutputStream.
29 | */
30 | public interface OutputStreamResource {
31 | /**
32 | * Writes a resource to an OutputStream.
33 | * @param os the OutputStream to which the XML is written.
34 | * @throws IOException usual exception when there's a problem writing to an OutputStream
35 | */
36 | public void writeTo(OutputStream os) throws IOException;
37 | }
38 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/io/TextAreaOutputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: TextAreaOutputStream.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.io;
22 |
23 | import java.io.ByteArrayInputStream;
24 | import java.io.IOException;
25 | import java.io.OutputStream;
26 |
27 | import javax.swing.JTextArea;
28 |
29 | /**
30 | * Everything writing to this OutputStream will be shown in a JTextArea.
31 | */
32 | public class TextAreaOutputStream extends OutputStream {
33 | /** The text area to which we want to write. */
34 | protected JTextArea text;
35 | /** Keeps track of the offset of the text in the text area. */
36 | protected int offset;
37 |
38 | /**
39 | * Constructs a TextAreaOutputStream.
40 | * @param text the text area to which we want to write.
41 | * @throws IOException
42 | */
43 | public TextAreaOutputStream(JTextArea text) throws IOException {
44 | this.text = text;
45 | clear();
46 | }
47 |
48 | /**
49 | * Clear the text area.
50 | */
51 | public void clear() {
52 | text.setText(null);
53 | offset = 0;
54 | }
55 |
56 | /**
57 | * @see java.io.OutputStream#write(int)
58 | */
59 | @Override
60 | public void write(int i) throws IOException {
61 | byte[] b = { (byte)i };
62 | write(b, 0, 1);
63 | }
64 |
65 | /**
66 | * @see java.io.OutputStream#write(byte[], int, int)
67 | */
68 | @Override
69 | public void write(byte[] b, int off, int len) throws IOException {
70 | String snippet = new String(b, off, len);
71 | text.insert(snippet, offset);
72 | offset += len - off;
73 | }
74 |
75 | /**
76 | * @see java.io.OutputStream#write(byte[])
77 | */
78 | @Override
79 | public void write(byte[] b) throws IOException {
80 | ByteArrayInputStream bais = new ByteArrayInputStream(b);
81 | byte[] snippet = new byte[1024];
82 | int bytesread;
83 | while ((bytesread = bais.read(snippet)) > 0) {
84 | write(snippet, 0, bytesread);
85 | }
86 | }
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/io/filters/PdfFilter.java:
--------------------------------------------------------------------------------
1 | package com.lowagie.rups.io.filters;
2 |
3 | import java.io.File;
4 |
5 | import javax.swing.filechooser.FileFilter;
6 |
7 |
8 | /**
9 | * Filters PDF files in a JFileChooser.
10 | */
11 | public class PdfFilter extends FileFilter {
12 |
13 | /** A public instance of the PdfFilter. */
14 | public static final PdfFilter INSTANCE = new PdfFilter();
15 |
16 | /**
17 | *
18 | * @see javax.swing.filechooser.FileFilter#accept(java.io.File)
19 | * @param f File
20 | * @return boolean
21 | */
22 | public boolean accept(File f) {
23 | if (f.isDirectory()) return true;
24 | if (f.getName().toLowerCase().endsWith(".pdf")) return true;
25 | return false;
26 | }
27 |
28 | /**
29 | *
30 | * @see javax.swing.filechooser.FileFilter#getDescription()
31 | * @return String
32 | */
33 | public String getDescription() {
34 | return "*.pdf PDF files";
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/model/ObjectLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: ObjectLoader.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.model;
22 |
23 | import java.util.Observable;
24 |
25 | import com.lowagie.text.pdf.PdfReader;
26 |
27 | /**
28 | * Loads the necessary iText PDF objects in Background.
29 | */
30 | public class ObjectLoader extends BackgroundTask {
31 | /** This is the object that will forward the updates to the observers. */
32 | protected Observable observable;
33 | /** iText's PdfReader object. */
34 | protected PdfReader reader;
35 | /** The factory that can provide PDF objects. */
36 | protected IndirectObjectFactory objects;
37 | /** The factory that can provide tree nodes. */
38 | protected TreeNodeFactory nodes;
39 |
40 | /**
41 | * Creates a new ObjectLoader.
42 | * @param observable the object that will forward the changes.
43 | * @param reader the PdfReader from which the objects will be read.
44 | */
45 | public ObjectLoader(Observable observable, PdfReader reader) {
46 | this.observable = observable;
47 | this.reader = reader;
48 | start();
49 | }
50 |
51 | /**
52 | * Getter for the PdfReader object.
53 | * @return a reader object
54 | */
55 | public PdfReader getReader() {
56 | return reader;
57 | }
58 |
59 | /**
60 | * Getter for the object factory.
61 | * @return an indirect object factory
62 | */
63 | public IndirectObjectFactory getObjects() {
64 | return objects;
65 | }
66 |
67 | /**
68 | * Getter for the tree node factory.
69 | * @return a tree node factory
70 | */
71 | public TreeNodeFactory getNodes() {
72 | return nodes;
73 | }
74 |
75 | /**
76 | * @see com.lowagie.rups.model.BackgroundTask#doTask()
77 | */
78 | @Override
79 | public void doTask() {
80 | ProgressDialog progress = new ProgressDialog(null, "Reading PDF file");
81 | objects = new IndirectObjectFactory(reader);
82 | int n = objects.getXRefMaximum();
83 | progress.setMessage("Reading the Cross-Reference table");
84 | progress.setTotal(n);
85 | while (objects.storeNextObject()) {
86 | progress.setValue(objects.getCurrent());
87 | }
88 | progress.setTotal(0);
89 | nodes = new TreeNodeFactory(objects);
90 | progress.setMessage("Updating GUI");
91 | observable.notifyObservers(this);
92 | progress.dispose();
93 | }
94 | }
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/model/PageLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PageLoader.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.model;
22 |
23 | import com.sun.pdfview.PDFFile;
24 | import com.sun.pdfview.PDFPage;
25 |
26 | /**
27 | * Loads all the PDFPage objects for SUN's PDF Renderer
28 | * in Background.
29 | */
30 | public class PageLoader extends BackgroundTask {
31 |
32 | /** The PDFFile (SUN's PDF Renderer class) */
33 | protected PDFFile file;
34 | /** The total number of pages. */
35 | protected int numberOfPages;
36 | /** True for pages with page number equal to index + 1 that are being loaded. */
37 | protected boolean[] busy;
38 | /** True for pages with page number equal to index + 1 that have already been loaded. */
39 | protected boolean[] done;
40 |
41 | /**
42 | * Creates a new page loader.
43 | * @param file the PDFFile (SUN's PDF Renderer)
44 | */
45 | public PageLoader(PDFFile file) {
46 | super();
47 | this.file = file;
48 | numberOfPages = file.getNumPages();
49 | busy = new boolean[numberOfPages];
50 | done = new boolean[numberOfPages];
51 | start();
52 | }
53 |
54 | /**
55 | * Getter for the number of pages.
56 | * @return the number of pages in the PDF file.
57 | */
58 | public int getNumberOfPages() {
59 | return numberOfPages;
60 | }
61 |
62 | /**
63 | * Loads a page.
64 | * @param pageNumber the number of the page that has to be loaded.
65 | * @return the PDFPage that has been loaded.
66 | */
67 | public synchronized PDFPage loadPage(int pageNumber) {
68 | pageNumber--;
69 | if (busy[pageNumber]) return null;
70 | busy[pageNumber] = true;
71 | PDFPage page = file.getPage(pageNumber + 1, true);
72 | if (!done[pageNumber]) {
73 | System.out.println("Loading page " + (pageNumber + 1));
74 | }
75 | done[pageNumber] = true;
76 | busy[pageNumber] = false;
77 | return page;
78 | }
79 |
80 | /**
81 | * @see com.lowagie.rups.model.BackgroundTask#doTask()
82 | */
83 | @Override
84 | public void doTask() {
85 | for (int i = 0; i < numberOfPages; i++) {
86 | loadPage(i + 1);
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/model/XfaFile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: XfaFile.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.model;
22 |
23 | import java.io.ByteArrayInputStream;
24 | import java.io.ByteArrayOutputStream;
25 | import java.io.IOException;
26 | import java.io.OutputStream;
27 |
28 | import org.dom4j.Document;
29 | import org.dom4j.DocumentException;
30 | import org.dom4j.io.OutputFormat;
31 | import org.dom4j.io.SAXReader;
32 | import org.dom4j.io.XMLWriter;
33 |
34 | import com.lowagie.rups.io.OutputStreamResource;
35 |
36 | /** Class that deals with the XFA file that can be inside a PDF file. */
37 | public class XfaFile implements OutputStreamResource {
38 |
39 | /** The X4J Document object (XML). */
40 | protected Document xfaDocument;
41 |
42 | /**
43 | * Constructs an XFA file from an OutputStreamResource.
44 | * This resource can be an XML file or a node in a RUPS application.
45 | * @param resource the XFA resource
46 | * @throws IOException
47 | * @throws DocumentException
48 | */
49 | public XfaFile(OutputStreamResource resource) throws IOException, DocumentException {
50 | // Is there a way to avoid loading everything in memory?
51 | // Can we somehow get the XML from the PDF as an InputSource, Reader or InputStream?
52 | ByteArrayOutputStream baos = new ByteArrayOutputStream();
53 | resource.writeTo(baos);
54 | ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
55 | SAXReader reader = new SAXReader();
56 | xfaDocument = reader.read(bais);
57 | }
58 |
59 | /**
60 | * Getter for the XFA Document object.
61 | * @return a Document object (X4J)
62 | */
63 | public Document getXfaDocument() {
64 | return xfaDocument;
65 | }
66 |
67 | /**
68 | * Writes a formatted XML file to the OutputStream.
69 | * @see com.lowagie.rups.io.OutputStreamResource#writeTo(java.io.OutputStream)
70 | */
71 | public void writeTo(OutputStream os) throws IOException {
72 | if (xfaDocument == null)
73 | return;
74 | OutputFormat format = new OutputFormat(" ", true);
75 | XMLWriter writer = new XMLWriter(os, format);
76 | writer.write(xfaDocument);
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/view/MessageAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: MessageAction.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.view;
22 |
23 | import java.awt.event.ActionEvent;
24 | import java.awt.event.ActionListener;
25 |
26 | import javax.swing.JOptionPane;
27 |
28 | import com.lowagie.rups.Rups;
29 | import com.lowagie.text.Document;
30 |
31 | public class MessageAction implements ActionListener {
32 |
33 | public void actionPerformed(ActionEvent evt) {
34 | String message = "Unspecified message";
35 | if (RupsMenuBar.ABOUT.equals(evt.getActionCommand())) {
36 | message = "RUPS is a tool by lowagie.com.\nIt uses iText, a Free Java-PDF Library\nand SUN's PDF Renderer.\nVisit http://www.lowagie.com/iText/ for more info.";
37 | }
38 | else if (RupsMenuBar.VERSIONS.equals(evt.getActionCommand())) {
39 | message = "RUPS version String: " + Rups.VERSION
40 | + "\niText version String: " + Document.getVersion()
41 | + "\nSUN's PDF Renderer version: version unknown";
42 | }
43 | JOptionPane.showMessageDialog(null, message);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/view/PageNavigationListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: PageNavigationListener.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.view;
22 |
23 | /**
24 | * Interface that has to be implemented by every class that listens
25 | * to page navigation features; keys that are pressed, buttons that
26 | * are pushed,...
27 | */
28 | public interface PageNavigationListener {
29 |
30 | /**
31 | * Returns the total number of pages in a document.
32 | * @return the total number of pages in a document.
33 | */
34 | public int getTotalNumberOfPages();
35 | /**
36 | * Returns the current page number of a document.
37 | * @return the current page number.
38 | */
39 | public int getCurrentPageNumber();
40 | /**
41 | * Goes to the first page in a document.
42 | * @return the resulting page number.
43 | * Can be different from 1 if the document is null
44 | */
45 | public int gotoFirstPage();
46 | /**
47 | * Goes to the previous page in a document.
48 | * @return the resulting page number.
49 | * Can be different from (current page - 1) if the document is null
50 | * or the current page = 1.
51 | */
52 | public int gotoPreviousPage();
53 | /**
54 | * Goes to a specific page number in a document.
55 | * @param pageNumber
56 | * @return the resulting page number.
57 | * Can be different from pageNumber if pageNumber doesn't exist.
58 | */
59 | public int gotoPage(int pageNumber);
60 | /**
61 | * Goes to the previous page in a document.
62 | * @return the resulting page number.
63 | * Can be different from (current page + 1) if the document is null
64 | * or the current page equals the total number of pages.
65 | */
66 | public int gotoNextPage();
67 | /**
68 | * Goes to the last page in a document.
69 | * @return the resulting page number.
70 | * Can be different from the total number of pages if the document is null
71 | */
72 | public int gotoLastPage();
73 | }
74 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/view/icons/IconActionListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: IconActionListener.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.view.icons;
22 |
23 | import java.awt.event.ActionListener;
24 |
25 | import javax.swing.Icon;
26 |
27 | /**
28 | * Special ActionListener to be implemented by Buttons that need an Icon.
29 | */
30 | public interface IconActionListener extends ActionListener {
31 | /** Returns an Icon. */
32 | public Icon getIcon();
33 | }
34 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/view/icons/IconButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: IconButton.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.view.icons;
22 |
23 | import javax.swing.JButton;
24 |
25 | /**
26 | * JButton with an Icon that performs an Action if you push it.
27 | */
28 | public class IconButton extends JButton {
29 |
30 | /**
31 | * Creates a button with an Icon that performs an
32 | * action when you push it.
33 | */
34 | public IconButton(IconActionListener listener) {
35 | super(listener.getIcon());
36 | addActionListener(listener);
37 | }
38 |
39 | /** A Serial Version UID. */
40 | private static final long serialVersionUID = 3523016393512117003L;
41 | }
42 |
--------------------------------------------------------------------------------
/rups/com/lowagie/rups/view/icons/IconFetcher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id: IconFetcher.java 3117 2008-01-31 05:53:22Z xlv $
3 | *
4 | * Copyright 2007 Bruno Lowagie.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | package com.lowagie.rups.view.icons;
22 |
23 | import java.util.HashMap;
24 |
25 | import javax.swing.Icon;
26 | import javax.swing.ImageIcon;
27 |
28 | /**
29 | * Class that fetches the icons in com.lowagie.trapeze.icons.
30 | */
31 | public class IconFetcher {
32 |
33 | /** Cache with icons. */
34 | protected static HashMap