├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── codeql.yml │ └── maven.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Contributors.md ├── LICENSE.md ├── README.md ├── Security.md ├── changelogs ├── 1.3.27.md ├── 1.3.28.md ├── 1.3.29.md ├── 1.3.30.md ├── 1.3.31.md ├── 1.3.32.md ├── 1.3.37.md ├── 2.0.0.md ├── 2.0.4.md ├── 2.1.0.md ├── 2.2.0.md ├── 2.2.1.md ├── 2.2.2.md ├── 2.2.3.md ├── 2.2.4.md └── README.md ├── checkstyle.xml ├── config ├── README.md ├── eclipse-java-openpdf-style.xml └── intellij-java-openpdf-style.xml ├── createRelease.sh ├── openpdf-fonts-extra ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── librepdf │ │ │ └── openpdf │ │ │ └── fonts │ │ │ └── Liberation.java │ └── resources │ │ ├── META-INF │ │ ├── LGPL-2.1.md │ │ ├── LICENSES.md │ │ └── MPL-2.0.txt │ │ └── liberation │ │ ├── AUTHORS │ │ ├── ChangeLog │ │ ├── LICENSE │ │ ├── LiberationMono-Bold.ttf │ │ ├── LiberationMono-BoldItalic.ttf │ │ ├── LiberationMono-Italic.ttf │ │ ├── LiberationMono-Regular.ttf │ │ ├── LiberationSans-Bold.ttf │ │ ├── LiberationSans-BoldItalic.ttf │ │ ├── LiberationSans-Italic.ttf │ │ ├── LiberationSans-Regular.ttf │ │ ├── LiberationSerif-Bold.ttf │ │ ├── LiberationSerif-BoldItalic.ttf │ │ ├── LiberationSerif-Italic.ttf │ │ ├── LiberationSerif-Regular.ttf │ │ ├── README │ │ └── TODO │ └── test │ └── java │ └── org │ └── librepdf │ └── openpdf │ └── fonts │ ├── FontsTestUtil.java │ ├── GreekAndCyrillicTest.java │ ├── LiberationTest.java │ └── UnicodePdfTest.java ├── openpdf-html ├── LICENSE-LGPL-2.1.txt ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openpdf │ │ │ ├── context │ │ │ ├── AWTFontResolver.java │ │ │ ├── ContentFunctionFactory.java │ │ │ ├── StandardAttributeResolver.java │ │ │ ├── StyleReference.java │ │ │ ├── StylesheetCache.java │ │ │ ├── StylesheetFactoryImpl.java │ │ │ └── package-info.java │ │ │ ├── css │ │ │ ├── constants │ │ │ │ ├── CSSName.java │ │ │ │ ├── IdentValue.java │ │ │ │ ├── MarginBoxName.java │ │ │ │ ├── PageElementPosition.java │ │ │ │ ├── ValueConstants.java │ │ │ │ └── package-info.java │ │ │ ├── extend │ │ │ │ ├── AttributeResolver.java │ │ │ │ ├── ContentFunction.java │ │ │ │ ├── StylesheetFactory.java │ │ │ │ ├── TreeResolver.java │ │ │ │ └── lib │ │ │ │ │ └── DOMTreeResolver.java │ │ │ ├── newmatch │ │ │ │ ├── CascadedStyle.java │ │ │ │ ├── Condition.java │ │ │ │ ├── Matcher.java │ │ │ │ ├── PageInfo.java │ │ │ │ └── Selector.java │ │ │ ├── parser │ │ │ │ ├── CSSErrorHandler.java │ │ │ │ ├── CSSParseException.java │ │ │ │ ├── CSSParser.java │ │ │ │ ├── CounterData.java │ │ │ │ ├── FSCMYKColor.java │ │ │ │ ├── FSColor.java │ │ │ │ ├── FSFunction.java │ │ │ │ ├── FSRGBColor.java │ │ │ │ ├── HSBColor.java │ │ │ │ ├── Lexer.flex │ │ │ │ ├── Lexer.java │ │ │ │ ├── PropertyValue.java │ │ │ │ ├── Token.java │ │ │ │ ├── package-info.java │ │ │ │ └── property │ │ │ │ │ ├── AbstractPropertyBuilder.java │ │ │ │ │ ├── BackgroundPropertyBuilder.java │ │ │ │ │ ├── BorderPropertyBuilders.java │ │ │ │ │ ├── BorderSpacingPropertyBuilder.java │ │ │ │ │ ├── BuilderUtil.java │ │ │ │ │ ├── ContentPropertyBuilder.java │ │ │ │ │ ├── Conversions.java │ │ │ │ │ ├── CounterPropertyBuilder.java │ │ │ │ │ ├── FontPropertyBuilder.java │ │ │ │ │ ├── ListStylePropertyBuilder.java │ │ │ │ │ ├── OneToFourPropertyBuilders.java │ │ │ │ │ ├── PageSize.java │ │ │ │ │ ├── PrimitivePropertyBuilders.java │ │ │ │ │ ├── PropertyBuilder.java │ │ │ │ │ ├── QuotesPropertyBuilder.java │ │ │ │ │ ├── SizePropertyBuilder.java │ │ │ │ │ └── package-info.java │ │ │ ├── sheet │ │ │ │ ├── FontFaceRule.java │ │ │ │ ├── MediaRule.java │ │ │ │ ├── PageRule.java │ │ │ │ ├── PropertyDeclaration.java │ │ │ │ ├── Ruleset.java │ │ │ │ ├── RulesetContainer.java │ │ │ │ ├── Stylesheet.java │ │ │ │ └── StylesheetInfo.java │ │ │ ├── style │ │ │ │ ├── BackgroundPosition.java │ │ │ │ ├── BackgroundSize.java │ │ │ │ ├── BorderRadiusCorner.java │ │ │ │ ├── CalculatedStyle.java │ │ │ │ ├── CssContext.java │ │ │ │ ├── CssKnowledge.java │ │ │ │ ├── DerivedValue.java │ │ │ │ ├── EmptyStyle.java │ │ │ │ ├── FSDerivedValue.java │ │ │ │ ├── FontSizeHelper.java │ │ │ │ ├── Length.java │ │ │ │ ├── derived │ │ │ │ │ ├── BorderPropertySet.java │ │ │ │ │ ├── ColorValue.java │ │ │ │ │ ├── DerivedValueFactory.java │ │ │ │ │ ├── FSLinearGradient.java │ │ │ │ │ ├── FunctionValue.java │ │ │ │ │ ├── LengthValue.java │ │ │ │ │ ├── ListValue.java │ │ │ │ │ ├── NumberValue.java │ │ │ │ │ ├── RectPropertySet.java │ │ │ │ │ ├── StringValue.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ ├── util │ │ │ │ └── ConversionUtil.java │ │ │ └── value │ │ │ │ └── FontSpecification.java │ │ │ ├── event │ │ │ ├── DocumentListener.java │ │ │ └── package-info.java │ │ │ ├── extend │ │ │ ├── FSCanvas.java │ │ │ ├── FSGlyphVector.java │ │ │ ├── FSImage.java │ │ │ ├── FontContext.java │ │ │ ├── FontResolver.java │ │ │ ├── NamespaceHandler.java │ │ │ ├── OutputDevice.java │ │ │ ├── ReplacedElement.java │ │ │ ├── ReplacedElementFactory.java │ │ │ ├── TextRenderer.java │ │ │ ├── UserAgentCallback.java │ │ │ ├── UserInterface.java │ │ │ └── package-info.java │ │ │ ├── layout │ │ │ ├── BlockBoxing.java │ │ │ ├── BlockFormattingContext.java │ │ │ ├── BoxBuilder.java │ │ │ ├── BoxCollector.java │ │ │ ├── BoxRange.java │ │ │ ├── BoxRangeData.java │ │ │ ├── BoxRangeHelper.java │ │ │ ├── BoxRangeLists.java │ │ │ ├── BreakAtLineContext.java │ │ │ ├── CollapsedBorderSide.java │ │ │ ├── CounterFunction.java │ │ │ ├── FloatLayoutResult.java │ │ │ ├── FloatManager.java │ │ │ ├── FunctionData.java │ │ │ ├── InlineBoxMeasurements.java │ │ │ ├── InlineBoxing.java │ │ │ ├── InlinePaintable.java │ │ │ ├── Layer.java │ │ │ ├── LayoutContext.java │ │ │ ├── LayoutState.java │ │ │ ├── LayoutUtil.java │ │ │ ├── LineBreakContext.java │ │ │ ├── PaintingInfo.java │ │ │ ├── PersistentBFC.java │ │ │ ├── SharedContext.java │ │ │ ├── StyleTracker.java │ │ │ ├── Styleable.java │ │ │ ├── TextUtil.java │ │ │ ├── VerticalAlignContext.java │ │ │ ├── WhitespaceStripper.java │ │ │ ├── breaker │ │ │ │ ├── BreakAnywhereLineBreakStrategy.java │ │ │ │ ├── BreakPoint.java │ │ │ │ ├── BreakPointsProvider.java │ │ │ │ ├── Breaker.java │ │ │ │ ├── DefaultLineBreakingStrategy.java │ │ │ │ ├── LineBreakingStrategy.java │ │ │ │ ├── ListBreakPointsProvider.java │ │ │ │ ├── UrlAwareLineBreakIterator.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── newtable │ │ │ ├── CollapsedBorderValue.java │ │ │ ├── ColumnData.java │ │ │ ├── RowData.java │ │ │ ├── TableBox.java │ │ │ ├── TableCellBox.java │ │ │ ├── TableColumn.java │ │ │ ├── TableRowBox.java │ │ │ ├── TableSectionBox.java │ │ │ └── package-info.java │ │ │ ├── pdf │ │ │ ├── AbstractFormField.java │ │ │ ├── BookmarkElement.java │ │ │ ├── CJKFontResolver.java │ │ │ ├── CheckboxFormField.java │ │ │ ├── DOMUtil.java │ │ │ ├── DefaultPDFCreationListener.java │ │ │ ├── DocumentSplitter.java │ │ │ ├── EmptyReplacedElement.java │ │ │ ├── FontDescription.java │ │ │ ├── FontFamily.java │ │ │ ├── HTMLOutline.java │ │ │ ├── Html2Pdf.java │ │ │ ├── ITextFSFont.java │ │ │ ├── ITextFSFontMetrics.java │ │ │ ├── ITextFSImage.java │ │ │ ├── ITextFontContext.java │ │ │ ├── ITextFontResolver.java │ │ │ ├── ITextImageElement.java │ │ │ ├── ITextOutputDevice.java │ │ │ ├── ITextRenderer.java │ │ │ ├── ITextReplacedElement.java │ │ │ ├── ITextReplacedElementFactory.java │ │ │ ├── ITextTextRenderer.java │ │ │ ├── ITextUserAgent.java │ │ │ ├── PDFAsImage.java │ │ │ ├── PDFCreationListener.java │ │ │ ├── PDFEncryption.java │ │ │ ├── PagePosition.java │ │ │ ├── RadioButtonFormField.java │ │ │ ├── SAXEventRecorder.java │ │ │ ├── TextFormField.java │ │ │ ├── ToPDF.java │ │ │ ├── TrueTypeUtil.java │ │ │ ├── package-info.java │ │ │ └── util │ │ │ │ ├── XHtmlMetaToPdfInfoAdapter.java │ │ │ │ └── package-info.java │ │ │ ├── render │ │ │ ├── AbstractOutputDevice.java │ │ │ ├── AnonymousBlockBox.java │ │ │ ├── BlockBox.java │ │ │ ├── BorderPainter.java │ │ │ ├── Box.java │ │ │ ├── BoxDimensions.java │ │ │ ├── CharCounts.java │ │ │ ├── ContentLimit.java │ │ │ ├── ContentLimitContainer.java │ │ │ ├── FSFont.java │ │ │ ├── FSFontMetrics.java │ │ │ ├── FloatDistances.java │ │ │ ├── FloatedBoxData.java │ │ │ ├── InlineBox.java │ │ │ ├── InlineLayoutBox.java │ │ │ ├── InlineText.java │ │ │ ├── JustificationInfo.java │ │ │ ├── LineBox.java │ │ │ ├── LineMetricsAdapter.java │ │ │ ├── ListItemPainter.java │ │ │ ├── MarginBox.java │ │ │ ├── MarkerData.java │ │ │ ├── PageBox.java │ │ │ ├── RenderingContext.java │ │ │ ├── StrutMetrics.java │ │ │ ├── TextDecoration.java │ │ │ ├── ViewportBox.java │ │ │ └── package-info.java │ │ │ ├── resource │ │ │ ├── AbstractResource.java │ │ │ ├── CSSResource.java │ │ │ ├── FSCatalog.java │ │ │ ├── FSEntityResolver.java │ │ │ ├── ImageResource.java │ │ │ ├── Resource.java │ │ │ ├── XMLResource.java │ │ │ └── package-info.java │ │ │ ├── simple │ │ │ ├── FSScrollPane.java │ │ │ ├── Graphics2DRenderer.java │ │ │ ├── ImageRenderer.java │ │ │ ├── NoNamespaceHandler.java │ │ │ ├── XHTMLPanel.java │ │ │ ├── XHTMLPrintable.java │ │ │ ├── extend │ │ │ │ ├── DefaultFormSubmissionListener.java │ │ │ │ ├── FormSubmissionListener.java │ │ │ │ ├── URLUTF8Encoder.java │ │ │ │ ├── XhtmlCssOnlyNamespaceHandler.java │ │ │ │ ├── XhtmlForm.java │ │ │ │ ├── XhtmlNamespaceHandler.java │ │ │ │ ├── form │ │ │ │ │ ├── AbstractButtonField.java │ │ │ │ │ ├── ButtonField.java │ │ │ │ │ ├── CheckboxField.java │ │ │ │ │ ├── FileField.java │ │ │ │ │ ├── FormField.java │ │ │ │ │ ├── FormFieldFactory.java │ │ │ │ │ ├── FormFieldState.java │ │ │ │ │ ├── HiddenField.java │ │ │ │ │ ├── ImageField.java │ │ │ │ │ ├── InputField.java │ │ │ │ │ ├── PasswordField.java │ │ │ │ │ ├── RadioButtonField.java │ │ │ │ │ ├── ResetField.java │ │ │ │ │ ├── SelectField.java │ │ │ │ │ ├── SizeLimitedDocument.java │ │ │ │ │ ├── SubmitField.java │ │ │ │ │ ├── TextAreaField.java │ │ │ │ │ ├── TextField.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── swing │ │ │ ├── AWTFSFont.java │ │ │ ├── AWTFSGlyphVector.java │ │ │ ├── AWTFSImage.java │ │ │ ├── BasicPanel.java │ │ │ ├── CursorListener.java │ │ │ ├── DOMInspector.java │ │ │ ├── DefaultFSMouseListener.java │ │ │ ├── DeferredImageReplacedElement.java │ │ │ ├── DelegatingUserAgent.java │ │ │ ├── EmptyReplacedElement.java │ │ │ ├── FSMouseListener.java │ │ │ ├── HoverListener.java │ │ │ ├── ImageLoadItem.java │ │ │ ├── ImageLoadQueue.java │ │ │ ├── ImageLoadWorker.java │ │ │ ├── ImageReplacedElement.java │ │ │ ├── ImageResourceLoader.java │ │ │ ├── Java2DFontContext.java │ │ │ ├── Java2DOutputDevice.java │ │ │ ├── Java2DRenderer.java │ │ │ ├── Java2DTextRenderer.java │ │ │ ├── LinkListener.java │ │ │ ├── MouseTracker.java │ │ │ ├── MutableFSImage.java │ │ │ ├── NaiveUserAgent.java │ │ │ ├── RepaintListener.java │ │ │ ├── RootPanel.java │ │ │ ├── ScalableXHTMLPanel.java │ │ │ ├── ScaleChangeEvent.java │ │ │ ├── ScaleChangeListener.java │ │ │ ├── SwingReplacedElement.java │ │ │ ├── SwingReplacedElementFactory.java │ │ │ ├── UriResolver.java │ │ │ └── package-info.java │ │ │ ├── test │ │ │ ├── DocumentDiffTest.java │ │ │ └── package-info.java │ │ │ └── util │ │ │ ├── ArrayUtil.java │ │ │ ├── Configuration.java │ │ │ ├── Constants.java │ │ │ ├── ContentTypeDetectingInputStreamWrapper.java │ │ │ ├── DefaultCSSMarker.java │ │ │ ├── DownscaleQuality.java │ │ │ ├── FSImageWriter.java │ │ │ ├── FontUtil.java │ │ │ ├── GeneralUtil.java │ │ │ ├── IOUtil.java │ │ │ ├── ImageUtil.java │ │ │ ├── InputSources.java │ │ │ ├── JDKXRLogger.java │ │ │ ├── LazyEvaluated.java │ │ │ ├── LoggerUtil.java │ │ │ ├── ScalingOptions.java │ │ │ ├── SupportedEmbeddedFontTypes.java │ │ │ ├── TextUtil.java │ │ │ ├── Util.java │ │ │ ├── Uu.java │ │ │ ├── XMLUtil.java │ │ │ ├── XRLog.java │ │ │ ├── XRLogger.java │ │ │ ├── XRRuntimeException.java │ │ │ ├── XRSimpleLogFormatter.java │ │ │ └── package-info.java │ └── resources │ │ └── resources │ │ ├── conf │ │ └── openpdf.conf │ │ ├── css │ │ └── XhtmlNamespaceHandler.css │ │ └── schema │ │ ├── docbook │ │ ├── ChangeLog │ │ ├── README │ │ ├── calstblx.dtd │ │ ├── catalog-docbook.xml │ │ ├── catalog.xml-org │ │ ├── dbcentx.mod │ │ ├── dbgenent.mod │ │ ├── dbhierx.mod │ │ ├── dbnotnx.mod │ │ ├── dbpoolx.mod │ │ ├── docbook.cat │ │ ├── docbookx.dtd │ │ ├── ent │ │ │ ├── isoamsa.ent │ │ │ ├── isoamsb.ent │ │ │ ├── isoamsc.ent │ │ │ ├── isoamsn.ent │ │ │ ├── isoamso.ent │ │ │ ├── isoamsr.ent │ │ │ ├── isobox.ent │ │ │ ├── isocyr1.ent │ │ │ ├── isocyr2.ent │ │ │ ├── isodia.ent │ │ │ ├── isogrk1.ent │ │ │ ├── isogrk2.ent │ │ │ ├── isogrk3.ent │ │ │ ├── isogrk4.ent │ │ │ ├── isolat1.ent │ │ │ ├── isolat2.ent │ │ │ ├── isonum.ent │ │ │ ├── isopub.ent │ │ │ └── isotech.ent │ │ ├── htmltblx.mod │ │ └── soextblx.dtd │ │ ├── html-4.01 │ │ ├── catalog-html-4.01.xml │ │ ├── entity │ │ │ ├── html-lat1.ent │ │ │ ├── html-special.ent │ │ │ └── html-symbol.ent │ │ ├── html-4.01-frameset.dtd │ │ ├── html-4.01-strict.dtd │ │ └── html-4.01-transitional.dtd │ │ ├── html5 │ │ └── entities.dtd │ │ └── xhtml │ │ ├── catalog-xhtml-1.0.xml │ │ ├── catalog-xhtml-1.1.xml │ │ ├── catalog-xhtml-common.xml │ │ ├── element │ │ ├── xhtml-arch-1.mod │ │ ├── xhtml-base-1.mod │ │ ├── xhtml-bdo-1.mod │ │ ├── xhtml-blkphras-1.mod │ │ ├── xhtml-blkpres-1.mod │ │ ├── xhtml-blkstruct-1.mod │ │ ├── xhtml-csismap-1.mod │ │ ├── xhtml-edit-1.mod │ │ ├── xhtml-form-1.mod │ │ ├── xhtml-hypertext-1.mod │ │ ├── xhtml-image-1.mod │ │ ├── xhtml-inlphras-1.mod │ │ ├── xhtml-inlpres-1.mod │ │ ├── xhtml-inlstruct-1.mod │ │ ├── xhtml-inlstyle-1.mod │ │ ├── xhtml-legacy-1.mod │ │ ├── xhtml-link-1.mod │ │ ├── xhtml-list-1.mod │ │ ├── xhtml-meta-1.mod │ │ ├── xhtml-object-1.mod │ │ ├── xhtml-param-1.mod │ │ ├── xhtml-pres-1.mod │ │ ├── xhtml-ruby-1.mod │ │ ├── xhtml-script-1.mod │ │ ├── xhtml-ssismap-1.mod │ │ ├── xhtml-struct-1.mod │ │ ├── xhtml-style-1.mod │ │ ├── xhtml-table-1.mod │ │ └── xhtml-text-1.mod │ │ ├── entity │ │ ├── xhtml-attribs-1.mod │ │ ├── xhtml-charent-1.mod │ │ ├── xhtml-datatypes-1.mod │ │ ├── xhtml-events-1.mod │ │ ├── xhtml-framework-1.mod │ │ ├── xhtml-lat1.ent │ │ ├── xhtml-qname-1.mod │ │ ├── xhtml-special.ent │ │ └── xhtml-symbol.ent │ │ ├── notation │ │ └── xhtml-notations-1.mod │ │ ├── xhtml-1.1 │ │ ├── entity │ │ │ └── xhtml11-model-1.mod │ │ └── xhtml11.dtd │ │ └── xhtml-1 │ │ ├── xhtml1-frameset.dtd │ │ ├── xhtml1-strict.dtd │ │ └── xhtml1-transitional.dtd │ └── test │ ├── java │ └── org │ │ └── openpdf │ │ ├── context │ │ └── StylesheetCacheTest.java │ │ ├── css │ │ ├── newmatch │ │ │ ├── ClassConditionTest.java │ │ │ └── LangConditionTest.java │ │ ├── parser │ │ │ ├── CSSParserTest.java │ │ │ ├── FSRGBColorTest.java │ │ │ ├── ParserTest.java │ │ │ └── property │ │ │ │ └── SizePropertyBuilderTest.java │ │ └── style │ │ │ └── derived │ │ │ ├── BorderPropertySetTest.java │ │ │ └── RectPropertySetTest.java │ │ ├── layout │ │ ├── CounterFunctionTest.java │ │ ├── TextUtilTest.java │ │ └── breaker │ │ │ └── UrlAwareLineBreakIteratorTest.java │ │ ├── pdf │ │ ├── CJKFontResolverTest.java │ │ ├── DocumentSplitterTest.java │ │ ├── HTMLOutlineTest.java │ │ ├── HelloWorldPdf.java │ │ ├── HtmlAndImageToPdfTest.java │ │ ├── HtmlToPdfTest.java │ │ ├── ITextFontResolverTest.java │ │ ├── ListsTest.java │ │ └── StrictErrorHandler.java │ │ ├── simple │ │ ├── Graphics2DRendererTest.java │ │ ├── ImageRendererTest.java │ │ └── extend │ │ │ ├── XhtmlCssOnlyNamespaceHandlerTest.java │ │ │ └── XhtmlNamespaceHandlerTest.java │ │ ├── swing │ │ ├── Java2DRendererTest.java │ │ ├── NaiveUserAgentTest.java │ │ └── QuotingExampleTest.java │ │ └── util │ │ ├── ConfigurationTest.java │ │ ├── ContentTypeDetectingInputStreamWrapperTest.java │ │ └── ImageUtilTest.java │ └── resources │ ├── fonts │ └── Jacquard24-Regular.ttf │ ├── hamlet.xhtml │ ├── hello.css.html │ ├── hello.html │ ├── left-right-border.html │ ├── list-sample.xhtml │ ├── norway.png │ ├── org │ └── openpdf │ │ └── pdf │ │ ├── borderradius │ │ └── borderRadiusWithBorderWidthZero.html │ │ ├── break-all.html │ │ ├── bug │ │ └── EndlessLoopTest_wordwrap.html │ │ └── fonts │ │ └── CssFontFace.html │ ├── page-with-header.html │ ├── page-with-lists.html │ ├── quotes.xhtml │ ├── sample.html │ ├── styles │ └── sample.css │ ├── text-with-background-image.xhtml │ └── transgrey.png ├── openpdf-kotlin ├── README.md ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── librepdf │ │ └── kotlin │ │ └── DummyDoc.java │ └── kotlin │ └── com │ └── github │ └── librepdf │ └── kotlin │ ├── HtmlPdfBuilder.kt │ └── PdfBuilder.kt ├── openpdf-renderer ├── .gitignore ├── LICENSE.txt ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── openpdf │ │ │ └── renderer │ │ │ ├── BaseWatchable.java │ │ │ ├── Cache.java │ │ │ ├── Configuration.java │ │ │ ├── Identity8BitCharsetEncoder.java │ │ │ ├── ImageInfo.java │ │ │ ├── NameTree.java │ │ │ ├── OutlineNode.java │ │ │ ├── PDFCmd.java │ │ │ ├── PDFDebugger.java │ │ │ ├── PDFDestination.java │ │ │ ├── PDFDocCharsetEncoder.java │ │ │ ├── PDFErrorHandler.java │ │ │ ├── PDFFile.java │ │ │ ├── PDFImage.java │ │ │ ├── PDFImageParseException.java │ │ │ ├── PDFObject.java │ │ │ ├── PDFPage.java │ │ │ ├── PDFPaint.java │ │ │ ├── PDFParseException.java │ │ │ ├── PDFParser.java │ │ │ ├── PDFRenderer.java │ │ │ ├── PDFShapeCmd.java │ │ │ ├── PDFStringUtil.java │ │ │ ├── PDFTextFormat.java │ │ │ ├── PDFXref.java │ │ │ ├── PdfSubByteSampleModel.java │ │ │ ├── RefImage.java │ │ │ ├── Watchable.java │ │ │ ├── action │ │ │ ├── GoToAction.java │ │ │ ├── GoToEAction.java │ │ │ ├── GoToRAction.java │ │ │ ├── LaunchAction.java │ │ │ ├── PDFAction.java │ │ │ ├── PdfObjectParseUtil.java │ │ │ └── UriAction.java │ │ │ ├── annotation │ │ │ ├── AnnotationBorderStyle.java │ │ │ ├── AnnotationType.java │ │ │ ├── CircleAnnotation.java │ │ │ ├── FreetextAnnotation.java │ │ │ ├── LinkAnnotation.java │ │ │ ├── MarkupAnnotation.java │ │ │ ├── PDFAnnotation.java │ │ │ ├── SquareAnnotation.java │ │ │ ├── StampAnnotation.java │ │ │ ├── TextMarkupAnnotation.java │ │ │ └── WidgetAnnotation.java │ │ │ ├── colorspace │ │ │ ├── AltColorSpace.java │ │ │ ├── AlternateColorSpace.java │ │ │ ├── CMYKColorSpace.java │ │ │ ├── CalGrayColor.java │ │ │ ├── CalRGBColor.java │ │ │ ├── IndexedColor.java │ │ │ ├── LabColor.java │ │ │ ├── MaskColorSpace.java │ │ │ ├── PDFColorSpace.java │ │ │ ├── PatternSpace.java │ │ │ └── YCCKColorSpace.java │ │ │ ├── decode │ │ │ ├── ASCII85Decode.java │ │ │ ├── ASCIIHexDecode.java │ │ │ ├── CCITTCodes │ │ │ ├── CCITTFaxDecode.java │ │ │ ├── CCITTFaxDecoder.java │ │ │ ├── FlateDecode.java │ │ │ ├── ImageDataDecoder.java │ │ │ ├── JPXDecode.java │ │ │ ├── LZWDecode.java │ │ │ ├── PDFDecoder.java │ │ │ ├── PNGPredictor.java │ │ │ ├── Predictor.java │ │ │ ├── RunLengthDecode.java │ │ │ └── TIFFPredictor.java │ │ │ ├── decrypt │ │ │ ├── EncryptionUnsupportedByPlatformException.java │ │ │ ├── EncryptionUnsupportedByProductException.java │ │ │ ├── IdentityDecrypter.java │ │ │ ├── PDFAuthenticationFailureException.java │ │ │ ├── PDFDecrypter.java │ │ │ ├── PDFDecrypterFactory.java │ │ │ ├── PDFPassword.java │ │ │ └── UnsupportedEncryptionException.java │ │ │ ├── font │ │ │ ├── BuiltinFont.java │ │ │ ├── CIDFontType0.java │ │ │ ├── CIDFontType2.java │ │ │ ├── FlPoint.java │ │ │ ├── FontSupport.java │ │ │ ├── NativeFont.java │ │ │ ├── OutlineFont.java │ │ │ ├── PDFFont.java │ │ │ ├── PDFFontDescriptor.java │ │ │ ├── PDFFontEncoding.java │ │ │ ├── PDFGlyph.java │ │ │ ├── TTFFont.java │ │ │ ├── Type0Font.java │ │ │ ├── Type1CFont.java │ │ │ ├── Type1Font.java │ │ │ ├── Type3Font.java │ │ │ ├── cid │ │ │ │ ├── PDFCMap.java │ │ │ │ └── ToUnicodeMap.java │ │ │ └── ttf │ │ │ │ ├── AdobeGlyphList.java │ │ │ │ ├── CMap.java │ │ │ │ ├── CMapFormat0.java │ │ │ │ ├── CMapFormat4.java │ │ │ │ ├── CMapFormat6.java │ │ │ │ ├── CmapTable.java │ │ │ │ ├── Glyf.java │ │ │ │ ├── GlyfCompound.java │ │ │ │ ├── GlyfSimple.java │ │ │ │ ├── GlyfTable.java │ │ │ │ ├── HeadTable.java │ │ │ │ ├── HheaTable.java │ │ │ │ ├── HmtxTable.java │ │ │ │ ├── LocaTable.java │ │ │ │ ├── MaxpTable.java │ │ │ │ ├── NameTable.java │ │ │ │ ├── PostTable.java │ │ │ │ ├── TrueTypeFont.java │ │ │ │ └── TrueTypeTable.java │ │ │ ├── function │ │ │ ├── FunctionType0.java │ │ │ ├── FunctionType2.java │ │ │ ├── FunctionType3.java │ │ │ ├── FunctionType4.java │ │ │ ├── PDFFunction.java │ │ │ └── postscript │ │ │ │ ├── PostScriptParser.java │ │ │ │ └── operation │ │ │ │ ├── Abs.java │ │ │ │ ├── Add.java │ │ │ │ ├── And.java │ │ │ │ ├── Atan.java │ │ │ │ ├── Bitshift.java │ │ │ │ ├── Ceiling.java │ │ │ │ ├── Copy.java │ │ │ │ ├── Cvi.java │ │ │ │ ├── Cvr.java │ │ │ │ ├── Div.java │ │ │ │ ├── Dup.java │ │ │ │ ├── Eq.java │ │ │ │ ├── Exch.java │ │ │ │ ├── Exp.java │ │ │ │ ├── Expression.java │ │ │ │ ├── False.java │ │ │ │ ├── Floor.java │ │ │ │ ├── Ge.java │ │ │ │ ├── Gt.java │ │ │ │ ├── Idiv.java │ │ │ │ ├── If.java │ │ │ │ ├── IfElse.java │ │ │ │ ├── Index.java │ │ │ │ ├── Le.java │ │ │ │ ├── Ln.java │ │ │ │ ├── Log.java │ │ │ │ ├── Lt.java │ │ │ │ ├── Mod.java │ │ │ │ ├── Mul.java │ │ │ │ ├── Ne.java │ │ │ │ ├── Neg.java │ │ │ │ ├── Not.java │ │ │ │ ├── OperationSet.java │ │ │ │ ├── Or.java │ │ │ │ ├── Pop.java │ │ │ │ ├── PostScriptOperation.java │ │ │ │ ├── PushAsNumber.java │ │ │ │ ├── Roll.java │ │ │ │ ├── Round.java │ │ │ │ ├── Sin.java │ │ │ │ ├── Sqrt.java │ │ │ │ ├── Sub.java │ │ │ │ ├── True.java │ │ │ │ ├── Truncate.java │ │ │ │ └── Xor.java │ │ │ └── pattern │ │ │ ├── DummyShader.java │ │ │ ├── PDFPattern.java │ │ │ ├── PDFShader.java │ │ │ ├── PatternType1.java │ │ │ ├── PatternType2.java │ │ │ └── ShaderType2.java │ └── resources │ │ ├── BaseFonts.properties │ │ ├── ch │ │ └── randelshofer │ │ │ └── media │ │ │ └── jpeg │ │ │ └── Generic_CMYK_Profile.icc │ │ ├── d050000l.pfb │ │ ├── glyphlist.txt │ │ ├── n019003l.pfb │ │ ├── n019004l.pfb │ │ ├── n019023l.pfb │ │ ├── n019024l.pfb │ │ ├── n021003l.pfb │ │ ├── n021004l.pfb │ │ ├── n021023l.pfb │ │ ├── n021024l.pfb │ │ ├── n022003l.pfb │ │ ├── n022004l.pfb │ │ ├── n022023l.pfb │ │ ├── n022024l.pfb │ │ ├── s050000l.pfb │ │ └── sGray.icc │ └── test │ ├── java │ └── openpdf │ │ └── renderer │ │ ├── ImageRendererTest.java │ │ ├── PDFDisplay.java │ │ └── PdfRendererGui.java │ └── resources │ └── HelloWorldMeta.pdf ├── openpdf ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── lowagie │ │ │ ├── bouncycastle │ │ │ └── BouncyCastleHelper.java │ │ │ └── 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 │ │ │ ├── FontProvider.java │ │ │ ├── Footnote.java │ │ │ ├── GreekList.java │ │ │ ├── Header.java │ │ │ ├── HeaderFooter.java │ │ │ ├── Image.java │ │ │ ├── ImageLoader.java │ │ │ ├── ImgCCITT.java │ │ │ ├── ImgJBIG2.java │ │ │ ├── ImgRaw.java │ │ │ ├── ImgTemplate.java │ │ │ ├── ImgWMF.java │ │ │ ├── Jpeg.java │ │ │ ├── Jpeg2000.java │ │ │ ├── LargeElement.java │ │ │ ├── List.java │ │ │ ├── ListItem.java │ │ │ ├── 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 │ │ │ ├── StandardFonts.java │ │ │ ├── Table.java │ │ │ ├── TableRectangle.java │ │ │ ├── TextElementArray.java │ │ │ ├── TextRenderingOptions.java │ │ │ ├── Utilities.java │ │ │ ├── ZapfDingbatsList.java │ │ │ ├── ZapfDingbatsNumberList.java │ │ │ ├── alignment │ │ │ ├── HorizontalAlignment.java │ │ │ ├── VerticalAlignment.java │ │ │ ├── WithHorizontalAlignment.java │ │ │ └── WithVerticalAlignment.java │ │ │ ├── error_messages │ │ │ └── MessageLocalization.java │ │ │ ├── exceptions │ │ │ ├── BadPasswordException.java │ │ │ ├── IllegalPdfSyntaxException.java │ │ │ ├── InvalidPdfException.java │ │ │ └── UnsupportedPdfException.java │ │ │ ├── factories │ │ │ ├── ElementFactory.java │ │ │ ├── GreekAlphabetFactory.java │ │ │ ├── RomanAlphabetFactory.java │ │ │ └── RomanNumberFactory.java │ │ │ ├── html │ │ │ ├── FontSize.java │ │ │ ├── HtmlEncoder.java │ │ │ ├── HtmlParser.java │ │ │ ├── HtmlPeer.java │ │ │ ├── HtmlTagMap.java │ │ │ ├── HtmlTags.java │ │ │ ├── HtmlWriter.java │ │ │ ├── Markup.java │ │ │ ├── SAXmyHtmlHandler.java │ │ │ ├── WebColors.java │ │ │ ├── package-info.java │ │ │ └── simpleparser │ │ │ │ ├── ALink.java │ │ │ │ ├── ChainedProperties.java │ │ │ │ ├── FactoryProperties.java │ │ │ │ ├── HTMLWorker.java │ │ │ │ ├── ImageProvider.java │ │ │ │ ├── Img.java │ │ │ │ ├── IncCell.java │ │ │ │ ├── IncTable.java │ │ │ │ ├── StyleSheet.java │ │ │ │ └── package-info.java │ │ │ ├── pdf │ │ │ ├── AcroFields.java │ │ │ ├── ArabicLigaturizer.java │ │ │ ├── AsianFontMapper.java │ │ │ ├── BadPdfFormatException.java │ │ │ ├── Barcode.java │ │ │ ├── Barcode128.java │ │ │ ├── Barcode39.java │ │ │ ├── BarcodeCodabar.java │ │ │ ├── BarcodeDatamatrix.java │ │ │ ├── BarcodeDimensions.java │ │ │ ├── BarcodeEAN.java │ │ │ ├── BarcodeEANSUPP.java │ │ │ ├── BarcodeInter25.java │ │ │ ├── BarcodePDF417.java │ │ │ ├── BarcodePostnet.java │ │ │ ├── BaseField.java │ │ │ ├── BaseFont.java │ │ │ ├── BidiLine.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 │ │ │ ├── FieldReader.java │ │ │ ├── FontDetails.java │ │ │ ├── FontMapper.java │ │ │ ├── FontSelector.java │ │ │ ├── FopGlyphProcessor.java │ │ │ ├── GlyphList.java │ │ │ ├── GrayColor.java │ │ │ ├── HyphenationAuto.java │ │ │ ├── HyphenationEvent.java │ │ │ ├── IntHashtable.java │ │ │ ├── LZWDecoder.java │ │ │ ├── LayoutProcessor.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 │ │ │ ├── PdfGlyphArray.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 │ │ │ ├── PdfSignatureAppDataDict.java │ │ │ ├── PdfSignatureAppearance.java │ │ │ ├── PdfSignatureBuildProperties.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 │ │ │ ├── RGBColor.java │ │ │ ├── RadioCheckField.java │ │ │ ├── RandomAccessFileOrArray.java │ │ │ ├── SequenceList.java │ │ │ ├── ShadingColor.java │ │ │ ├── SignatureType.java │ │ │ ├── SimpleBookmark.java │ │ │ ├── SimpleNamedDestination.java │ │ │ ├── SpotColor.java │ │ │ ├── StampContent.java │ │ │ ├── StandardDecryption.java │ │ │ ├── StrictWordWrapException.java │ │ │ ├── TSAClient.java │ │ │ ├── TSAClientBouncyCastle.java │ │ │ ├── TTFCache.java │ │ │ ├── TextField.java │ │ │ ├── TrueTypeFont.java │ │ │ ├── TrueTypeFontSubSet.java │ │ │ ├── TrueTypeFontUnicode.java │ │ │ ├── Type1Font.java │ │ │ ├── Type3Font.java │ │ │ ├── Type3Glyph.java │ │ │ ├── UnembedFontPdfSmartCopy.java │ │ │ ├── VerticalText.java │ │ │ ├── XfaForm.java │ │ │ ├── XfdfReader.java │ │ │ ├── codec │ │ │ │ ├── CCITTG4Encoder.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 │ │ │ │ ├── HYGoThic-Medium.properties │ │ │ │ ├── HYSMyeongJo-Medium.properties │ │ │ │ ├── HYSMyeongJoStd-Medium.properties │ │ │ │ ├── HeiseiKakuGo-W5.properties │ │ │ │ ├── HeiseiMin-W3.properties │ │ │ │ ├── Helvetica-Bold.afm │ │ │ │ ├── Helvetica-BoldOblique.afm │ │ │ │ ├── Helvetica-Oblique.afm │ │ │ │ ├── Helvetica.afm │ │ │ │ ├── KozMinPro-Regular.properties │ │ │ │ ├── MHei-Medium.properties │ │ │ │ ├── MSung-Light.properties │ │ │ │ ├── MSungStd-Light.properties │ │ │ │ ├── STSong-Light.properties │ │ │ │ ├── STSongStd-Light.properties │ │ │ │ ├── Symbol.afm │ │ │ │ ├── Times-Bold.afm │ │ │ │ ├── Times-BoldItalic.afm │ │ │ │ ├── Times-Italic.afm │ │ │ │ ├── Times-Roman.afm │ │ │ │ ├── ZapfDingbats.afm │ │ │ │ ├── cjkencodings.properties │ │ │ │ ├── cmap_info.txt │ │ │ │ └── cmaps │ │ │ │ │ ├── 78-EUC-H │ │ │ │ │ ├── 78-EUC-V │ │ │ │ │ ├── 78-H │ │ │ │ │ ├── 78-RKSJ-H │ │ │ │ │ ├── 78-RKSJ-V │ │ │ │ │ ├── 78-V │ │ │ │ │ ├── 78ms-RKSJ-H │ │ │ │ │ ├── 78ms-RKSJ-V │ │ │ │ │ ├── 83pv-RKSJ-H │ │ │ │ │ ├── 90ms-RKSJ-H │ │ │ │ │ ├── 90ms-RKSJ-V │ │ │ │ │ ├── 90msp-RKSJ-H │ │ │ │ │ ├── 90msp-RKSJ-V │ │ │ │ │ ├── 90pv-RKSJ-H │ │ │ │ │ ├── 90pv-RKSJ-V │ │ │ │ │ ├── Add-H │ │ │ │ │ ├── Add-RKSJ-H │ │ │ │ │ ├── Add-RKSJ-V │ │ │ │ │ ├── Add-V │ │ │ │ │ ├── B5-H │ │ │ │ │ ├── B5-V │ │ │ │ │ ├── B5pc-H │ │ │ │ │ ├── B5pc-V │ │ │ │ │ ├── CMap.java │ │ │ │ │ ├── CMapParser.java │ │ │ │ │ ├── CNS-EUC-H │ │ │ │ │ ├── CNS-EUC-V │ │ │ │ │ ├── CNS1-H │ │ │ │ │ ├── CNS1-V │ │ │ │ │ ├── CNS2-H │ │ │ │ │ ├── CNS2-V │ │ │ │ │ ├── CodespaceRange.java │ │ │ │ │ ├── ETHK-B5-H │ │ │ │ │ ├── ETHK-B5-V │ │ │ │ │ ├── ETen-B5-H │ │ │ │ │ ├── ETen-B5-V │ │ │ │ │ ├── EUC-H │ │ │ │ │ ├── EUC-V │ │ │ │ │ ├── Ext-H │ │ │ │ │ ├── Ext-RKSJ-H │ │ │ │ │ ├── Ext-RKSJ-V │ │ │ │ │ ├── Ext-V │ │ │ │ │ ├── GB-EUC-H │ │ │ │ │ ├── GB-EUC-V │ │ │ │ │ ├── GB-H │ │ │ │ │ ├── GB-V │ │ │ │ │ ├── GBK-EUC-H │ │ │ │ │ ├── GBK-EUC-V │ │ │ │ │ ├── GBK2K-H │ │ │ │ │ ├── GBK2K-V │ │ │ │ │ ├── GBKp-EUC-H │ │ │ │ │ ├── GBKp-EUC-V │ │ │ │ │ ├── GBT-EUC-H │ │ │ │ │ ├── GBT-EUC-V │ │ │ │ │ ├── GBT-H │ │ │ │ │ ├── GBT-V │ │ │ │ │ ├── GBTpc-EUC-H │ │ │ │ │ ├── GBTpc-EUC-V │ │ │ │ │ ├── GBpc-EUC-H │ │ │ │ │ ├── GBpc-EUC-V │ │ │ │ │ ├── H │ │ │ │ │ ├── HKdla-B5-H │ │ │ │ │ ├── HKdla-B5-V │ │ │ │ │ ├── HKdlb-B5-H │ │ │ │ │ ├── HKdlb-B5-V │ │ │ │ │ ├── HKgccs-B5-H │ │ │ │ │ ├── HKgccs-B5-V │ │ │ │ │ ├── HKm314-B5-H │ │ │ │ │ ├── HKm314-B5-V │ │ │ │ │ ├── HKm471-B5-H │ │ │ │ │ ├── HKm471-B5-V │ │ │ │ │ ├── HKscs-B5-H │ │ │ │ │ ├── HKscs-B5-V │ │ │ │ │ ├── Hankaku │ │ │ │ │ ├── Hiragana │ │ │ │ │ ├── KSC-EUC-H │ │ │ │ │ ├── KSC-EUC-V │ │ │ │ │ ├── KSC-H │ │ │ │ │ ├── KSC-Johab-H │ │ │ │ │ ├── KSC-Johab-V │ │ │ │ │ ├── KSC-V │ │ │ │ │ ├── KSCms-UHC-H │ │ │ │ │ ├── KSCms-UHC-HW-H │ │ │ │ │ ├── KSCms-UHC-HW-V │ │ │ │ │ ├── KSCms-UHC-V │ │ │ │ │ ├── KSCpc-EUC-H │ │ │ │ │ ├── KSCpc-EUC-V │ │ │ │ │ ├── Katakana │ │ │ │ │ ├── NWP-H │ │ │ │ │ ├── NWP-V │ │ │ │ │ ├── RKSJ-H │ │ │ │ │ ├── RKSJ-V │ │ │ │ │ ├── Roman │ │ │ │ │ ├── UniCNS-UCS2-H │ │ │ │ │ ├── UniCNS-UCS2-V │ │ │ │ │ ├── UniCNS-UTF16-H │ │ │ │ │ ├── UniCNS-UTF16-V │ │ │ │ │ ├── UniCNS-UTF32-H │ │ │ │ │ ├── UniCNS-UTF32-V │ │ │ │ │ ├── UniCNS-UTF8-H │ │ │ │ │ ├── UniCNS-UTF8-V │ │ │ │ │ ├── UniGB-UCS2-H │ │ │ │ │ ├── UniGB-UCS2-V │ │ │ │ │ ├── UniGB-UTF16-H │ │ │ │ │ ├── UniGB-UTF16-V │ │ │ │ │ ├── UniGB-UTF32-H │ │ │ │ │ ├── UniGB-UTF32-V │ │ │ │ │ ├── UniGB-UTF8-H │ │ │ │ │ ├── UniGB-UTF8-V │ │ │ │ │ ├── UniJIS-UCS2-H │ │ │ │ │ ├── UniJIS-UCS2-HW-H │ │ │ │ │ ├── UniJIS-UCS2-HW-V │ │ │ │ │ ├── UniJIS-UCS2-V │ │ │ │ │ ├── UniJIS-UTF16-H │ │ │ │ │ ├── UniJIS-UTF16-V │ │ │ │ │ ├── UniJIS-UTF32-H │ │ │ │ │ ├── UniJIS-UTF32-V │ │ │ │ │ ├── UniJIS-UTF8-H │ │ │ │ │ ├── UniJIS-UTF8-V │ │ │ │ │ ├── UniJISPro-UCS2-HW-V │ │ │ │ │ ├── UniJISPro-UCS2-V │ │ │ │ │ ├── UniJISPro-UTF8-V │ │ │ │ │ ├── UniJISX0213-UTF32-H │ │ │ │ │ ├── UniJISX0213-UTF32-V │ │ │ │ │ ├── UniKS-UCS2-H │ │ │ │ │ ├── UniKS-UCS2-V │ │ │ │ │ ├── UniKS-UTF16-H │ │ │ │ │ ├── UniKS-UTF16-V │ │ │ │ │ ├── UniKS-UTF32-H │ │ │ │ │ ├── UniKS-UTF32-V │ │ │ │ │ ├── UniKS-UTF8-H │ │ │ │ │ ├── UniKS-UTF8-V │ │ │ │ │ ├── V │ │ │ │ │ └── WP-Symbol │ │ │ ├── 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 │ │ │ │ ├── FinalText.java │ │ │ │ ├── GraphicsState.java │ │ │ │ ├── MarkedUpTextAssembler.java │ │ │ │ ├── Matrix.java │ │ │ │ ├── ParsedText.java │ │ │ │ ├── ParsedTextImpl.java │ │ │ │ ├── PdfContentReaderTool.java │ │ │ │ ├── PdfContentStreamHandler.java │ │ │ │ ├── PdfTextExtractor.java │ │ │ │ ├── TextAssembler.java │ │ │ │ ├── TextAssemblyBuffer.java │ │ │ │ ├── Vector.java │ │ │ │ ├── Word.java │ │ │ │ └── package-info.java │ │ │ ├── utils │ │ │ ├── LongMappedByteBuffer.java │ │ │ ├── NumberUtilities.java │ │ │ ├── SystemPropertyUtil.java │ │ │ └── package-info.java │ │ │ └── xml │ │ │ ├── SAXiTextHandler.java │ │ │ ├── SAXmyHandler.java │ │ │ ├── TagMap.java │ │ │ ├── XMLUtil.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 │ ├── resources-filtered │ │ └── com │ │ │ └── lowagie │ │ │ └── text │ │ │ └── version.properties │ └── resources │ │ ├── META-INF │ │ ├── APACHE-LICENSE-2.0.txt │ │ ├── LGPL-2.1.md │ │ ├── LICENSES.md │ │ ├── MPL-2.0.txt │ │ └── misc_licenses.txt │ │ ├── com │ │ └── lowagie │ │ │ └── text │ │ │ ├── error_messages │ │ │ ├── en.lng │ │ │ ├── nl.lng │ │ │ └── pt.lng │ │ │ └── pdf │ │ │ └── fonts │ │ │ ├── Adobe-CNS1-UCS2.cmap │ │ │ ├── Adobe-GB1-UCS2.cmap │ │ │ ├── Adobe-Japan1-UCS2.cmap │ │ │ ├── Adobe-Korea1-UCS2.cmap │ │ │ ├── Courier-Bold.afm │ │ │ ├── Courier-BoldOblique.afm │ │ │ ├── Courier-Oblique.afm │ │ │ ├── Courier.afm │ │ │ ├── HYGoThic-Medium.properties │ │ │ ├── HYSMyeongJo-Medium.properties │ │ │ ├── HYSMyeongJoStd-Medium.properties │ │ │ ├── HeiseiKakuGo-W5.properties │ │ │ ├── HeiseiMin-W3.properties │ │ │ ├── Helvetica-Bold.afm │ │ │ ├── Helvetica-BoldOblique.afm │ │ │ ├── Helvetica-Oblique.afm │ │ │ ├── Helvetica.afm │ │ │ ├── KozMinPro-Regular.properties │ │ │ ├── MHei-Medium.properties │ │ │ ├── MSung-Light.properties │ │ │ ├── MSungStd-Light.properties │ │ │ ├── STSong-Light.properties │ │ │ ├── STSongStd-Light.properties │ │ │ ├── Symbol.afm │ │ │ ├── Times-Bold.afm │ │ │ ├── Times-BoldItalic.afm │ │ │ ├── Times-Italic.afm │ │ │ ├── Times-Roman.afm │ │ │ ├── UniCNS-UCS2-H.cmap │ │ │ ├── UniCNS-UCS2-V.cmap │ │ │ ├── UniGB-UCS2-H.cmap │ │ │ ├── UniGB-UCS2-V.cmap │ │ │ ├── UniJIS-UCS2-H.cmap │ │ │ ├── UniJIS-UCS2-HW-H.cmap │ │ │ ├── UniJIS-UCS2-HW-V.cmap │ │ │ ├── UniJIS-UCS2-V.cmap │ │ │ ├── UniKS-UCS2-H.cmap │ │ │ ├── UniKS-UCS2-V.cmap │ │ │ ├── ZapfDingbats.afm │ │ │ ├── cjkencodings.properties │ │ │ ├── cjkfonts.properties │ │ │ ├── cmap_info.txt │ │ │ └── glyphlist.txt │ │ └── font-fallback │ │ ├── LiberationSans-Regular.ttf │ │ └── README.md │ └── test │ ├── java │ ├── com │ │ └── lowagie │ │ │ └── text │ │ │ ├── DocumentTest.java │ │ │ ├── FooterImageTest.java │ │ │ ├── FooterTableTest.java │ │ │ ├── HeaderFooterTest.java │ │ │ ├── ImageTest.java │ │ │ ├── ParagraphTest.java │ │ │ ├── PhraseTest.java │ │ │ ├── StandardFontsTest.java │ │ │ ├── error_messages │ │ │ ├── MessageLocalizationNlTest.java │ │ │ ├── MessageLocalizationPtTest.java │ │ │ └── MessageLocalizationTest.java │ │ │ ├── factories │ │ │ ├── GreekAlphabetFactoryTest.java │ │ │ ├── RomanAlphabetFactoryTest.java │ │ │ └── RomanNumberFactoryTest.java │ │ │ ├── html │ │ │ ├── EmbeddedImageTest.java │ │ │ ├── HTMLTableTest.java │ │ │ ├── HtmlParserTest.java │ │ │ ├── SAXmyHtmlHandlerTest.java │ │ │ ├── StylesTest.java │ │ │ ├── WebColorsTest.java │ │ │ └── simpleparser │ │ │ │ └── FactoryPropertiesTest.java │ │ │ ├── pdf │ │ │ ├── AcroFieldsTest.java │ │ │ ├── BarcodeDatamatrixTest.java │ │ │ ├── BarcodeMacroPDF417Test.java │ │ │ ├── BaseFontTest.java │ │ │ ├── ColumnTextSeparator.java │ │ │ ├── ColumnTextTableTest.java │ │ │ ├── CrossReferenceTableEncodingTest.java │ │ │ ├── DocumentProducerHelper.java │ │ │ ├── FontDetailsTest.java │ │ │ ├── FontSelectorTest.java │ │ │ ├── FontSubsetTest.java │ │ │ ├── GlyphListTest.java │ │ │ ├── LZWDecoderTest.java │ │ │ ├── LargePdfTest.java │ │ │ ├── LayoutProcessor534Test.java │ │ │ ├── LayoutProcessorTest.java │ │ │ ├── PRAcroFormTest.java │ │ │ ├── PdfCopyTest.java │ │ │ ├── PdfDocument536Test.java │ │ │ ├── PdfDocument620Test.java │ │ │ ├── PdfDocumentTest.java │ │ │ ├── PdfNameTreeTest.java │ │ │ ├── PdfPTableTest.java │ │ │ ├── PdfPrinterGraphics2DTest.java │ │ │ ├── PdfProtectedDocumentTest.java │ │ │ ├── PdfSignatureAppearanceTest.java │ │ │ ├── PdfSignatureRangeTest.java │ │ │ ├── PdfSmartCopyTest.java │ │ │ ├── PdfStamperImpTest.java │ │ │ ├── PdfStructureTreeRootTest.java │ │ │ ├── PdfTestBase.java │ │ │ ├── PdfTestBaseTest.java │ │ │ ├── PdfWriterTest.java │ │ │ ├── ProcSetTest.java │ │ │ ├── SimpleBookmarkTest.java │ │ │ ├── SimplePdfTest.java │ │ │ ├── SingleParagraphTest.java │ │ │ ├── SmallPdfReadTest.java │ │ │ ├── TabTest.java │ │ │ ├── TablePdfTest.java │ │ │ ├── TableRowSpanEvenSplitTest.java │ │ │ ├── TextExtractTest.java │ │ │ ├── TrueTypeFontTest.java │ │ │ ├── TrueTypeFontUnicodeTest.java │ │ │ ├── core │ │ │ │ └── document │ │ │ │ │ └── PdfCrossReferenceTest.java │ │ │ ├── encryption │ │ │ │ ├── DecryptAES256R6Test.java │ │ │ │ ├── EncryptAES256R6Test.java │ │ │ │ ├── PdfEncryptionTest.java │ │ │ │ └── StandardDecryptionTest.java │ │ │ ├── fonts │ │ │ │ ├── AdvanceTypographyTest.java │ │ │ │ └── FontTest.java │ │ │ ├── metadata │ │ │ │ ├── CleanMetaDataTest.java │ │ │ │ └── ProducerTest.java │ │ │ ├── parser │ │ │ │ └── PdfTextExtractorTest.java │ │ │ ├── sign │ │ │ │ └── ExtractCertificatesTest.java │ │ │ └── table │ │ │ │ ├── TableElementsAlignmentTest.java │ │ │ │ └── TableEndlessTest.java │ │ │ ├── validation │ │ │ └── PDFValidationTest.java │ │ │ └── xml │ │ │ └── simpleparser │ │ │ └── SimpleXMLParserTest.java │ └── org │ │ └── librepdf │ │ └── openpdf │ │ └── independent │ │ └── NumberOfPagesTest.java │ └── resources │ ├── EmptyPage.pdf │ ├── GitHub-Mark-32px.png │ ├── H.gif │ ├── HelloWorldMeta.pdf │ ├── OutlineUriActionWithNoTitle.pdf │ ├── SimulatedBoldAndStrokeWidth.pdf │ ├── barcode_macro_pdf_417.pdf │ ├── base64-image.html │ ├── encodingTest.pdf │ ├── fonts │ ├── NotoSansThaiLooped │ │ ├── NotoSansThaiLooped-Regular.ttf │ │ └── OFL.txt │ ├── Viaoda_Libre │ │ ├── OFL.txt │ │ └── ViaodaLibre-Regular.ttf │ ├── font-awesome │ │ ├── LICENSE.txt │ │ └── fa-v4compatibility.ttf │ ├── jaldi │ │ ├── Jaldi-Bold.eot │ │ ├── Jaldi-Bold.otf │ │ ├── Jaldi-Bold.woff │ │ ├── Jaldi-Bold.woff2 │ │ ├── Jaldi-Regular.eot │ │ ├── Jaldi-Regular.woff │ │ ├── Jaldi-Regular.woff2 │ │ └── OFL.txt │ └── liberation │ │ └── LiberationSerif-Regular.ttf │ ├── gradient.tiff │ ├── identity-h.pdf │ ├── imageTest │ ├── ImageTest.gif │ ├── ImageTest.jpg │ └── ImageTest.png │ ├── issue1298 │ ├── lzw-cmap-table-decoded.txt │ ├── lzw-cmap-table-encoded.bin │ ├── lzw-ps-function-1-decoded.txt │ ├── lzw-ps-function-1-encoded.bin │ ├── lzw-ps-function-2-decoded.txt │ └── lzw-ps-function-2-encoded.bin │ ├── issue375 │ ├── Demo1_encrypted_.pdf │ ├── MuPDF-AES256-R6-u=user-o=owner.pdf │ ├── THISISATEST_PWP.pdf │ ├── c-r6-in-pw=owner4.pdf │ ├── copied-positive-P.pdf │ ├── enc-XI-R6,V5,O=master.pdf │ ├── enc-XI-R6,V5,U=attachment,encrypted-attachments.pdf │ ├── enc-XI-R6,V5,U=view,O=master.pdf │ ├── enc-XI-R6,V5,U=view,attachments,cleartext-metadata.pdf │ ├── enc-XI-R6,V5,U=wwwww,O=wwwww.pdf │ ├── enc-XI-long-password=qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcv.pdf │ ├── encrypted-positive-P.pdf │ ├── encrypted_hello_world_r6-pw=hôtel.pdf │ ├── graph-encrypted-pw=user.pdf │ ├── issue6010_1-pw=owner.pdf │ ├── issue6010_2-pw=æøå.pdf │ ├── nontrivial-crypt-filter.pdf │ ├── pr6531_1-pw=asdfasdf.pdf │ ├── pr6531_2-pw=asdfasdf.pdf │ ├── pwProtectedAES256_openPDFiss375.pdf │ └── unfilterable-with-crypt.pdf │ ├── merge-acroforms.pdf │ ├── objectXref.pdf │ ├── open_protected.pdf │ ├── openpdf_bug_test.pdf │ ├── pades_infinite_loop.pdf │ ├── pades_opposite_infinite_loop.pdf │ ├── parseTable.html │ ├── parseTitle.html │ ├── pdf_digital_signature_timestamp.pdf │ ├── pdf_form_metadata_issue_254.pdf │ ├── pdfsmartcopy_bec.pdf │ ├── sample_signed-sha1.pdf │ ├── sample_signed-sha512.pdf │ ├── siwa.pdf │ └── stylesTest │ ├── backgroundColor.html │ ├── fontColor.html │ ├── fontSize.html │ └── fontSizeNamed.html ├── pdf-swing ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── lowagie │ │ └── rups │ │ ├── Rups.java │ │ ├── controller │ │ ├── PdfReaderController.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 │ │ ├── PageSelectionListener.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 │ └── resources │ └── META-INF │ ├── LGPL-2.1.md │ ├── LICENSES.md │ └── MPL-2.0.txt ├── pdf-toolbox ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── com │ │ │ └── lowagie │ │ │ │ ├── toolbox │ │ │ │ ├── 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 │ │ │ │ │ ├── NUp.java │ │ │ │ │ ├── Normalize.java │ │ │ │ │ ├── PhotoAlbum.java │ │ │ │ │ ├── RemoveLaunchApplication.java │ │ │ │ │ ├── ReversePages.java │ │ │ │ │ ├── SelectedPages.java │ │ │ │ │ ├── Split.java │ │ │ │ │ ├── Txt2Pdf.java │ │ │ │ │ ├── XML2Bookmarks.java │ │ │ │ │ ├── rotate.png │ │ │ │ │ ├── translate.png │ │ │ │ │ ├── watermarker │ │ │ │ │ │ ├── Watermarker.java │ │ │ │ │ │ ├── WatermarkerTool.java │ │ │ │ │ │ └── Writer.java │ │ │ │ │ └── zoom.png │ │ │ │ └── swing │ │ │ │ │ ├── CustomDialog.java │ │ │ │ │ ├── EventDispatchingThread.java │ │ │ │ │ ├── FileList.java │ │ │ │ │ └── PdfInformationPanel.java │ │ │ │ └── tools │ │ │ │ ├── BuildTutorial.java │ │ │ │ ├── ConcatPdf.java │ │ │ │ ├── EncryptPdf.java │ │ │ │ ├── Executable.java │ │ │ │ ├── HandoutPdf.java │ │ │ │ ├── SplitPdf.java │ │ │ │ └── ToolboxAvailable.java │ │ └── org │ │ │ └── librepdf │ │ │ └── openpdf │ │ │ └── examples │ │ │ └── fonts │ │ │ └── languages │ │ │ ├── Chinese.java │ │ │ └── Japanese.java │ └── resources │ │ ├── 1t3xt.gif │ │ ├── META-INF │ │ ├── LGPL-2.1.md │ │ ├── LICENSES.md │ │ └── MPL-2.0.txt │ │ └── tools.txt │ └── test │ ├── java │ ├── com │ │ └── lowagie │ │ │ ├── examples │ │ │ ├── RunAll.java │ │ │ ├── conformance │ │ │ │ └── PdfA1B.java │ │ │ ├── directcontent │ │ │ │ ├── GradientBackgroundPageEvent.java │ │ │ │ ├── Layers.java │ │ │ │ ├── TemplateImages.java │ │ │ │ ├── Templates.java │ │ │ │ ├── colors │ │ │ │ │ ├── Groups.java │ │ │ │ │ ├── Pattern.java │ │ │ │ │ ├── Patterns.java │ │ │ │ │ ├── Shading.java │ │ │ │ │ ├── ShadingPattern.java │ │ │ │ │ ├── SoftMask.java │ │ │ │ │ ├── SpotColors.java │ │ │ │ │ ├── TableCellTransparency.java │ │ │ │ │ ├── Transparency.java │ │ │ │ │ ├── otsoe.jpg │ │ │ │ │ └── pngnow.png │ │ │ │ ├── coordinates │ │ │ │ │ ├── AffineTransformation.java │ │ │ │ │ ├── TransformImage.java │ │ │ │ │ ├── Transformations.java │ │ │ │ │ ├── UpsideDown.java │ │ │ │ │ ├── XandYcoordinates.java │ │ │ │ │ └── hitchcock.png │ │ │ │ ├── graphics │ │ │ │ │ ├── Circles.java │ │ │ │ │ ├── GState.java │ │ │ │ │ ├── Literal.java │ │ │ │ │ ├── Shapes.java │ │ │ │ │ └── State.java │ │ │ │ ├── graphics2d │ │ │ │ │ ├── ArabicText.java │ │ │ │ │ ├── G2D.java │ │ │ │ │ └── JFreeChartExample.java │ │ │ │ ├── hitchcock.png │ │ │ │ ├── optionalcontent │ │ │ │ │ ├── Automatic.java │ │ │ │ │ ├── ContentGroups.java │ │ │ │ │ ├── Layers.java │ │ │ │ │ ├── NestedLayers.java │ │ │ │ │ ├── OptionalContent.java │ │ │ │ │ ├── OrderedLayers.java │ │ │ │ │ └── pngnow.png │ │ │ │ ├── pageevents │ │ │ │ │ ├── Bookmarks.java │ │ │ │ │ ├── EndPage.java │ │ │ │ │ ├── Events.java │ │ │ │ │ ├── PageNumbersWatermark.java │ │ │ │ │ ├── logo.gif │ │ │ │ │ ├── playRomeoJuliet.xml │ │ │ │ │ └── tagmapRomeoJuliet.xml │ │ │ │ └── text │ │ │ │ │ ├── Logo.java │ │ │ │ │ └── Text.java │ │ │ ├── fonts │ │ │ │ ├── EncodingFont.java │ │ │ │ ├── FontEncoding.java │ │ │ │ ├── FontFactoryType1Fonts.java │ │ │ │ ├── FullFontNames.java │ │ │ │ ├── GlyphLayoutDocumentBidi.java │ │ │ │ ├── GlyphLayoutDocumentBidiPerFont.java │ │ │ │ ├── GlyphLayoutDocumentDin91379.java │ │ │ │ ├── GlyphLayoutDocumentKernLiga.java │ │ │ │ ├── GlyphLayoutDocumentKernLigaPerFont.java │ │ │ │ ├── GlyphLayoutDocumentWithImage.java │ │ │ │ ├── GlyphLayoutFormDin91379.java │ │ │ │ ├── GlyphLayoutSMP.java │ │ │ │ ├── ListEncodings.java │ │ │ │ ├── RunGlyphLayoutExamples.java │ │ │ │ ├── StandardType1Fonts.java │ │ │ │ ├── TrueType.java │ │ │ │ ├── UnicodeExample.java │ │ │ │ ├── getting │ │ │ │ │ ├── ChineseJapaneseKorean.java │ │ │ │ │ ├── FontFactoryStyles.java │ │ │ │ │ ├── OpenTypeFont.java │ │ │ │ │ ├── RegisterFont.java │ │ │ │ │ ├── TrueType.java │ │ │ │ │ ├── TrueTypeCollections.java │ │ │ │ │ ├── UsingFontFactory.java │ │ │ │ │ └── liz.otf │ │ │ │ └── styles │ │ │ │ │ ├── ComplexText.java │ │ │ │ │ ├── ExtraStyles.java │ │ │ │ │ ├── FixedFontWidth.java │ │ │ │ │ ├── FontColor.java │ │ │ │ │ ├── FontStylePropagation.java │ │ │ │ │ ├── RightToLeft.java │ │ │ │ │ ├── Vertical.java │ │ │ │ │ └── WidthHeight.java │ │ │ ├── footer │ │ │ │ └── Footer.java │ │ │ ├── forms │ │ │ │ ├── FormCheckbox.java │ │ │ │ ├── FormCombo.java │ │ │ │ ├── FormList.java │ │ │ │ ├── FormPushButton.java │ │ │ │ ├── FormRadioButton.java │ │ │ │ ├── FormSignature.java │ │ │ │ ├── FormTextField.java │ │ │ │ ├── ListFields.java │ │ │ │ ├── SimpleRegistrationForm.java │ │ │ │ ├── TextFields.java │ │ │ │ ├── create │ │ │ │ │ ├── StudentCard.java │ │ │ │ │ ├── StudentCardForm.java │ │ │ │ │ └── bruno.jpg │ │ │ │ └── fill │ │ │ │ │ ├── FdfExample.java │ │ │ │ │ ├── Register.java │ │ │ │ │ ├── XfdfExample.java │ │ │ │ │ └── register.xfdf │ │ │ ├── general │ │ │ │ ├── CustomPageSize.java │ │ │ │ ├── DefaultPageSize.java │ │ │ │ ├── HelloEncrypted.java │ │ │ │ ├── HelloSystemOut.java │ │ │ │ ├── HelloWorld.java │ │ │ │ ├── HelloWorldMeta.java │ │ │ │ ├── HelloWorldPdf.java │ │ │ │ ├── LandscapePortrait.java │ │ │ │ ├── Margins.java │ │ │ │ ├── copystamp │ │ │ │ │ ├── AddWatermarkPageNumbers.java │ │ │ │ │ ├── Concatenate.java │ │ │ │ │ ├── ConcatenateForms.java │ │ │ │ │ ├── EncryptorExample.java │ │ │ │ │ ├── Register.java │ │ │ │ │ ├── TwoOnOne.java │ │ │ │ │ └── watermark.jpg │ │ │ │ ├── faq │ │ │ │ │ ├── Measurements.java │ │ │ │ │ ├── NewPage.java │ │ │ │ │ ├── OpenPdfVersion.java │ │ │ │ │ └── PdfVersion.java │ │ │ │ ├── read │ │ │ │ │ ├── Info.java │ │ │ │ │ └── ReadEncrypted.java │ │ │ │ └── webapp │ │ │ │ │ ├── HelloWorldServlet.java │ │ │ │ │ ├── OutSimplePdf.java │ │ │ │ │ ├── ProgressServlet.java │ │ │ │ │ └── SilentPrintServlet.java │ │ │ ├── html │ │ │ │ ├── HelloHtml.java │ │ │ │ ├── HelloWorldMeta.java │ │ │ │ ├── Images.java │ │ │ │ ├── ImagesURL.java │ │ │ │ ├── JavaScriptAction.java │ │ │ │ ├── ParseHelloHtml.java │ │ │ │ ├── ParseNestedHtmlList.java │ │ │ │ ├── ParseTableHtml.java │ │ │ │ ├── ParseTitleHtml.java │ │ │ │ ├── SpanTableHtml.java │ │ │ │ ├── getacro.gif │ │ │ │ ├── iText.bmp │ │ │ │ ├── iText.tif │ │ │ │ ├── iText.wmf │ │ │ │ ├── otsoe.jpg │ │ │ │ └── pngnow.png │ │ │ └── objects │ │ │ │ ├── Chunks.java │ │ │ │ ├── DifferentFonts.java │ │ │ │ ├── FancyLists.java │ │ │ │ ├── FontSelection.java │ │ │ │ ├── HeaderAndFooter.java │ │ │ │ ├── Lists.java │ │ │ │ ├── LongList.java │ │ │ │ ├── NegativeLeading.java │ │ │ │ ├── ParagraphAttributes.java │ │ │ │ ├── Paragraphs.java │ │ │ │ ├── Phrases.java │ │ │ │ ├── Signing.java │ │ │ │ ├── SpaceWordRatio.java │ │ │ │ ├── SymbolSubstitution.java │ │ │ │ ├── TextExtraction.java │ │ │ │ ├── anchors │ │ │ │ ├── AHref.java │ │ │ │ ├── Actions.java │ │ │ │ ├── Annotations.java │ │ │ │ ├── ChainedActions.java │ │ │ │ ├── JavaScriptAction.java │ │ │ │ ├── LocalDestination.java │ │ │ │ ├── LocalGoto.java │ │ │ │ ├── NamedActions.java │ │ │ │ ├── OpenApplication.java │ │ │ │ ├── RemoteGoto.java │ │ │ │ ├── SimpleAnnotations.java │ │ │ │ ├── cards.mpg │ │ │ │ └── iText.gif │ │ │ │ ├── bookmarks │ │ │ │ ├── ChapterSection.java │ │ │ │ ├── Destinations.java │ │ │ │ ├── Layers.java │ │ │ │ ├── ListItemBookmarks.java │ │ │ │ ├── OutlineActions.java │ │ │ │ ├── PageLabels.java │ │ │ │ ├── ParagraphBookmarks.java │ │ │ │ └── ViewerPreferences.java │ │ │ │ ├── chunk │ │ │ │ ├── Background.java │ │ │ │ ├── ChunkColor.java │ │ │ │ ├── EndOfLine.java │ │ │ │ ├── Generic.java │ │ │ │ ├── Glossary.java │ │ │ │ ├── Hyphenation.java │ │ │ │ ├── Lines.java │ │ │ │ ├── Rendering.java │ │ │ │ ├── Skew.java │ │ │ │ ├── SplitChar.java │ │ │ │ ├── SubSupScript.java │ │ │ │ └── Width.java │ │ │ │ ├── columns │ │ │ │ ├── Column.java │ │ │ │ ├── ColumnIrregular.java │ │ │ │ ├── ColumnObjects.java │ │ │ │ ├── ColumnSimple.java │ │ │ │ ├── ColumnTextAbsoluteBoxes.java │ │ │ │ ├── ColumnTextMultiTable.java │ │ │ │ ├── ColumnTextTable.java │ │ │ │ ├── DropCapsWithColumns.java │ │ │ │ ├── MultiColumnIrregular.java │ │ │ │ ├── MultiColumnR2L.java │ │ │ │ ├── MultiColumnSimple.java │ │ │ │ ├── caesar_coin.jpg │ │ │ │ └── cover.png │ │ │ │ ├── images │ │ │ │ ├── AbsolutePositions.java │ │ │ │ ├── Alignment.java │ │ │ │ ├── AnnotatedImage.java │ │ │ │ ├── AwtImage.java │ │ │ │ ├── DvdCover.java │ │ │ │ ├── ImageChunks.java │ │ │ │ ├── ImageMasks.java │ │ │ │ ├── ImageSequence.java │ │ │ │ ├── Images.java │ │ │ │ ├── ImagesAlignment.java │ │ │ │ ├── RawData.java │ │ │ │ ├── Rotating.java │ │ │ │ ├── Scaling.java │ │ │ │ ├── hitchcock.png │ │ │ │ ├── sunflower-back.jpg │ │ │ │ ├── sunflower-front.jpg │ │ │ │ └── vonnegut.gif │ │ │ │ └── tables │ │ │ │ ├── AddBigTable.java │ │ │ │ ├── CellAlignment.java │ │ │ │ ├── CellColors.java │ │ │ │ ├── CellHeights.java │ │ │ │ ├── CellPaddingLeading.java │ │ │ │ ├── CellWidths.java │ │ │ │ ├── DefaultCell.java │ │ │ │ ├── ImageCell.java │ │ │ │ ├── MyFirstTable.java │ │ │ │ ├── NestedTables.java │ │ │ │ ├── SplitRows.java │ │ │ │ ├── TableBorders.java │ │ │ │ ├── TableSpacing.java │ │ │ │ ├── TableWidthAlignment.java │ │ │ │ ├── alternatives │ │ │ │ ├── JTable2Pdf.java │ │ │ │ ├── LargeCell.java │ │ │ │ ├── MyFirstTable.java │ │ │ │ ├── NestedTables.java │ │ │ │ ├── OldTable.java │ │ │ │ ├── PaddingBorders.java │ │ │ │ ├── RepeatingTable.java │ │ │ │ ├── SpecificCells.java │ │ │ │ ├── TablePdfPTable.java │ │ │ │ ├── TableWithImage.java │ │ │ │ ├── iText.gif │ │ │ │ └── otsoe.jpg │ │ │ │ ├── otsoe.jpg │ │ │ │ └── pdfptable │ │ │ │ ├── CellEvents.java │ │ │ │ ├── FloatingBoxes.java │ │ │ │ ├── FragmentTable.java │ │ │ │ ├── SplitTable.java │ │ │ │ ├── TableEvents1.java │ │ │ │ ├── TableEvents2.java │ │ │ │ ├── Tables.java │ │ │ │ ├── VerticalTextInCells.java │ │ │ │ ├── WriteSelectedRows.java │ │ │ │ └── otsoe.jpg │ │ │ ├── toolbox │ │ │ └── plugins │ │ │ │ └── watermarker │ │ │ │ ├── WatermarkerTest.java │ │ │ │ └── WatermarkerToolTest.java │ │ │ └── tools │ │ │ └── ConcatPdfTest.java │ └── org │ │ └── librepdf │ │ └── openpdf │ │ ├── examples │ │ └── content │ │ │ └── Constants.java │ │ └── text │ │ └── pdf │ │ └── ImageAfterTextExample.java │ └── resources │ ├── CryptoSignedSha256.pdf │ ├── H.gif │ ├── MyFile.pdf │ ├── cc-test-64x64.png │ ├── cc-test.png │ ├── com │ └── lowagie │ │ └── examples │ │ ├── fonts │ │ ├── form │ │ │ ├── PdfFormLayoutProcessor.odt │ │ │ └── PdfFormLayoutProcessor.pdf │ │ ├── images │ │ │ └── mushroom.png │ │ └── noto │ │ │ ├── LICENSE │ │ │ ├── NotoSans-Regular.ttf │ │ │ ├── NotoSansArabic-Regular.ttf │ │ │ ├── NotoSansMath-Regular.ttf │ │ │ ├── NotoSansMono-Regular.ttf │ │ │ ├── NotoSerif-Regular.ttf │ │ │ └── README │ │ └── html │ │ ├── example1forHTMLWorker.html │ │ ├── example2forHTMLWorker.html │ │ ├── parseHelloWorld.html │ │ ├── parseTable.html │ │ └── parseTitle.html │ ├── getacro.gif │ ├── grayscaled.png │ ├── groups.pdf │ ├── iText.bmp │ ├── iText.tif │ ├── iText.wmf │ ├── layers.pdf │ ├── otsoe.jpg │ ├── pattern.pdf │ ├── pngnow.png │ └── templates.pdf └── pom.xml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | --- 8 | 9 | PLEASE FILL THIS TEMPLATE AS MUCH AS POSSIBLE. REMOVE IRRELEVANT PARTS. 10 | 11 | ### Describe the bug 12 | 13 | A clear and concise description of what the bug is 14 | 15 | ### To Reproduce 16 | 17 | Code to reproduce the issue 18 | 19 | 1. Sample Code 20 | 2. Unit-Test 21 | 22 | ### Expected behavior 23 | 24 | A clear and concise description of what you expected to happen. 25 | 26 | ### Screenshots 27 | 28 | If applicable, add screenshots to help explain your problem. 29 | 30 | ### System 31 | 32 | (please complete the following information) 33 | 34 | - OS: [e.g. iOS] 35 | - Used font: 36 | - OpenPDF version: 37 | 38 | ## Your real name 39 | Please specify your full name here, so that we can verify your identity. 40 | If you have a conflict of interest describe this here also. 41 | 42 | ### Additional context 43 | 44 | Add any other context about the problem here. 45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Your real name** 20 | Please specify your full name here, so that we can verify your identity. 21 | If you have a conflict of interest describe this here also. 22 | 23 | **Additional context** 24 | Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "maven" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "github-actions" 8 | directory: "/" 9 | schedule: 10 | interval: "daily" 11 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description of the new Feature/Bugfix 2 | 3 | Describe here how you fixed the bug, or implemented the new feature. 4 | 5 | Related Issue: # 6 | 7 | ## Unit-Tests for the new Feature/Bugfix 8 | 9 | - [ ] Unit-Tests added to reproduce the bug 10 | - [ ] Unit-Tests added to the added feature 11 | 12 | ## Compatibilities Issues 13 | 14 | Is anything broken because of the new code? Any changes in method signatures? 15 | 16 | ## Your real name 17 | Please specify your full name here, so that we can verify your identity. 18 | If you have a conflict of interest describe this here also. 19 | 20 | ## Testing details 21 | 22 | Any other details about how to test the new feature or bugfix? 23 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | name: OpenPDF Maven Build 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | strategy: 12 | matrix: 13 | java: [21, 24] 14 | name: Build with Java ${{ matrix.java }} 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Set up Java ${{ matrix.java }} 19 | uses: actions/setup-java@v4 20 | with: 21 | distribution: temurin 22 | java-version: ${{ matrix.java }} 23 | 24 | - name: Check Maven version and directory contents 25 | run: | 26 | mvn -v 27 | echo "** ls **" 28 | pwd && ls -l 29 | 30 | - name: Build with Maven 31 | run: mvn -B install --file pom.xml 32 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # Licenses 2 | 3 | ## Licenses of OpenPDF 4 | 5 | OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 6 | or GNU Lesser General Public License 2.1. 7 | 8 | The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` 9 | 10 | ### Mozilla Public License Version 2.0 11 | 12 | Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file 13 | [MPL-2.0.txt](openpdf/src/main/resources/META-INF/MPL-2.0.txt). 14 | 15 | ### GNU Lesser General Public License 2.1 16 | 17 | Please see https://www.gnu.org/licenses/old-licenses/lgpl-2.1 or the attached file 18 | [LGPL-2.1.md](openpdf/src/main/resources/META-INF/LGPL-2.1.md). 19 | -------------------------------------------------------------------------------- /changelogs/1.3.29.md: -------------------------------------------------------------------------------- 1 | # 1.3.29 2 | 3 | ## Changes 4 | 5 | - Adding Paragraphs with different run directions to same ColumnText object 6 | - Add linebreak after Content Stream 7 | - Correct license in all jars 8 | - Document 3rd party lib dep for getTiffImage 9 | - Document tiff requirements for Java < 9 10 | - Fix #620: leading problem 11 | - Fix #633: update ColumnText.java to 12 | - Fix #727: for issue 13 | - Fix #729: dictionary casting for issue 14 | - Improve monospaced font mapping on Windows and Linux 15 | - Note about updating jakarta.servlet-api 16 | - parsing of cross-reference streams with multiple revisions 17 | - split rowspan evenly 18 | - Use List for specialContent in HeaderFooter and rename specialcontent with camelcase 19 | 20 | ## Updated dependencies: 21 | 22 | - Bump actions/checkout from 2 to 3 23 | - Bump assertj-core from 3.22.0 to 3.23.1 24 | - Bump checkstyle from 10.2 to 10.3 25 | - Bump jakarta.servlet-api from 5.0.0 to 6.0.0 26 | - Bump maven-bundle-plugin from 5.1.5 to 5.1.6 27 | - Bump mockito-core from 4.5.1 to 4.6.1 28 | - Bump pitest-junit5-plugin from 0.15 to 1.0.0 29 | - Set checkstyle-action to 0.6.0 30 | - Update setup-java from 1 to 3 31 | -------------------------------------------------------------------------------- /changelogs/1.3.30.md: -------------------------------------------------------------------------------- 1 | # 1.3.30 2 | 3 | ## Changes 4 | 5 | - add method to extract ownerPasswordUsed value 6 | - Ensure deterministic behavior on protected PDF signature 7 | - Fix #747: wrong layout of generating a table with alignment setting 8 | - Fix #781: wrong deletion of chunks in HeaderFooter 9 | - fix slow or OutOfMemory in SmartCopy with some pdfs 10 | - fix style issues 11 | - Resolves #375 + #655: Implemented password based AES256 (ISO 32000-2) support, see issue #375 12 | - Resolves #619: add support for rowspan 13 | - Resolves #737: Simplify merging pdfs from java 14 | - RTL support for List Items - adding run direction at List Item level 15 | - Support for embedded images in HTMLWorker 16 | 17 | ## Updated dependencies: 18 | 19 | - Bump bouncycastle from 1.71 to 1.71.1 20 | - Bump checkstyle from 10.3 to 10.3.3 21 | - Bump junit from 5.8.2 to 5.9.0 22 | - Bump maven-bundle-plugin from 5.1.6 to 5.1.8 23 | - Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 24 | - Bump maven-javadoc-plugin from 3.4.0 to 3.4.1 25 | - Bump maven-jxr-plugin from 3.2.0 to 3.3.0 26 | - Bump mockito-core from 4.6.1 to 4.8.0 27 | -------------------------------------------------------------------------------- /changelogs/1.3.32.md: -------------------------------------------------------------------------------- 1 | # 1.3.32 2 | 3 | ## Changes 4 | 5 | * Speed up loading fonts from JAR (#955 #954) 6 | * Bump commons-io:commons-io from 2.13.0 to 2.15.0 (#967) 7 | * Bump org.apache.maven.plugins:maven-jxr-plugin from 3.3.0 to 3.3.1 (#966) 8 | * Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 9 | * Bump com.puppycrawl.tools:checkstyle from 10.12.3 to 10.12.4 (#958) 10 | * Nullsafe equals in XfaForm when processing template (#959) 11 | * Fix height calculation for table rows with rowspan @fellmann (#865) 12 | * Added AutoCloseable annotations on classes, that already implement the close method @SirLefti (#831) 13 | * Fixing umlauts in form fields @antonleliuk (#847) 14 | * Skipping eliminateSharedStreams() method call. @netmackan (#772) 15 | * Add flag to inhibit FOP glyph substitution @dadza (#904) 16 | * Refactorings by @Lonzak Part I (#853) 17 | * Align /ID entry creation with 14.4 File Identifiers @bsanchezb (#876) 18 | * Bump com.ibm.icu:icu4j from 73.2 to 74.1 (#976) 19 | * Bump org.pitest:pitest-junit5-plugin from 1.2.0 to 1.2.1 (#975) 20 | * Bump org.apache.maven.plugins:maven-clean-plugin from 3.3.1 to 3.3.2 21 | * Bump org.apache.maven.plugins:maven-checkstyle-plugin (#978) 22 | -------------------------------------------------------------------------------- /changelogs/1.3.37.md: -------------------------------------------------------------------------------- 1 | # 1.3.37 2 | 3 | ## Changes 4 | 5 | * OpenPDF 1.3.37 requires Java 11. 6 | -------------------------------------------------------------------------------- /changelogs/2.0.0.md: -------------------------------------------------------------------------------- 1 | # 2.0.0 2 | 3 | ## Changes 4 | 5 | * Removal of 108 deprecated old methods and fields. See JavaDoc for the methods marked as deprecated in 1.3.40 and the 6 | new methods to use instead: https://javadoc.io/doc/com.github.librepdf/openpdf/latest/index.html 7 | * Java 17 required. 8 | -------------------------------------------------------------------------------- /changelogs/2.1.0.md: -------------------------------------------------------------------------------- 1 | ## OpenPDF 2.1.0 - Modernization and New Features 2 | 3 | We are excited to announce the release of OpenPDF 2.1.0, which marks a major step forward for the project. 4 | 5 | * Java 21 required: OpenPDF 2.1.0 now targets Java 21 LTS and benefits from its modern features and performance improvements. Java 21 was released in 2023. 6 | 7 | * New Kotlin module: Build PDFs more easily using idiomatic Kotlin APIs and a DSL-inspired builder interface. 8 | 9 | * Added openpdf-html module: A maintained fork of Flying Saucer for converting HTML to PDF, now part of the OpenPDF project. The goal is to improve HTML5 and modern CSS support. 10 | 11 | * Deprecated HtmlParser: We encourage migrating to openpdf-html for improved HTML rendering. 12 | 13 | * Updated dependencies. 14 | -------------------------------------------------------------------------------- /changelogs/2.2.0.md: -------------------------------------------------------------------------------- 1 | ## OpenPDF 2.2.0 - PDF rendering! 2 | 3 | We are excited to announce the release of OpenPDF 2.2.0, which marks a major step forward for the project. 4 | 5 | * Added openpdf-renderer to render PDF files. 6 | -------------------------------------------------------------------------------- /changelogs/2.2.1.md: -------------------------------------------------------------------------------- 1 | ## OpenPDF 2.2.1 2 | 3 | * Modernization and fix sonarcloud issues in openpdf-renderer. 4 | -------------------------------------------------------------------------------- /changelogs/2.2.2.md: -------------------------------------------------------------------------------- 1 | ## 2.2.2 2 | * Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.11.2 by @dependabot in https://github.com/LibrePDF/OpenPDF/pull/1358 3 | * Rename openpdf-html config file til openpdf.conf and some minor fixes by @andreasrosdal in https://github.com/LibrePDF/OpenPDF/pull/1360 4 | * Remove GenShinGothic-Normal.ttf in order to reduce overall jar file size from 21MB to 15MB. 5 | -------------------------------------------------------------------------------- /changelogs/2.2.3.md: -------------------------------------------------------------------------------- 1 | ## 2.2.3 2 | * build: Deploy to Central Portal 3 | * Fix for openpdf-html css style does not load #1361 4 | * Remove Jaldi font in order to reduce package size. 5 | -------------------------------------------------------------------------------- /changelogs/2.2.4.md: -------------------------------------------------------------------------------- 1 | ## 2.2.4 2 | 3 | ### Bumps 4 | 5 | * Bump com.google.errorprone:error_prone_annotations from 2.38.0 to 2.39.0 (#1378) 6 | * Bump com.puppycrawl.tools:checkstyle from 10.25.0 to 10.25.1 (#1371) 7 | * Bump com.puppycrawl.tools:checkstyle from 10.25.1 to 10.26.0 (#1377) 8 | * Bump com.puppycrawl.tools:checkstyle from 10.26.0 to 10.26.1 (#1380) 9 | * Bump junit.version from 5.13.1 to 5.13.2 (#1376) 10 | * Bump org.jetbrains.kotlin:kotlin-maven-plugin from 2.1.21 to 2.2.0 (#1374) 11 | * Bump org.jetbrains.kotlin:kotlin-stdlib from 2.1.21 to 2.2.0 (#1375) 12 | * Bump org.sonatype.central:central-publishing-maven-plugin (#1363) 13 | 14 | ### Fixes 15 | 16 | * Fix/Feature add for issue #1297 (#1379) 17 | * Fix this access on a value that can be null. 18 | 19 | ### Other Changes 20 | 21 | * Register font only once in static block instead on every constructor call and degrade performance (#1373) 22 | * Remove commented out code and some system.out.println (#1364) 23 | * Update codeql.yml 24 | * Update Contributors.md 25 | -------------------------------------------------------------------------------- /changelogs/README.md: -------------------------------------------------------------------------------- 1 | # Creating the changelog 2 | 3 | ## How to create a changelog 4 | 5 | - Take a look at all commits since the last release 6 | - Group them into categories 7 | - Create a new file in the `changelogs` folder with the name `x.y.z.md` where `x.y.z` is the version number 8 | - Search all PRs and commits for the version number and add them to the changelog 9 | - Filter for github: `is:pr is:closed closed:>2022-09-19 -author:app/dependabot` 10 | - Credit all contributors in CONTRIBUTORS.md 11 | - Make sure all issues are linked and closed 12 | -------------------------------------------------------------------------------- /config/README.md: -------------------------------------------------------------------------------- 1 | # Formatter Configuration 2 | 3 | You can find in this directory the configuration files for the formatters used in this project. For IntelliJ IDEA 4 | and Eclipse. If you have other IDE, please contribute with a configuration file. OpenPDF has it's own coding style. 5 | It is based in the Google Java Style Guide, but with some modifications: 6 | 7 | * Indentation: 4 spaces 8 | * Line length: 120 characters 9 | * Continuation indent: 8 spaces 10 | -------------------------------------------------------------------------------- /openpdf-fonts-extra/pom.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 3 | <modelVersion>4.0.0</modelVersion> 4 | 5 | <parent> 6 | <groupId>com.github.librepdf</groupId> 7 | <artifactId>openpdf-parent</artifactId> 8 | <version>2.2.5-SNAPSHOT</version> 9 | </parent> 10 | 11 | <artifactId>openpdf-fonts-extra</artifactId> 12 | <name>OpenPDF Fonts Extras</name> 13 | 14 | <properties> 15 | <java-module-name>com.github.librepdf.pdfFontsExtra</java-module-name> 16 | </properties> 17 | 18 | <dependencies> 19 | <dependency> 20 | <groupId>com.github.librepdf</groupId> 21 | <artifactId>openpdf</artifactId> 22 | <version>${project.version}</version> 23 | </dependency> 24 | 25 | <dependency> 26 | <groupId>org.junit.jupiter</groupId> 27 | <artifactId>junit-jupiter-api</artifactId> 28 | <scope>test</scope> 29 | </dependency> 30 | </dependencies> 31 | 32 | </project> 33 | -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/META-INF/LICENSES.md: -------------------------------------------------------------------------------- 1 | # Licenses 2 | 3 | ## Licenses of OpenPDF 4 | 5 | OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 6 | or GNU Lesser General Public License 2.1. 7 | 8 | The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` 9 | 10 | ### Mozilla Public License Version 2.0 11 | 12 | Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file 13 | [MPL-2.0.txt](MPL-2.0.txt). 14 | 15 | ### GNU Lesser General Public License 2.1 16 | 17 | Please see https://www.gnu.org/licenses/old-licenses/lgpl-2.1 or the attached file 18 | [LGPL-2.1.md](LGPL-2.1.md). 19 | 20 | #### Apache License, Version 2.0 21 | 22 | Some files use code from different Apache projects. The source code of these files contains the appropriate copyright 23 | notices as described in the Appendix of `http://www.apache.org/licenses/LICENSE-2.0`. 24 | 25 | Please see https://www.apache.org/licenses/LICENSE-2.0 or the attached file 26 | [APACHE-LICENSE-2.0.txt](APACHE-LICENSE-2.0.txt). 27 | 28 | -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/AUTHORS: -------------------------------------------------------------------------------- 1 | AUTHORS 2 | 3 | Current Contributors (sorted alphabetically): 4 | - Pravin Satpute <psatpute at redhat dot com> 5 | Project Owner (Current) 6 | Red Hat, Inc. 7 | 8 | Previous Contributors 9 | 10 | - Steve Matteson 11 | Original Designer 12 | Ascender, Inc. 13 | -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-Bold.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-BoldItalic.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-Italic.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationMono-Regular.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-Bold.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-BoldItalic.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-Italic.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSans-Regular.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-Bold.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-BoldItalic.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-Italic.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-fonts-extra/src/main/resources/liberation/LiberationSerif-Regular.ttf -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/main/resources/liberation/TODO: -------------------------------------------------------------------------------- 1 | Here are todo for next release 2 | 1) Serbian glyph for wikipedia https://bugzilla.redhat.com/show_bug.cgi?id=657849 3 | 2) Liberation Mono not recognizing as Mono in Windows application #861003 4 | - presently it is patch, we have to update zero width characters to fixed width 5 | -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/test/java/org/librepdf/openpdf/fonts/FontsTestUtil.java: -------------------------------------------------------------------------------- 1 | package org.librepdf.openpdf.fonts; 2 | 3 | import com.lowagie.text.Document; 4 | import com.lowagie.text.DocumentException; 5 | import com.lowagie.text.PageSize; 6 | import com.lowagie.text.pdf.PdfWriter; 7 | import java.io.FileNotFoundException; 8 | import java.io.FileOutputStream; 9 | import java.io.OutputStream; 10 | 11 | public class FontsTestUtil { 12 | 13 | static Document createPdf(OutputStream outputStream) throws DocumentException { 14 | // create a new document 15 | Document document = new Document(PageSize.A4); 16 | // generate file 17 | PdfWriter.getInstance(document, outputStream); 18 | return document; 19 | } 20 | 21 | static Document createPdf(String filename) throws FileNotFoundException { 22 | FileOutputStream outputStream = new FileOutputStream(filename); 23 | return createPdf(outputStream); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /openpdf-fonts-extra/src/test/java/org/librepdf/openpdf/fonts/UnicodePdfTest.java: -------------------------------------------------------------------------------- 1 | package org.librepdf.openpdf.fonts; 2 | 3 | import com.lowagie.text.Document; 4 | import com.lowagie.text.Paragraph; 5 | import java.io.IOException; 6 | import org.junit.jupiter.api.Test; 7 | 8 | class UnicodePdfTest { 9 | 10 | private static final String INPUT = "Symbol: '\u25b2' Latin: 'äöüÄÖÜß'"; 11 | 12 | @Test 13 | void testSimplePdf() throws IOException { 14 | // Probably a good idea to write the document to a byte array, so you can read the result and make some checks. 15 | // ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); 16 | // create document 17 | Document document = FontsTestUtil.createPdf("target/unicode.pdf"); 18 | // new page with a rectangle 19 | document.open(); 20 | document.add(new Paragraph(INPUT, Liberation.SANS.create())); 21 | document.close(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/context/StylesheetCache.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.context; 2 | 3 | import org.openpdf.css.sheet.Stylesheet; 4 | 5 | import java.util.LinkedHashMap; 6 | import java.util.Map; 7 | 8 | class StylesheetCache extends LinkedHashMap<String, Stylesheet> { 9 | private static final int cacheCapacity = 16; 10 | 11 | StylesheetCache() { 12 | super(cacheCapacity, 0.75f, true); 13 | } 14 | 15 | @Override 16 | protected boolean removeEldestEntry(Map.Entry<String, Stylesheet> eldest) { 17 | return size() > cacheCapacity; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/context/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.context; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/constants/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | @CheckReturnValue 3 | package org.openpdf.css.constants; 4 | 5 | import com.google.errorprone.annotations.CheckReturnValue; 6 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/parser/CSSErrorHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2007 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.css.parser; 21 | 22 | import org.jspecify.annotations.Nullable; 23 | 24 | public interface CSSErrorHandler { 25 | void error(@Nullable String uri, String message); 26 | } 27 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/parser/FSColor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2007 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.css.parser; 21 | 22 | import com.google.errorprone.annotations.CheckReturnValue; 23 | 24 | public interface FSColor { 25 | @CheckReturnValue 26 | FSColor lightenColor(); 27 | @CheckReturnValue 28 | FSColor darkenColor(); 29 | } 30 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/parser/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.css.parser; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/parser/property/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.css.parser.property; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/sheet/RulesetContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2007 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.css.sheet; 21 | 22 | import org.openpdf.css.sheet.StylesheetInfo.Origin; 23 | 24 | public interface RulesetContainer { 25 | void addContent(Ruleset ruleset); 26 | Origin getOrigin(); 27 | } 28 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/style/CssContext.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.css.style; 2 | 3 | import com.google.errorprone.annotations.CheckReturnValue; 4 | import org.jspecify.annotations.Nullable; 5 | import org.openpdf.context.StyleReference; 6 | import org.openpdf.css.value.FontSpecification; 7 | import org.openpdf.render.FSFont; 8 | import org.openpdf.render.FSFontMetrics; 9 | 10 | /** 11 | * User: tobe 12 | * Date: 2005-jun-23 13 | */ 14 | public interface CssContext { 15 | float getMmPerDot(); 16 | 17 | int getDotsPerPixel(); 18 | 19 | float getFontSize2D(FontSpecification font); 20 | 21 | float getXHeight(FontSpecification parentFont); 22 | 23 | @Nullable 24 | @CheckReturnValue 25 | FSFont getFont(FontSpecification font); 26 | 27 | // FIXME Doesn't really belong here, but this is 28 | // the only common interface of LayoutContext 29 | // and RenderingContext 30 | @CheckReturnValue 31 | StyleReference getCss(); 32 | 33 | @CheckReturnValue 34 | FSFontMetrics getFSFontMetrics(FSFont font); 35 | } 36 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/style/EmptyStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * EmptyStyle.java 3 | * Copyright (c) 2004, 2005 Torbjoern Gannholm 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * 19 | */ 20 | package org.openpdf.css.style; 21 | 22 | 23 | /** 24 | * Represents the outer box to be used for evaluating positioning of internal 25 | * boxes 26 | * 27 | * @author Torbjoern Gannholm 28 | */ 29 | public class EmptyStyle extends CalculatedStyle { 30 | } 31 | 32 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/style/derived/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.css.style.derived; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/style/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.css.style; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/css/value/FontSpecification.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.css.value; 2 | 3 | import org.openpdf.css.constants.IdentValue; 4 | 5 | import static java.util.Arrays.asList; 6 | 7 | /** 8 | * User: tobe 9 | * Date: 2005-jun-23 10 | */ 11 | public class FontSpecification { 12 | public float size; 13 | public IdentValue fontWeight; 14 | public String[] families; 15 | public IdentValue fontStyle; 16 | public IdentValue variant; 17 | 18 | @Override 19 | public String toString() { 20 | return String.format("Font specification: families: %s size: %s weight: %s style: %s variant: %s", 21 | asList(families), size, fontWeight, fontStyle, variant); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/event/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.event; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/extend/FSCanvas.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2007 Vianney le Clément 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.extend; 21 | 22 | import java.awt.Rectangle; 23 | 24 | public interface FSCanvas { 25 | Rectangle getFixedRectangle(); 26 | 27 | int getX(); 28 | 29 | int getY(); 30 | } 31 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/extend/FSGlyphVector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2007 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.extend; 21 | 22 | public interface FSGlyphVector { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/extend/FontContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2006 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.extend; 21 | 22 | public interface FontContext { 23 | } 24 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/extend/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | @CheckReturnValue 3 | package org.openpdf.extend; 4 | 5 | import com.google.errorprone.annotations.CheckReturnValue; 6 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/layout/breaker/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.layout.breaker; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/layout/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.layout; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/newtable/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.newtable; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/pdf/DefaultPDFCreationListener.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.pdf; 2 | 3 | /** 4 | * No-op implementation of a {@link org.openpdf.pdf.PDFCreationListener}. Override methods as needed. 5 | */ 6 | public class DefaultPDFCreationListener implements PDFCreationListener { 7 | @Override 8 | public void preOpen(ITextRenderer iTextRenderer) { } 9 | 10 | @Override 11 | public void preWrite(ITextRenderer iTextRenderer, int pageCount) {} 12 | 13 | @Override 14 | public void onClose(ITextRenderer renderer) { } 15 | } 16 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/pdf/ITextFontContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2006 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.pdf; 21 | 22 | import org.openpdf.extend.FontContext; 23 | 24 | public class ITextFontContext implements FontContext { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/pdf/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | @CheckReturnValue 3 | package org.openpdf.pdf; 4 | 5 | import com.google.errorprone.annotations.CheckReturnValue; 6 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/pdf/util/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | @CheckReturnValue 3 | package org.openpdf.pdf.util; 4 | 5 | import com.google.errorprone.annotations.CheckReturnValue; 6 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/render/FSFont.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2006 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.render; 21 | 22 | public interface FSFont { 23 | float getSize2D(); 24 | } 25 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/render/JustificationInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2007 Wisconsin Court System 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.render; 21 | 22 | public record JustificationInfo(float nonSpaceAdjust, float spaceAdjust) { 23 | } 24 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/render/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.render; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/resource/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.resource; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/simple/extend/form/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.simple.extend.form; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/simple/extend/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.simple.extend; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/swing/RepaintListener.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.swing; 2 | 3 | /** 4 | * User: pdoubleya 5 | * Date: Apr 20, 2009 6 | */ 7 | public interface RepaintListener { 8 | void repaintRequested(boolean doLayout); 9 | } 10 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/swing/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.swing; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/test/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.test; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{{ header & license 3 | * Copyright (c) 2009 Patrick Wright 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public License 7 | * as published by the Free Software Foundation; either version 2.1 8 | * of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | * }}} 19 | */ 20 | package org.openpdf.util; 21 | 22 | public class Constants { 23 | public static final String[] EMPTY_STR_ARR = {}; 24 | public static final byte[] EMPTY_BYTE_ARR = {}; 25 | public static final int[] EMPTY_INT_ARR = {}; 26 | } 27 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/DefaultCSSMarker.java: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* 4 | 5 | * {{{ header & license 6 | 7 | * Copyright (c) 2004, 2005 Joshua Marinacci 8 | 9 | * 10 | 11 | * This program is free software; you can redistribute it and/or 12 | 13 | * modify it under the terms of the GNU Lesser General Public License 14 | 15 | * as published by the Free Software Foundation; either version 2.1 16 | 17 | * of the License, or (at your option) any later version. 18 | 19 | * 20 | 21 | * This program is distributed in the hope that it will be useful, 22 | 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | 25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | 27 | * GNU Lesser General Public License for more details. 28 | 29 | * 30 | 31 | * You should have received a copy of the GNU Lesser General Public License 32 | 33 | * along with this program; if not, write to the Free Software 34 | 35 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 36 | 37 | * }}} 38 | 39 | */ 40 | 41 | 42 | 43 | package org.openpdf.util; 44 | 45 | 46 | 47 | public class DefaultCSSMarker { 48 | 49 | 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/InputSources.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.util; 2 | 3 | import org.jspecify.annotations.Nullable; 4 | import org.xml.sax.InputSource; 5 | 6 | import java.io.BufferedInputStream; 7 | import java.io.InputStream; 8 | import java.io.StringReader; 9 | import java.net.URL; 10 | 11 | public class InputSources { 12 | @Nullable 13 | public static InputSource fromStream(@Nullable InputStream is) { 14 | return is == null ? null : new InputSource(new BufferedInputStream(is)); 15 | } 16 | 17 | public static InputSource fromURL(URL source) { 18 | return new InputSource(source.toString()); 19 | } 20 | 21 | public static InputSource fromString(String source) { 22 | return new InputSource(new StringReader(source)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/LazyEvaluated.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.util; 2 | 3 | import org.jspecify.annotations.Nullable; 4 | 5 | import java.util.function.Supplier; 6 | 7 | import static java.util.Objects.requireNonNull; 8 | 9 | public class LazyEvaluated<T> { 10 | @Nullable 11 | private volatile T value; 12 | private final Supplier<T> supplier; 13 | 14 | private LazyEvaluated(Supplier<T> supplier) { 15 | this.supplier = supplier; 16 | } 17 | 18 | public T get() { 19 | if (value == null) { 20 | synchronized (this) { 21 | if (value == null) { 22 | value = supplier.get(); 23 | } 24 | } 25 | } 26 | return requireNonNull(value); 27 | } 28 | 29 | public static <T> LazyEvaluated<T> lazy(Supplier<T> supplier) { 30 | return new LazyEvaluated<T>(supplier); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/SupportedEmbeddedFontTypes.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.util; 2 | 3 | public enum SupportedEmbeddedFontTypes { 4 | OTF("font/otf", ".otf"), 5 | TTF("font/ttf", ".ttf"); 6 | 7 | public final String typeString; 8 | public final String extension; 9 | 10 | SupportedEmbeddedFontTypes(String typeString, String extension) { 11 | this.typeString = typeString; 12 | this.extension = extension; 13 | } 14 | 15 | public static boolean isSupported(String uri) { 16 | for(SupportedEmbeddedFontTypes type: SupportedEmbeddedFontTypes.values()) { 17 | if(uri.contains(type.typeString)) 18 | return true; 19 | } 20 | return false; 21 | } 22 | 23 | public static String getExtension(String uri) { 24 | for(SupportedEmbeddedFontTypes type: SupportedEmbeddedFontTypes.values()) { 25 | if(uri.contains(type.typeString)) 26 | return type.extension; 27 | } 28 | return ""; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/TextUtil.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.util; 2 | 3 | import com.google.errorprone.annotations.CheckReturnValue; 4 | import org.jspecify.annotations.Nullable; 5 | import org.w3c.dom.Element; 6 | import org.w3c.dom.Node; 7 | import org.w3c.dom.Text; 8 | 9 | public class TextUtil { 10 | @Nullable 11 | @CheckReturnValue 12 | public static String readTextContentOrNull(Element element) { 13 | String text = readTextContent(element); 14 | return text.isEmpty() ? null : text; 15 | } 16 | 17 | @CheckReturnValue 18 | public static String readTextContent(Element element) { 19 | StringBuilder result = new StringBuilder(); 20 | Node current = element.getFirstChild(); 21 | while (current != null) { 22 | short nodeType = current.getNodeType(); 23 | if (nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE) { 24 | Text t = (Text) current; 25 | result.append(t.getData()); 26 | } 27 | current = current.getNextSibling(); 28 | } 29 | return result.toString(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /openpdf-html/src/main/java/org/openpdf/util/package-info.java: -------------------------------------------------------------------------------- 1 | @NullMarked 2 | package org.openpdf.util; 3 | 4 | import org.jspecify.annotations.NullMarked; -------------------------------------------------------------------------------- /openpdf-html/src/main/resources/resources/schema/docbook/README: -------------------------------------------------------------------------------- 1 | XML Entity Declarations for Characters 2 | 3 | The character entity sets distributed with DocBook XML are direct 4 | copies of the official entities located at 5 | 6 | http://www.w3.org/2003/entities/ 7 | 8 | They are distributed for historical compatibility and user convenience. 9 | The DocBook Technical Committee no longer attempts to maintain these 10 | definitions and will periodically update them from the W3C site if and 11 | as they are updated there. 12 | 13 | Please direct all questions or comments about the entities to the 14 | individuals or working groups who maintain the official sets. 15 | -------------------------------------------------------------------------------- /openpdf-html/src/main/resources/resources/schema/html-4.01/entity/html-lat1.ent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-html/src/main/resources/resources/schema/html-4.01/entity/html-lat1.ent -------------------------------------------------------------------------------- /openpdf-html/src/main/resources/resources/schema/html-4.01/entity/html-special.ent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-html/src/main/resources/resources/schema/html-4.01/entity/html-special.ent -------------------------------------------------------------------------------- /openpdf-html/src/main/resources/resources/schema/html-4.01/entity/html-symbol.ent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-html/src/main/resources/resources/schema/html-4.01/entity/html-symbol.ent -------------------------------------------------------------------------------- /openpdf-html/src/main/resources/resources/schema/html-4.01/html-4.01-frameset.dtd: -------------------------------------------------------------------------------- 1 | <!-- 2 | This is the HTML 4.01 Frameset DTD, which should be 3 | used for documents with frames. This DTD is identical 4 | to the HTML 4.01 Transitional DTD except for the 5 | content model of the "HTML" element: in frameset 6 | documents, the "FRAMESET" element replaces the "BODY" 7 | element. 8 | 9 | Draft: $Date$ 10 | 11 | Authors: 12 | Dave Raggett <dsr@w3.org> 13 | Arnaud Le Hors <lehors@w3.org> 14 | Ian Jacobs <ij@w3.org> 15 | 16 | Further information about HTML 4.01 is available at: 17 | 18 | http://www.w3.org/TR/1999/REC-html401-19991224. 19 | --> 20 | <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Frameset//EN" 21 | -- Typical usage: 22 | 23 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 24 | "http://www.w3.org/TR/html4/frameset.dtd"> 25 | <html> 26 | <head> 27 | ... 28 | </head> 29 | <frameset> 30 | ... 31 | </frameset> 32 | </html> 33 | --> 34 | 35 | <!ENTITY % HTML.Frameset "INCLUDE"> 36 | <!ENTITY % HTML4.dtd PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 37 | %HTML4.dtd; 38 | -------------------------------------------------------------------------------- /openpdf-html/src/main/resources/resources/schema/xhtml/catalog-xhtml-1.1.xml: -------------------------------------------------------------------------------- 1 | <?xml version='1.0'?> 2 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public"> 3 | 4 | <!-- ...................................................................... --> 5 | <!-- XML Catalog data for HTML XML V4.01 ................................ --> 6 | 7 | <!-- This is derived from the sample catalog.xml that ships with the 8 | DocBook XML v4.4 DTDs. It maps to the Flying Saucer DTD repository 9 | under resources/schema/html-4.01/* --> 10 | 11 | <!-- ...................................................................... --> 12 | <public publicId="-//W3C//DTD XHTML 1.1//EN" 13 | uri="resources/schema/xhtml/xhtml-1.1/xhtml11.dtd" /> 14 | 15 | <public publicId="-//W3C//ENTITIES XHTML 1.1 Document Model 1.0//EN" uri="resources/schema/xhtml/xhtml-1.1/entity/xhtml11-model-1.mod" /> 16 | 17 | <!-- End of catalog data for HTML XML V4.01 ............................. --> 18 | <!-- ...................................................................... --> 19 | 20 | </catalog> 21 | -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/context/StylesheetCacheTest.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.context; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.openpdf.css.sheet.Stylesheet; 5 | 6 | import static org.assertj.core.api.Assertions.assertThat; 7 | import static org.openpdf.css.sheet.StylesheetInfo.Origin.AUTHOR; 8 | 9 | class StylesheetCacheTest { 10 | private final StylesheetCache cache = new StylesheetCache(); 11 | 12 | @Test 13 | void holdsNoMoreThan16Entries() { 14 | for (int i = 0; i < 17; i++) { 15 | cache.put("key#" + i, new Stylesheet("https://" + i, AUTHOR)); 16 | } 17 | assertThat(cache.size()).isEqualTo(16); 18 | assertThat(cache).doesNotContainKey("key#0"); 19 | assertThat(cache).containsKey("key#1"); 20 | assertThat(cache).containsKey("key#16"); 21 | } 22 | } -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/css/newmatch/LangConditionTest.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.css.newmatch; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.openpdf.css.newmatch.Condition.LangCondition; 5 | 6 | import static org.assertj.core.api.Assertions.assertThat; 7 | import static org.openpdf.css.newmatch.Condition.createLangCondition; 8 | 9 | class LangConditionTest { 10 | private final LangCondition condition = (LangCondition) createLangCondition("et"); 11 | 12 | @Test 13 | void langAttributeEqualsExpectedLanguage() { 14 | assertThat(condition.matches("et")).isTrue(); 15 | } 16 | 17 | @Test 18 | void countryPartIsIgnored() { 19 | assertThat(condition.matches("et-EE")).isTrue(); 20 | assertThat(condition.matches("et-FI")).isTrue(); 21 | } 22 | 23 | @Test 24 | void langIsCaseInsensitive() { 25 | assertThat(condition.matches("ET-EE")).isTrue(); 26 | assertThat(condition.matches("ET-EE")).isTrue(); 27 | } 28 | 29 | @Test 30 | void langAttributeNotEqualToExpectedLanguage() { 31 | assertThat(condition.matches("en")).isFalse(); 32 | assertThat(condition.matches("en-ET")).isFalse(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/css/parser/FSRGBColorTest.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.css.parser; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.assertj.core.api.Assertions.assertThat; 6 | 7 | class FSRGBColorTest { 8 | @Test 9 | void toString_rgb() { 10 | assertThat(new FSRGBColor(255, 250, 180)).hasToString("#fffab4"); 11 | assertThat(new FSRGBColor(1, 2, 3)).hasToString("#010203"); 12 | } 13 | 14 | @Test 15 | void toString_rgba() { 16 | assertThat(new FSRGBColor(255, 250, 180, 0.42f)).hasToString("rgba(255,250,180,0.42)"); 17 | assertThat(new FSRGBColor(1, 2, 3, 0.01f)).hasToString("rgba(1,2,3,0.01)"); 18 | } 19 | 20 | @Test 21 | void toHSB() { 22 | assertThat(new FSRGBColor(255, 200, 100).toHSB()).isEqualTo(new HSBColor(0.107526876f, 0.60784316f, 1.0f)); 23 | assertThat(new FSRGBColor(1, 2, 3).toHSB()).isEqualTo(new HSBColor(0.5833333f, 0.6666667f, 0.011764706f)); 24 | assertThat(new FSRGBColor(1, 2, 3, 0.1f).toHSB()).isEqualTo(new HSBColor(0.5833333f, 0.6666667f, 0.011764706f)); 25 | } 26 | } -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/pdf/StrictErrorHandler.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.pdf; 2 | 3 | import org.xml.sax.ErrorHandler; 4 | import org.xml.sax.SAXParseException; 5 | 6 | class StrictErrorHandler implements ErrorHandler { 7 | @Override 8 | public void error(SAXParseException exception) throws SAXParseException { 9 | throw exception; 10 | } 11 | 12 | @Override 13 | public void fatalError(SAXParseException exception) throws SAXParseException { 14 | throw exception; 15 | } 16 | 17 | @Override 18 | public void warning(SAXParseException exception) throws SAXParseException { 19 | throw exception; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/simple/ImageRendererTest.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.simple; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | import java.awt.image.BufferedImage; 8 | import java.io.File; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | import static org.assertj.core.api.Assertions.assertThat; 12 | 13 | class ImageRendererTest { 14 | private static final Logger log = LoggerFactory.getLogger(ImageRendererTest.class); 15 | 16 | @Test 17 | public void backgroundImageWithRelativePath() throws Exception { 18 | File result = new File("target/%s.png".formatted(getClass().getSimpleName())); 19 | BufferedImage image = ImageRenderer.renderToImage(requireNonNull(getClass().getResource("/text-with-background-image.xhtml")), result.getAbsolutePath(), 600); 20 | assertThat(image.getWidth()).isEqualTo(600); 21 | assertThat(image.getHeight()).isBetween(100, 200); 22 | log.info("Generated image from html: {}", result.getAbsolutePath()); 23 | } 24 | } -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/swing/QuotingExampleTest.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.swing; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | import javax.imageio.ImageIO; 8 | import java.awt.image.BufferedImage; 9 | import java.io.File; 10 | 11 | import static java.util.Objects.requireNonNull; 12 | import static org.junit.jupiter.api.Assertions.assertNotNull; 13 | import static org.openpdf.swing.Java2DRenderer.htmlAsImage; 14 | 15 | public class QuotingExampleTest { 16 | private static final Logger log = LoggerFactory.getLogger(QuotingExampleTest.class); 17 | 18 | @Test 19 | public void exampleWithQuotes() throws Exception { 20 | BufferedImage image = htmlAsImage(requireNonNull(getClass().getResourceAsStream("/quotes.xhtml")), 600); 21 | assertNotNull(image, "Rendered image should not be null"); 22 | 23 | File result = new File("target/%s.png".formatted(getClass().getSimpleName())); 24 | ImageIO.write(image, "png", result); 25 | log.info("Generated image from html: {}", result.getAbsolutePath()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /openpdf-html/src/test/java/org/openpdf/util/ContentTypeDetectingInputStreamWrapperTest.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.util; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import java.io.ByteArrayInputStream; 6 | import java.io.IOException; 7 | 8 | import static java.nio.charset.StandardCharsets.UTF_8; 9 | import static org.assertj.core.api.Assertions.assertThat; 10 | 11 | class ContentTypeDetectingInputStreamWrapperTest { 12 | @Test 13 | void isPdf() throws IOException { 14 | try (var stream = new ContentTypeDetectingInputStreamWrapper(new ByteArrayInputStream("%PDF1234567890".getBytes(UTF_8)))) { 15 | assertThat(stream.isPdf()).isTrue(); 16 | } 17 | } 18 | 19 | @Test 20 | void isNotPdf() throws IOException { 21 | try (var stream = new ContentTypeDetectingInputStreamWrapper(new ByteArrayInputStream("Hello, world".getBytes(UTF_8)))) { 22 | assertThat(stream.isPdf()).isFalse(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/fonts/Jacquard24-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-html/src/test/resources/fonts/Jacquard24-Regular.ttf -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/hello.css.html: -------------------------------------------------------------------------------- 1 | <html lang="en"> 2 | <head> 3 | <title>Hello CSS</title> 4 | <style> 5 | body {color: black;} 6 | </style> 7 | <style> 8 | h1 {color: red;} 9 | </style> 10 | </head> 11 | 12 | <body> 13 | <h1>Hello, world</h1> 14 | </body> 15 | </html> 16 | -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/hello.html: -------------------------------------------------------------------------------- 1 | <h1>Hello, world</h1> -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/left-right-border.html: -------------------------------------------------------------------------------- 1 | <html lang="en"> 2 | <head> 3 | <title>TEST</title> 4 | 5 | <style> 6 | div { 7 | background-color: cornflowerblue; 8 | color: white; 9 | padding: 10px; 10 | margin: 10px; 11 | width: 50%; 12 | text-align: center; 13 | } 14 | 15 | .border-bottom-left { 16 | border-bottom-left-radius: 30px; 17 | } 18 | 19 | .border-bottom-right { 20 | border-bottom-right-radius: 30px; 21 | } 22 | 23 | .border-top-left { 24 | border-top-left-radius: 30px; 25 | } 26 | 27 | .border-top-right { 28 | border-top-right-radius: 30px; 29 | } 30 | </style> 31 | </head> 32 | <body> 33 | <div class="border-top-left"> 34 | <span>Border top left radius</span> 35 | </div> 36 | <div class="border-top-right"> 37 | <span>Border top right radius</span> 38 | </div> 39 | <div class="border-bottom-left"> 40 | <span>Border bottom left radius</span> 41 | </div> 42 | <div class="border-bottom-right"> 43 | <span>Border bottom right radius</span> 44 | </div> 45 | 46 | </body> 47 | </html> -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/norway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-html/src/test/resources/norway.png -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/org/openpdf/pdf/borderradius/borderRadiusWithBorderWidthZero.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 | <html xmlns="http://www.w3.org/1999/xhtml"> 3 | <head> 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 | <title>Test</title> 6 | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 7 | </head> 8 | <body> 9 | <div style="background-color: #eeeeee; border-radius: 5px 5px 0px 0px;"> 10 | Some content 11 | </div> 12 | 13 | <img id="red-dot" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" width="300px"/> 14 | </body> 15 | </html> -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/org/openpdf/pdf/break-all.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 | <html xmlns="http://www.w3.org/1999/xhtml"> 3 | <head> 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 | <title>Test::break-all</title> 6 | </head> 7 | <body> 8 | <div style="width: 90px; border: 1px solid black; word-break: break-all;"> 9 | HelloWorld1HelloWorld2HelloWorld3HelloWorld4HelloWorld5 10 | </div> 11 | </body> 12 | </html> -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/org/openpdf/pdf/bug/EndlessLoopTest_wordwrap.html: -------------------------------------------------------------------------------- 1 | <body> 2 | <div style="width: 100px; float: left; background-color: darkorange">floated</div> 3 | <div style="width: 101px; word-wrap: break-word; background-color: lavender">word wrapped</div> 4 | </body> 5 | -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/page-with-header.html: -------------------------------------------------------------------------------- 1 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> 2 | 3 | <head> 4 | <style> 5 | @page { 6 | size: 200px 200px; 7 | @top-left { 8 | content: element(header); 9 | } 10 | @bottom-left { 11 | content: element(footer); 12 | } 13 | } 14 | 15 | #header { 16 | position: running(header); 17 | } 18 | 19 | #footer { 20 | position: running(footer); 21 | } 22 | </style> 23 | <title></title> 24 | </head> 25 | 26 | <body> 27 | <div id="header">Header</div> 28 | <div id="body">Body</div> 29 | <div id="footer">Footer</div> 30 | </body> 31 | 32 | </html> -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/quotes.xhtml: -------------------------------------------------------------------------------- 1 | <!-- 2 | currently we cannot display different quotes based on depth 3 | --> 4 | <html lang="en"> 5 | <head> 6 | <style type='text/css'><![CDATA[ 7 | * { quotes: '"' '"' "'" "'" } 8 | q:before { content: open-quote } 9 | q:after { content: close-quote } 10 | blockquote p:before { content: open-quote } 11 | blockquote p:after { content: no-close-quote } 12 | blockquote p.last:after { content: close-quote } 13 | ]]></style> 14 | <title>Page with quotes</title> 15 | </head> 16 | <body> 17 | <blockquote> 18 | <p>This is just a test of the emergency <q>quoting</q> system.</p> 19 | <p>This is only a test.</p> 20 | <p class='last'>Thank you for your cooperation during this <q>test.</q></p> 21 | </blockquote> 22 | </body> 23 | </html> 24 | -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/styles/sample.css: -------------------------------------------------------------------------------- 1 | .password { 2 | display: none; 3 | } -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/text-with-background-image.xhtml: -------------------------------------------------------------------------------- 1 | <html lang="en"> 2 | <head> 3 | <title>Page with background image</title> 4 | </head> 5 | <body> 6 | 7 | <p>AAA AAA AAA AAA AAA AAA </p> 8 | <p style="background-image: url(transgrey.png); background-repeat: no-repeat;">BBB BBB BBB BBB BBB BBB BBB </p> 9 | <p class='last'>CCC CCC CCC CCC CCC CCC CCC </p> 10 | 11 | </body> 12 | </html> 13 | -------------------------------------------------------------------------------- /openpdf-html/src/test/resources/transgrey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-html/src/test/resources/transgrey.png -------------------------------------------------------------------------------- /openpdf-kotlin/src/main/java/org/librepdf/kotlin/DummyDoc.java: -------------------------------------------------------------------------------- 1 | package org.librepdf.kotlin; 2 | 3 | /** 4 | * DummyDoc is a placeholder to generate a valid javadoc.jar 5 | */ 6 | public class DummyDoc { 7 | // Intentionally empty 8 | } 9 | -------------------------------------------------------------------------------- /openpdf-renderer/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /build/ 3 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/PDFErrorHandler.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer; 2 | 3 | /** 4 | * Simple class to handle exceptions - as default we just print the stack trace 5 | * but it's possible to inject another behaviour 6 | * @author xond 7 | * 8 | */ 9 | @Deprecated 10 | public class PDFErrorHandler { 11 | 12 | @Deprecated 13 | public void publishException(Throwable e){ 14 | // TODO: use a logging framework. 15 | //e.printStackTrace(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/PDFImageParseException.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer; 2 | 3 | import java.io.IOException; 4 | 5 | /** 6 | * an exception class for recording errors when parsing an PDFImage 7 | * @author Katja Sondermann 8 | */ 9 | public class PDFImageParseException extends IOException { 10 | public PDFImageParseException(String msg) { 11 | super(msg); 12 | } 13 | 14 | public PDFImageParseException(String msg, Throwable cause) { 15 | this(msg); 16 | initCause(cause); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/annotation/CircleAnnotation.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.annotation; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openpdf.renderer.PDFObject; 6 | 7 | /***************************************************************************** 8 | * PDF annotation for a circle 9 | * 10 | * @author Bernd Rosstauscher 11 | ****************************************************************************/ 12 | public class CircleAnnotation extends MarkupAnnotation { 13 | 14 | // TODO Not all of this is fully implemented yet. 15 | // But it will work if the visual representation is done via an "Appearance Stream" 16 | 17 | /************************************************************************* 18 | * Constructor 19 | * @param annotObject 20 | * @throws IOException 21 | ************************************************************************/ 22 | public CircleAnnotation(PDFObject annotObject) throws IOException { 23 | super(annotObject, AnnotationType.CIRCLE); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/annotation/FreetextAnnotation.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.annotation; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openpdf.renderer.PDFObject; 6 | 7 | /***************************************************************************** 8 | * PDF annotation describing a free text 9 | * Currently only supports the XObjects which can be found in the path AP->N 10 | * of the annotation object (same implementation as the stamp annotation) 11 | * @author Katja Sondermann 12 | * @since 28.03.2012 13 | ****************************************************************************/ 14 | public class FreetextAnnotation extends MarkupAnnotation { 15 | 16 | /************************************************************************* 17 | * Constructor 18 | * @param annotObject 19 | * @throws IOException 20 | ************************************************************************/ 21 | public FreetextAnnotation(PDFObject annotObject) throws IOException { 22 | super(annotObject, AnnotationType.FREETEXT); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/annotation/SquareAnnotation.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.annotation; 2 | 3 | import java.io.IOException; 4 | 5 | import org.openpdf.renderer.PDFObject; 6 | 7 | /***************************************************************************** 8 | * PDF annotation for a square 9 | * 10 | * @author Bernd Rosstauscher 11 | ****************************************************************************/ 12 | public class SquareAnnotation extends MarkupAnnotation { 13 | 14 | // TODO Not all of this is fully implemented yet. 15 | // But it will work if the visual representation is done via an "Appearance Stream" 16 | 17 | /************************************************************************* 18 | * Constructor 19 | * @param annotObject 20 | * @throws IOException 21 | ************************************************************************/ 22 | public SquareAnnotation(PDFObject annotObject) throws IOException { 23 | super(annotObject, AnnotationType.SQUARE); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Abs.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Abs implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1</i> <b>abs</b> <i>num2</i> <p> 9 | * 10 | * The type of the result is the same as the type of num1, 11 | * unless num1 is the smallest (most negative) integer, 12 | * in which case the result is a real number.<p> 13 | * 14 | * errors: stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push(Math.abs((Double)environment.pop())); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Add.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Add implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1 num2</i> <b>add</b> <i>sum</i> <p> 9 | * 10 | * If both operands are integers and the result is 11 | * within integer range, the result is an integer; 12 | * otherwise, the result is a real number.<p> 13 | * 14 | * errors: stackunderflow, typecheck, undefinedresult 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push((Double)environment.pop() + (Double)environment.pop()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/And.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class And implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>bool1|int1 bool2|int2</i> <b>and</b> <i>bool3|int3</i> <p> 9 | * 10 | * returns the logical conjunction of the operands 11 | * if they are boolean. If the operands are integers, 12 | * and returns the bitwise "and" of their binary 13 | * representations. <p> 14 | * 15 | * errors: stackunderflow, typecheck 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | environment.push((Long)environment.pop() & (Long)environment.pop()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Atan.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Atan implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num den</i> <b>atan</b> <i>angle</i> <p> 10 | * 11 | * returns the angle (in degress between 12 | * 0 and 360) whose tangent is num divided by den. 13 | * Either num or den may be 0, but not both. The signs 14 | * of num and den determine the quadrant in which the 15 | * result will lie: positive num yeilds a result in the 16 | * positive y plane, while a positive den yeilds a result in 17 | * the positive x plane. The result is a real number.<p> 18 | * 19 | * errors: stackunderflow, typecheck, undefinedresult 20 | */ 21 | public void eval(Stack<Object> environment) { 22 | double den = (Double)environment.pop(); 23 | double num = (Double)environment.pop(); 24 | if (den == 0.0) { 25 | environment.push(90.0); 26 | } else { 27 | environment.push(Math.toDegrees(Math.atan(num / den))); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Bitshift.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Bitshift implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>int1 <i>shift</i> <b>bitshift</b> <i>int2</i> <p> 9 | * 10 | * shifts the binary representation of int1 left by 11 | * shift bits and returns the result. Bits shifted out 12 | * are lost; bits shifted in are 0. If shift is negative, 13 | * a right shift by –shift bits is performed. 14 | * This PostScriptOperation produces an arithmetically correct 15 | * result only for positive values of int1. 16 | * Both int1 and shift must be integers. <p> 17 | * 18 | * errors: stackunderflow, typecheck 19 | */ 20 | public void eval(Stack<Object> environment) { 21 | long shift = (Long)environment.pop(); 22 | long int1 = (Long)environment.pop(); 23 | environment.push(int1 << shift); 24 | } 25 | } -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Ceiling.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Ceiling implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1</i> <b>ceiling</b> <i>num2</i> <p> 9 | * 10 | * returns the least integer value greater than or equal 11 | * to num1. The type of the result is the same as the type 12 | * of the operand. <p> 13 | * 14 | * errors: stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push(Math.ceil((Double)environment.pop())); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Cvr.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Cvr implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num</i> <b>cvr</b> <i>real</i> <u>or</u> <i>string</i> <b>cvr</b> <i>real</i> <p> 9 | * 10 | * (convert to real) takes an integer, real, or string 11 | * object and produces a real result. If the operand 12 | * is an integer, cvr converts it to a real number. 13 | * If the operand is a real number, cvr simply returns it. 14 | * If the operand is a string, cvr invokes the equivalent 15 | * of the token operator to interpret the characters of 16 | * the string as a number according to the PostScript 17 | * syntax rules. If that number is an integer, cvr converts 18 | * it to a real number. <p> 19 | * 20 | * errors: invalidaccess, limitcheck, stackunderflow, 21 | * syntaxerror, typecheck, undefinedresult 22 | */ 23 | public void eval(Stack<Object> environment) { 24 | // YOUR CODE IN THIS SPACE 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Div.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Div implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1 num2</i> <b>div</b> <i>quotient</i> <p> 9 | * 10 | * divides num1 by num2, producing a result that is 11 | * always a real number even if both operands are integers. 12 | * Use idiv instead if the operands are integers and an 13 | * integer result is desired. <p> 14 | * 15 | * errors: stackunderflow, typecheck, undefinedresult 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | double num2 = (Double)environment.pop(); 19 | double num1 = (Double)environment.pop(); 20 | environment.push(num1 / num2); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Dup.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Dup implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>any</i> <b>dup</b> <i>any any</i> <p> 9 | * 10 | * duplicates the top element on the operand stack. 11 | * dup copies only the object; the value of a composite 12 | * object is not copied but is shared. 13 | * See Section 3.3, "Data Types and Objects." <p> 14 | * 15 | * errors: stackoverflow, stackunderflow 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | Object obj = environment.pop(); 19 | environment.push(obj); 20 | environment.push(obj); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Exch.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Exch implements PostScriptOperation { 6 | @Override 7 | public void eval(Stack<Object> environment) { // <i>any1 any2</i> <b>exch</b> <i>any2 any1</i> - exchange top of stack 8 | Object any1 = environment.pop(); 9 | Object any2 = environment.pop(); 10 | environment.push(any1); 11 | environment.push(any2); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Exp.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Exp implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>base exponent</i> <b>exp</b> <i>real</i> <p> 9 | * 10 | * raises base to the exponent power. The operands may be 11 | * either integers or real numbers. If the exponent has a 12 | * fractional part, the result is meaningful only if the 13 | * base is nonnegative. The result is always a real number. <p> 14 | * 15 | * errors: stackunderflow, typecheck, undefinedresult 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | double exponent = (Double)environment.pop(); 19 | double base = (Double)environment.pop(); 20 | environment.push(Math.pow(exponent, base)); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Expression.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.LinkedList; 4 | 5 | 6 | 7 | public class Expression extends LinkedList<Object> { 8 | 9 | @Override 10 | public boolean equals(Object obj) { 11 | if (obj instanceof Expression) { 12 | // actually validate the list contents are the same expressions 13 | return true; 14 | } 15 | return false; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/False.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class False implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <b>false</b> <i>false</i> <p> 10 | * 11 | * pushes a boolean object whose value is false on the 12 | * operand stack. false is not an operator; it is a name in 13 | * systemdict associated with the boolean value false. <p> 14 | * 15 | * errors: stackoverflow 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | environment.push(false); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Floor.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Floor implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1</i> <b>floor</b> <i>num2</i> <p> 9 | * 10 | * returns the greatest integer value less than or equal 11 | * to num1. The type of the result is the same as the type 12 | * of the operand. <p> 13 | * 14 | * errors: stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push(Math.floor((Double)environment.pop())); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Ge.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Ge implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num1 num2</i> <b>ge</b> <i>bool</i> <p> 10 | * 11 | * pops two objects from the operand stack and pushes true 12 | * if the first operand is greater than or equal to the second, 13 | * or false otherwise. If both operands are numbers, 14 | * ge compares their mathematical values. If both operands 15 | * are strings, ge compares them element by element, treating 16 | * the elements as integers in the range 0 to 255, to determine 17 | * whether the first string is lexically greater than or equal 18 | * to the second. If the operands are of other types or one 19 | * is a string and the other is a number, a typecheck 20 | * error occurs. <p> 21 | * 22 | * errors: invalidaccess, stackunderflow, typecheck 23 | */ 24 | public void eval(Stack<Object> environment) { 25 | double num2 = (Double)environment.pop(); 26 | double num1 = (Double)environment.pop(); 27 | environment.push(num1 >= num2); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Gt.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Gt implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num1 num2</i> <b>gt</b> <i>bool</i> <p> 10 | * 11 | * pops two objects from the operand stack and pushes true 12 | * if the first operand is greater than the second, or 13 | * false otherwise. If both operands are numbers, gt compares 14 | * their mathematical values. If both operands are strings, 15 | * gt compares them element by element, treating the elements 16 | * as integers in the range 0 to 255, to determine whether 17 | * the first string is lexically greater than the second. 18 | * If the operands are of other types or one is a string 19 | * and the other is a number, a typecheck error occurs. <p> 20 | * 21 | * errors: invalidaccess, stackunderflow, typecheck 22 | */ 23 | public void eval(Stack<Object> environment) { 24 | double num2 = (Double)environment.pop(); 25 | double num1 = (Double)environment.pop(); 26 | environment.push(num1 > num2); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Idiv.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Idiv implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>int1 int2</i> <b>idiv</b> <i>quotient</i> <p> 9 | * 10 | * divides int1 by int2 and returns the integer part 11 | * of the quotient, with any fractional part discarded. 12 | * Both operands of idiv must be integers and the result 13 | * is an integer. <p> 14 | * 15 | * stackunderflow, typecheck, undefinedresult 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | long int2 = (Long)environment.pop(); 19 | long int1 = (Long)environment.pop(); 20 | environment.push(int1 / int2); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/If.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class If implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>bool {proc}</i> <b>if</b> - <p> 10 | * 11 | * removes both operands from the stack, then executes proc 12 | * if bool is true. The if operator pushes no results of 13 | * its own on the operand stack, but proc may do so (see 14 | * Section 3.5, "Execution"). <p> 15 | * 16 | * Examples <p> 17 | * 3 4 lt {(3 is less than 4)} if <p> 18 | * 19 | * errors: stackunderflow, typecheck 20 | */ 21 | public void eval(Stack<Object> environment) { 22 | if ((Boolean)environment.pop()) { 23 | environment.push(environment.pop()); 24 | } else { 25 | environment.pop(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/IfElse.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class IfElse implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>bool {expr1} {expr2}</i> <b>ifelse</b> - <p> 9 | * 10 | * removes all three operands from the stack, then 11 | * executes proc1 if bool is true or proc2 if bool is false. 12 | * The ifelse operator pushes no results of its own on the 13 | * operand stack, but the procedure it executes may do so 14 | * (see Section 3.5, "Execution"). <p> 15 | * 16 | * Examples <p> 17 | * 4 3 lt {(TruePart)} {(FalsePart)} ifelse <br> 18 | * results in FalsePart, since 4 is not less than 3 <p> 19 | * 20 | * errors: stackunderflow, typecheck 21 | */ 22 | public void eval(Stack<Object> environment) { 23 | // Pop boolean condition, discard it 24 | environment.pop(); 25 | // Pop result of true/false expression 26 | environment.pop(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Index.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Index implements PostScriptOperation { 6 | @Override 7 | public void eval(Stack<Object> environment) { // <i>anyn ... any0 n</i> <b>index</b> <i>anyn ... any0 anyn</i> 8 | long n = Math.round((Double)environment.pop()); 9 | environment.push(environment.get((int)(environment.size() - n - 1))); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Le.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Le implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1 num2</i> <b>le</b> <i>bool</i> <p> 9 | * 10 | * pops two objects from the operand stack and pushes true 11 | * if the first operand is less than or equal to the second, 12 | * or false otherwise. If both operands are numbers, le 13 | * compares their mathematical values. If both operands are 14 | * strings, le compares them element by element, treating 15 | * the elements as integers in the range 0 to 255, 16 | * to determine whether the first string is lexically less 17 | * than or equal to the second. If the operands are of other 18 | * types or one is a string and the other is a number, a 19 | * typecheck error occurs.<p> 20 | * 21 | * errors: invalidaccess, stackunderflow, typecheck 22 | */ 23 | public void eval(Stack<Object> environment) { 24 | double num2 = (Double)environment.pop(); 25 | double num1 = (Double)environment.pop(); 26 | environment.push(num1 <= num2); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Ln.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Ln implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num</i> <b>ln</b> <i>real</i> <p> 10 | * 11 | * returns the natural logarithm (base e) of num. 12 | * The result is a real number. <p> 13 | * 14 | * errors: rangecheck, stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push(Math.log((Double)environment.pop())); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Log.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Log implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num</i> <b>log</b> <i>real</i> <p> 10 | * 11 | * returns the common logarithm (base 10) of num. 12 | * The result is a real number. <p> 13 | * 14 | * errors: rangecheck, stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push(Math.log10((Double)environment.pop())); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Lt.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Lt implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1 num2</i> <b>lt</b> <i>bool</i> <p> 9 | * 10 | * pops two objects from the operand stack and pushes true 11 | * if the first operand is less than the second, or false 12 | * otherwise. If both operands are numbers, lt compares 13 | * their mathematical values. If both operands are strings, 14 | * lt compares them element by element, treating the elements 15 | * as integers in the range 0 to 255, to determine whether 16 | * the first string is lexically less than the second. 17 | * If the operands are of other types or one is a string 18 | * and the other is a number, a typecheck error occurs. <p> 19 | * 20 | * errors: invalidaccess, stackunderflow, typecheck 21 | */ 22 | public void eval(Stack<Object> environment) { 23 | double num2 = (Double)environment.pop(); 24 | double num1 = (Double)environment.pop(); 25 | environment.push(num1 < num2); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Mod.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Mod implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>int1 int2</i> <b>mod</b> <i>remainder</i> <p> 10 | * 11 | * returns the remainder that results from 12 | * dividing int1 by int2. The sign of the result 13 | * is the same as the sign of the dividend int1. 14 | * Both operands must be integers and the result 15 | * is an integer. <p> 16 | * 17 | * errors: stackunderflow, typecheck, undefinedresult 18 | */ 19 | public void eval(Stack<Object> environment) { 20 | long int2 = (Long)environment.pop(); 21 | long int1 = (Long)environment.pop(); 22 | environment.push(int1 % int2); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Mul.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Mul implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num1 num2</i> <b>mul</b> <i>product</i> <p> 10 | * 11 | * returns the product of num1 and num2. 12 | * If both operands are integers and the result 13 | * is within integer range, the result is an integer; 14 | * otherwise, the result is a real number. <p> 15 | * 16 | * errors: stackunderflow, typecheck, undefinedresult 17 | */ 18 | public void eval(Stack<Object> environment) { 19 | environment.push((Double)environment.pop() * (Double)environment.pop()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Ne.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Ne implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>any1 any2</i> <b>ne</b> <i>bool</i> <p> 10 | * 11 | * pops two objects from the operand stack and pushes false 12 | * if they are equal, or true if not. What it means for objects 13 | * to be equal is presented in the description of the 14 | * eq operator. <p> 15 | * 16 | * errors: invalidaccess, stackunderflow 17 | */ 18 | public void eval(Stack<Object> environment) { 19 | Object b = environment.pop(); 20 | Object a = environment.pop(); 21 | environment.push(!a.equals(b)); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Neg.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Neg implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num1</i> <b>neg</b> <i>num2</i> <p> 10 | * 11 | * returns the negative of num1. The type of the result 12 | * is the same as the type of num1 unless num1 is the 13 | * smallest (most negative) integer, in which case the 14 | * result is a real number. <p> 15 | * 16 | * errors: stackunderflow, typecheck 17 | */ 18 | public void eval(Stack<Object> environment) { 19 | environment.push(-(Double)environment.pop()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Not.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Not implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>bool1|int1</i> <b>not</b> <i>bool2|int2</i> <p> 10 | * 11 | * returns the logical negation of the operand if it is 12 | * boolean. If the operand is an integer, not returns the 13 | * bitwise complement (ones complement) of its binary 14 | * representation. <p> 15 | * 16 | * errors: stackunderflow, typecheck 17 | */ 18 | public void eval(Stack<Object> environment) { 19 | environment.push(~(Long)environment.pop()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Or.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Or implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>bool1|int1 bool2|int2</i> <b>or</b> <i>bool3|int3</i> <p> 10 | * 11 | * returns the logical disjunction of the operands if they 12 | * are boolean. If the operands are integers, or returns 13 | * the bitwise "inclusive or" of their binary representations. <p> 14 | * 15 | * errors: stackunderflow, typecheck 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | environment.push((Long)environment.pop() | (Long)environment.pop()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Pop.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Pop implements PostScriptOperation { 7 | @Override 8 | public void eval(Stack<Object> environment) { // discard top element 9 | environment.pop(); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/PostScriptOperation.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | public interface PostScriptOperation { 6 | 7 | /** 8 | * evaluate the function, popping the stack as needed and pushing results. 9 | */ 10 | public void eval(Stack<Object> environment); 11 | 12 | } 13 | 14 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/PushAsNumber.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | 7 | final class PushAsNumber implements PostScriptOperation { 8 | 9 | private String token; 10 | 11 | /************************************************************************* 12 | * Constructor 13 | * @param numberToken 14 | ************************************************************************/ 15 | 16 | public PushAsNumber(String numberToken) { 17 | super(); 18 | this.token = numberToken; 19 | } 20 | 21 | /************************************************************************* 22 | * eval 23 | * @see PostScriptOperation#eval(java.util.Stack) 24 | ************************************************************************/ 25 | @Override 26 | public void eval(Stack<Object> environment) { 27 | try { 28 | double number = Double.parseDouble(this.token); 29 | environment.push(number); 30 | } catch (NumberFormatException e) { 31 | throw new IllegalArgumentException("PS token is not supported "+this.token); 32 | } } 33 | 34 | } 35 | 36 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Round.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Round implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>num1</i> <b>round</b> <i>num2</i> <p> 9 | * 10 | * returns the integer value nearest to num1. 11 | * If num1 is equally close to its two nearest 12 | * integers, round returns the greater of the two. 13 | * The type of the result is the same as 14 | * the type of the operand. <p> 15 | * 16 | * errors: stackunderflow, typecheck 17 | */ 18 | public void eval(Stack<Object> environment) { 19 | environment.push(Math.round((Double)environment.pop())); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Sin.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Sin implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>angle</i> <b>sin</b> <i>real</i> <p> 10 | * 11 | * returns the sine of angle, which is interpreted as an 12 | * angle in degrees. The result is a real number. <p> 13 | * 14 | * errors: stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | double radians = Math.toRadians((Double)environment.pop()); 18 | environment.push(Math.toDegrees(Math.sin(radians))); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Sqrt.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Sqrt implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num</i> <b>sqrt</b> <i>real</i> <p> 10 | * 11 | * returns the square root of num, which must be a 12 | * nonnegative number. The result is a real number. <p> 13 | * 14 | * errors: rangecheck, stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push(Math.sqrt((Double)environment.pop())); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Sub.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Sub implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num1 num2</i> <b>sub</b> <i>difference</i> <p> 10 | * 11 | * returns the result of subtracting num2 from num1. 12 | * If both operands are integers and the result is within 13 | * integer range, the result is an integer; otherwise, 14 | * the result is a real number. <p> 15 | * 16 | * errors: stackunderflow, typecheck, undefinedresult 17 | */ 18 | public void eval(Stack<Object> environment) { 19 | double num2 = (Double)environment.pop(); 20 | double num1 = (Double)environment.pop(); 21 | environment.push(num1 - num2); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/True.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class True implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <b>true</b> <i>true</i> <p> 10 | * 11 | * pushes a boolean object whose value is true on the operand 12 | * stack. true is not an operator; it is a name in systemdict 13 | * associated with the boolean value true. <p> 14 | * 15 | * errors: stackoverflow 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | environment.push(true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Truncate.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | 6 | final class Truncate implements PostScriptOperation { 7 | @Override 8 | /** 9 | * <i>num1</i> <b>truncate</b> <i>num2</i> <p> 10 | * 11 | * truncates num1 toward 0 by removing its fractional part. 12 | * The type of the result is the same as the type of the 13 | * operand. <p> 14 | * 15 | * errors: stackunderflow, typecheck 16 | */ 17 | public void eval(Stack<Object> environment) { 18 | double num1 = (Double)environment.pop(); 19 | environment.push((((long) num1) - num1)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/function/postscript/operation/Xor.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.function.postscript.operation; 2 | 3 | import java.util.Stack; 4 | 5 | final class Xor implements PostScriptOperation { 6 | @Override 7 | /** 8 | * <i>bool1|int1 bool2|int2</i> <b>xor</b> <i>bool3|int3</i> <p> 9 | * 10 | * returns the logical "exclusive or" of the operands if they 11 | * are boolean. If the operands are integers, xor returns the 12 | * bitwise "exclusive or" of their binary representations. <p> 13 | * 14 | * errors: stackunderflow, typecheck 15 | */ 16 | public void eval(Stack<Object> environment) { 17 | environment.push((Long)environment.pop() ^ (Long)environment.pop()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/java/org/openpdf/renderer/pattern/DummyShader.java: -------------------------------------------------------------------------------- 1 | package org.openpdf.renderer.pattern; 2 | 3 | import java.awt.Color; 4 | import java.io.IOException; 5 | 6 | import org.openpdf.renderer.PDFObject; 7 | import org.openpdf.renderer.PDFPaint; 8 | 9 | public class DummyShader extends PDFShader { 10 | 11 | protected DummyShader(int type) { 12 | super(type); 13 | } 14 | 15 | @Override 16 | public void parse(PDFObject shareObj) throws IOException { 17 | 18 | } 19 | 20 | @Override 21 | public PDFPaint getPaint() { 22 | return PDFPaint.getPaint(Color.PINK); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/ch/randelshofer/media/jpeg/Generic_CMYK_Profile.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/ch/randelshofer/media/jpeg/Generic_CMYK_Profile.icc -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/d050000l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/d050000l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/glyphlist.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/glyphlist.txt -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n019003l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n019003l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n019004l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n019004l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n019023l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n019023l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n019024l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n019024l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n021003l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n021003l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n021004l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n021004l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n021023l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n021023l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n021024l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n021024l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n022003l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n022003l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n022004l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n022004l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n022023l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n022023l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/n022024l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/n022024l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/s050000l.pfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/s050000l.pfb -------------------------------------------------------------------------------- /openpdf-renderer/src/main/resources/sGray.icc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/main/resources/sGray.icc -------------------------------------------------------------------------------- /openpdf-renderer/src/test/java/openpdf/renderer/PdfRendererGui.java: -------------------------------------------------------------------------------- 1 | package openpdf.renderer; 2 | 3 | import javax.swing.JFrame; 4 | import java.io.File; 5 | import java.net.URL; 6 | 7 | /** 8 | * Render PDF file as a Swing GUI. 9 | */ 10 | public class PdfRendererGui { 11 | 12 | public static void main(String[] args) { 13 | int pageIndex = 1; 14 | 15 | // Load the PDF from classpath (src/test/resources) 16 | URL pdfUrl = PdfRendererGui.class.getClassLoader().getResource("HelloWorldMeta.pdf"); 17 | if (pdfUrl == null) { 18 | System.err.println("[PdfRendererGui] PDF not found in classpath: HelloWorldMeta.pdf"); 19 | return; 20 | } 21 | 22 | String fileName = new File(pdfUrl.getFile()).getAbsolutePath(); 23 | System.out.println("[PdfRendererGui] Loaded PDF: " + fileName); 24 | 25 | JFrame myFrame = new JFrame("Openpdf-renderer"); 26 | myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // ← Important! 27 | PDFDisplay pdfDisplay = new PDFDisplay(fileName, pageIndex); 28 | myFrame.add(pdfDisplay); 29 | myFrame.setSize(700, 1000); 30 | myFrame.setVisible(true); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /openpdf-renderer/src/test/resources/HelloWorldMeta.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf-renderer/src/test/resources/HelloWorldMeta.pdf -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/TableRectangle.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text; 2 | 3 | public class TableRectangle extends Rectangle { 4 | 5 | public TableRectangle(float llx, float lly, float urx, float ury) { 6 | super(llx, lly, urx, ury); 7 | } 8 | 9 | public TableRectangle(float urx, float ury) { 10 | super(urx, ury); 11 | } 12 | 13 | public TableRectangle(float llx, float lly, float urx, float ury, int rotation) { 14 | super(llx, lly, urx, ury, rotation); 15 | } 16 | 17 | public TableRectangle(float urx, float ury, int rotation) { 18 | super(urx, ury, rotation); 19 | } 20 | 21 | public TableRectangle(Rectangle rect) { 22 | super(rect); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/alignment/WithHorizontalAlignment.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.alignment; 2 | 3 | /** 4 | * Marks objects that can be aligned horizontally. 5 | * 6 | * @author noavarice 7 | * @since 1.2.7 8 | */ 9 | public interface WithHorizontalAlignment { 10 | 11 | /** 12 | * Sets horizontal alignment mode. 13 | * 14 | * @param alignment New alignment mode. If null, current alignment must be left unchanged 15 | */ 16 | void setHorizontalAlignment(final HorizontalAlignment alignment); 17 | } 18 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/alignment/WithVerticalAlignment.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.alignment; 2 | 3 | /** 4 | * Marks objects that can be aligned vertically. 5 | * 6 | * @author noavarice 7 | * @since 1.2.7 8 | */ 9 | public interface WithVerticalAlignment { 10 | 11 | /** 12 | * Sets vertical alignment mode. 13 | * 14 | * @param alignment New alignment mode. If null, current alignment must be left unchanged 15 | */ 16 | void setVerticalAlignment(final VerticalAlignment alignment); 17 | } 18 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/html/package-info.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.html; 2 | 3 | 4 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/html/simpleparser/package-info.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.html.simpleparser; 2 | 3 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/BarcodeDimensions.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | public class BarcodeDimensions { 4 | 5 | private int height; 6 | private int width; 7 | private int border; 8 | 9 | public int getHeight() { 10 | return height; 11 | } 12 | 13 | public void setHeight(int height) { 14 | this.height = height; 15 | } 16 | 17 | public int getWidth() { 18 | return width; 19 | } 20 | 21 | public void setWidth(int width) { 22 | this.width = width; 23 | } 24 | 25 | public int getBorder() { 26 | return border; 27 | } 28 | 29 | public void setBorder(int border) { 30 | this.border = border; 31 | } 32 | 33 | public BarcodeDimensions(int width, int height, int border) { 34 | this.width = width; 35 | this.height = height; 36 | this.border = border; 37 | } 38 | 39 | public BarcodeDimensions() { 40 | this(0, 0, 0); 41 | } 42 | 43 | 44 | } -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/FieldReader.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * Represents the basic needs for reading fields. 8 | */ 9 | public interface FieldReader { 10 | 11 | Map<String, String> getAllFields(); 12 | 13 | String getFieldValue(String fieldKey); 14 | 15 | List<String> getListValues(String fieldKey); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/PdfSignatureBuildProperties.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | /** 4 | * The build data dictionary contains information from the signature handler or software module that was used to create 5 | * the signature. Not all entries are relevant for all entries in the build properties dictionary. 6 | * <p> 7 | * (Referenced from the "Digital Signature Build Dictionary Specification") 8 | * 9 | * @author Lonzak 10 | */ 11 | public class PdfSignatureBuildProperties extends PdfDictionary { 12 | 13 | public PdfSignatureBuildProperties() { 14 | super(); 15 | } 16 | 17 | /** 18 | * Returns the {@link PdfSignatureAppDataDict} from this dictionary. If it doesn't exist, a new 19 | * {@link PdfSignatureAppDataDict} is added. 20 | * 21 | * @return {@link PdfSignatureAppDataDict} 22 | */ 23 | public PdfSignatureAppDataDict getPdfSignatureAppProperty() { 24 | PdfSignatureAppDataDict appPropDic = (PdfSignatureAppDataDict) getAsDict(PdfName.APP); 25 | if (appPropDic == null) { 26 | appPropDic = new PdfSignatureAppDataDict(); 27 | put(PdfName.APP, appPropDic); 28 | } 29 | return appPropDic; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/StrictWordWrapException.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | /** 4 | * Exception thrown when strict word wrapping is enabled and text cannot fit 5 | * within the specified column width without being forced to break mid-word. 6 | */ 7 | public class StrictWordWrapException extends RuntimeException { 8 | 9 | /** 10 | * Constructs a new StrictWordWrapException with the specified detail message. 11 | * 12 | * @param message the detail message 13 | */ 14 | public StrictWordWrapException(String message) { 15 | super(message); 16 | } 17 | 18 | /** 19 | * Constructs a new StrictWordWrapException with the specified detail message and cause. 20 | * 21 | * @param message the detail message 22 | * @param cause the cause of the exception 23 | */ 24 | public StrictWordWrapException(String message, Throwable cause) { 25 | super(message, cause); 26 | } 27 | } -------------------------------------------------------------------------------- /openpdf/src/main/java/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 | /** 9 | * Creates a Collection Schema dictionary. 10 | */ 11 | public PdfCollectionSchema() { 12 | super(PdfName.COLLECTIONSCHEMA); 13 | } 14 | 15 | /** 16 | * Adds a Collection field to the Schema. 17 | * 18 | * @param name the name of the collection field 19 | * @param field a Collection Field 20 | */ 21 | public void addField(String name, PdfCollectionField field) { 22 | put(new PdfName(name), field); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/fonts/cjkencodings.properties: -------------------------------------------------------------------------------- 1 | # CJK encodings 2 | UniJIS-UCS2-H=UniJIS-UCS2-H 3 | UniJIS-UCS2-V=UniJIS-UCS2-H UniJIS-UCS2-V 4 | UniJIS-UCS2-HW-H=UniJIS-UCS2-H UniJIS-UCS2-HW-H 5 | UniJIS-UCS2-HW-V=UniJIS-UCS2-H UniJIS-UCS2-HW-V 6 | UniGB-UCS2-H=UniGB-UCS2-H 7 | UniGB-UCS2-V=UniGB-UCS2-H UniGB-UCS2-V 8 | UniCNS-UCS2-H=UniCNS-UCS2-H 9 | UniCNS-UCS2-V=UniCNS-UCS2-H UniCNS-UCS2-V 10 | UniKS-UCS2-H=UniKS-UCS2-H 11 | UniKS-UCS2-V=UniKS-UCS2-H UniKS-UCS2-V 12 | 13 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/hyphenation/HyphenationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2004 The Apache Software Foundation. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.lowagie.text.pdf.hyphenation; 18 | 19 | /** 20 | * @author <a href="cav@uniscope.co.jp">Carlos Villegas</a> 21 | */ 22 | public class HyphenationException extends Exception { 23 | 24 | private static final long serialVersionUID = 4721513606846982325L; 25 | 26 | public HyphenationException(String msg) { 27 | super(msg); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/pdf/parser/package-info.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf.parser; 2 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/utils/SystemPropertyUtil.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.utils; 2 | 3 | public class SystemPropertyUtil { 4 | 5 | /** 6 | * Similar to {@link Boolean#getBoolean(String)} but uses the given default value if property were not set. 7 | * 8 | * @param propertyKey the system property key 9 | * @param defaultValue the default value to use if property is not defined. 10 | * @return true if the property is defined and contains "true" (ignoring case), else if system property is not set 11 | * then the provided defaultValue, else false. 12 | */ 13 | public static boolean getBoolean(String propertyKey, boolean defaultValue) { 14 | String propertyValue = System.getProperty(propertyKey); 15 | if (propertyValue == null) { 16 | return defaultValue; 17 | } 18 | 19 | return Boolean.parseBoolean(propertyValue); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /openpdf/src/main/java/com/lowagie/text/utils/package-info.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.utils; 2 | 3 | -------------------------------------------------------------------------------- /openpdf/src/main/resources-filtered/com/lowagie/text/version.properties: -------------------------------------------------------------------------------- 1 | bundleVersion=${project.version} 2 | -------------------------------------------------------------------------------- /openpdf/src/main/resources/META-INF/LICENSES.md: -------------------------------------------------------------------------------- 1 | # Licenses 2 | 3 | ## Licenses of OpenPDF 4 | 5 | OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 6 | or GNU Lesser General Public License 2.1. 7 | 8 | The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` 9 | 10 | ### Mozilla Public License Version 2.0 11 | 12 | Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file 13 | [MPL-2.0.txt](MPL-2.0.txt). 14 | 15 | ### GNU Lesser General Public License 2.1 16 | 17 | Please see https://www.gnu.org/licenses/old-licenses/lgpl-2.1 or the attached file 18 | [LGPL-2.1.md](LGPL-2.1.md). 19 | 20 | #### Apache License, Version 2.0 21 | 22 | Some files use code from different Apache projects. The source code of these files contains the appropriate copyright 23 | notices as described in the Appendix of `http://www.apache.org/licenses/LICENSE-2.0`. 24 | 25 | Please see https://www.apache.org/licenses/LICENSE-2.0 or the attached file 26 | [APACHE-LICENSE-2.0.txt](APACHE-LICENSE-2.0.txt). 27 | 28 | -------------------------------------------------------------------------------- /openpdf/src/main/resources/META-INF/misc_licenses.txt: -------------------------------------------------------------------------------- 1 | 2 | (1) 3 | 4 | SimpleXMLParser: 5 | The original version of this class was published in a JavaWorld article by Steven Brandt: 6 | http://www.javaworld.com/javaworld/javatips/jw-javatip128.html 7 | Jennifer Orr (JavaWorld) wrote: "You have permission to use the code appearing in 8 | Steven Brandt's JavaWorld article, 'Java Tip 128: Create a quick-and-dirty XML parser.' 9 | We ask that you reference the author as the creator and JavaWorld as the original publisher 10 | of the code." Steven Brandt also agreed with the use of this class. 11 | -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/error_messages/pt.lng: -------------------------------------------------------------------------------- 1 | # Portuguese - Portugal 2 | 1.at.file.pointer.2={1} na posição de ficheiro {2} 3 | error.reading.string=Erro na leitura de string. 4 | fdf.header.not.found=Início de FDF não encontrado. 5 | greaterthan.not.expected='>' inesperado 6 | pdf.header.not.found=Início de PDF não encontrado. 7 | pdf.startxref.not.found=startxref de PDF não encontrado. 8 | unable.to.add.self.to.table.contents=Não é possível adicionar a si mesmo ao conteúdo da tabela. 9 | xref.infinite.loop=Um loop infinito foi detectado na tabela xref. 10 | -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-CNS1-UCS2.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-CNS1-UCS2.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-GB1-UCS2.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-GB1-UCS2.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-Japan1-UCS2.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-Japan1-UCS2.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-Korea1-UCS2.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/Adobe-Korea1-UCS2.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniCNS-UCS2-H.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniCNS-UCS2-H.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniCNS-UCS2-V.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniCNS-UCS2-V.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniGB-UCS2-H.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniGB-UCS2-H.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-H.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-H.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-HW-H.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-HW-H.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-HW-V.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-HW-V.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-V.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniJIS-UCS2-V.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniKS-UCS2-H.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniKS-UCS2-H.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniKS-UCS2-V.cmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/com/lowagie/text/pdf/fonts/UniKS-UCS2-V.cmap -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/cjkencodings.properties: -------------------------------------------------------------------------------- 1 | # CJK encodings 2 | UniJIS-UCS2-H=UniJIS-UCS2-H 3 | UniJIS-UCS2-V=UniJIS-UCS2-H UniJIS-UCS2-V 4 | UniJIS-UCS2-HW-H=UniJIS-UCS2-H UniJIS-UCS2-HW-H 5 | UniJIS-UCS2-HW-V=UniJIS-UCS2-H UniJIS-UCS2-HW-V 6 | UniGB-UCS2-H=UniGB-UCS2-H 7 | UniGB-UCS2-V=UniGB-UCS2-H UniGB-UCS2-V 8 | UniCNS-UCS2-H=UniCNS-UCS2-H 9 | UniCNS-UCS2-V=UniCNS-UCS2-H UniCNS-UCS2-V 10 | UniKS-UCS2-H=UniKS-UCS2-H 11 | UniKS-UCS2-V=UniKS-UCS2-H UniKS-UCS2-V 12 | 13 | -------------------------------------------------------------------------------- /openpdf/src/main/resources/com/lowagie/text/pdf/fonts/cjkfonts.properties: -------------------------------------------------------------------------------- 1 | # Supported CJK fonts and encodings 2 | HeiseiMin-W3=Adobe-Japan1-UCS2_UniJIS-UCS2-H_UniJIS-UCS2-V_UniJIS-UCS2-HW-H_UniJIS-UCS2-HW-V_ 3 | HeiseiKakuGo-W5=Adobe-Japan1-UCS2_UniJIS-UCS2-H_UniJIS-UCS2-V_UniJIS-UCS2-HW-H_UniJIS-UCS2-HW-V_ 4 | KozMinPro-Regular=Adobe-Japan1-UCS2_UniJIS-UCS2-H_UniJIS-UCS2-V_UniJIS-UCS2-HW-H_UniJIS-UCS2-HW-V_ 5 | STSong-Light=Adobe-GB1-UCS2_UniGB-UCS2-H_UniGB-UCS2-V_ 6 | STSongStd-Light=Adobe-GB1-UCS2_UniGB-UCS2-H_UniGB-UCS2-V_ 7 | MHei-Medium=Adobe-CNS1-UCS2_UniCNS-UCS2-H_UniCNS-UCS2-V_ 8 | MSung-Light=Adobe-CNS1-UCS2_UniCNS-UCS2-H_UniCNS-UCS2-V_ 9 | MSungStd-Light=Adobe-CNS1-UCS2_UniCNS-UCS2-H_UniCNS-UCS2-V_ 10 | HYGoThic-Medium=Adobe-Korea1-UCS2_UniKS-UCS2-H_UniKS-UCS2-V_ 11 | HYSMyeongJo-Medium=Adobe-Korea1-UCS2_UniKS-UCS2-H_UniKS-UCS2-V_ 12 | HYSMyeongJoStd-Medium=Adobe-Korea1-UCS2_UniKS-UCS2-H_UniKS-UCS2-V_ 13 | 14 | -------------------------------------------------------------------------------- /openpdf/src/main/resources/font-fallback/LiberationSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/main/resources/font-fallback/LiberationSans-Regular.ttf -------------------------------------------------------------------------------- /openpdf/src/main/resources/font-fallback/README.md: -------------------------------------------------------------------------------- 1 | # Notice 2 | 3 | This is only a fallback font for existing OpenPDF code. For using the full set of Liberation Fonts, 4 | please add the openpdf-fonts-extra dependency to you project and use the class 5 | `org.librepdf.openpdf.fonts.Liberation`. 6 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/ParagraphTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | class ParagraphTest { 8 | 9 | @Test 10 | void testParagraphInParagraphAlign() { 11 | // given 12 | Paragraph outer = new Paragraph("Outer\n"); 13 | outer.setAlignment(Element.ALIGN_LEFT); 14 | Paragraph inner = new Paragraph("Inner"); 15 | inner.setAlignment(Element.ALIGN_RIGHT); 16 | // when 17 | outer.add(inner); 18 | // then 19 | assertThat(outer.alignment).isEqualTo(Element.ALIGN_LEFT); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/PhraseTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import java.util.ArrayList; 6 | import org.junit.jupiter.api.Test; 7 | 8 | class PhraseTest { 9 | 10 | @Test 11 | void setFontAfterContentAdded() { 12 | // given 13 | Font times = StandardFonts.TIMES.create(); 14 | Font helvetica = new Font(Font.HELVETICA); 15 | Phrase phrase = new Phrase("Hello ", times); 16 | // when 17 | phrase.setFont(helvetica); 18 | phrase.add("World"); 19 | // then 20 | ArrayList<Element> chunks = phrase.getChunks(); 21 | assertThat(chunks).hasSize(2); 22 | assertThat(chunks.get(0)) 23 | .isInstanceOf(Chunk.class) 24 | .extracting("font").isEqualTo(times); 25 | assertThat(chunks.get(1)) 26 | .isInstanceOf(Chunk.class) 27 | .extracting("font").isEqualTo(helvetica); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/error_messages/MessageLocalizationTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.error_messages; 2 | 3 | import java.io.IOException; 4 | import java.util.stream.Stream; 5 | import org.assertj.core.api.Assertions; 6 | import org.junit.jupiter.api.BeforeAll; 7 | import org.junit.jupiter.params.ParameterizedTest; 8 | import org.junit.jupiter.params.provider.MethodSource; 9 | 10 | class MessageLocalizationTest { 11 | 12 | private static Stream<String> messageKeyProvider() { 13 | return MessageLocalization.getAllKeys().stream(); 14 | } 15 | 16 | @BeforeAll 17 | static void beforeAll() throws IOException { 18 | MessageLocalization.setLanguage("en", null); 19 | } 20 | 21 | @ParameterizedTest 22 | @MethodSource("messageKeyProvider") 23 | void messageHasAllParameterSubstituted(String key) { 24 | final String message = MessageLocalization 25 | .getComposedMessage(key, "P1", "P2", "P3", "P4"); 26 | Assertions.assertThat(message) 27 | .as("Message for key: {}", key) 28 | .doesNotContain("{1}", "{2}", "{3}", "{4}"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/factories/GreekAlphabetFactoryTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.factories; 2 | 3 | import static com.lowagie.text.factories.GreekAlphabetFactory.getString; 4 | import static org.junit.jupiter.api.Assertions.assertNotNull; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | class GreekAlphabetFactoryTest { 9 | 10 | @Test 11 | void shouldGetGreekString() { 12 | for (int i = 1; i < 1000; i++) { 13 | assertNotNull(getString(i)); 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/factories/RomanAlphabetFactoryTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.factories; 2 | 3 | import static com.lowagie.text.factories.RomanAlphabetFactory.getString; 4 | import static org.junit.jupiter.api.Assertions.assertNotNull; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | class RomanAlphabetFactoryTest { 9 | 10 | @Test 11 | void shouldGetRomanString() { 12 | for (int i = 1; i < 32000; i++) { 13 | assertNotNull(getString(i)); 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/html/simpleparser/FactoryPropertiesTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.html.simpleparser; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | import org.assertj.core.api.Assertions; 6 | import org.junit.jupiter.api.Test; 7 | 8 | /** 9 | * @author Serhiy Yakovyn 10 | */ 11 | class FactoryPropertiesTest { 12 | 13 | @Test 14 | void shouldCreateRelativeLeadingForLineHeightNUmber() { 15 | // given 16 | final Map<String, String> h = new HashMap<>(); 17 | final String style = "line-height:1.4"; 18 | h.put("style", style); 19 | final ChainedProperties cprops = new ChainedProperties(); 20 | // when 21 | FactoryProperties.insertStyle(h, cprops); 22 | // then 23 | Assertions.assertThat(h.get("leading")).isEqualTo("0,1.4"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/DocumentProducerHelper.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import com.lowagie.text.Document; 4 | import com.lowagie.text.PageSize; 5 | import com.lowagie.text.Paragraph; 6 | import java.io.ByteArrayOutputStream; 7 | 8 | public class DocumentProducerHelper { 9 | 10 | public static byte[] createHelloWorldDocumentBytes() { 11 | Document document = new Document(PageSize.A4); 12 | ByteArrayOutputStream stream = new ByteArrayOutputStream(); 13 | PdfWriter.getInstance(document, stream); 14 | document.open(); 15 | document.add(new Paragraph("Hello World")); 16 | document.close(); 17 | return stream.toByteArray(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/LayoutProcessorTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | import static org.junit.jupiter.api.Assertions.assertFalse; 5 | import static org.junit.jupiter.api.Assertions.assertTrue; 6 | 7 | import org.junit.jupiter.api.Test; 8 | 9 | class LayoutProcessorTest { 10 | 11 | @Test 12 | void testEnableDisable() { 13 | LayoutProcessor.enable(); 14 | assertTrue(LayoutProcessor.isEnabled()); 15 | LayoutProcessor.disable(); 16 | assertFalse(LayoutProcessor.isEnabled()); 17 | assertThat(LayoutProcessor.getFlags()).isEqualTo(-1); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/PRAcroFormTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static java.time.Duration.ofMillis; 4 | import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively; 5 | 6 | import java.io.InputStream; 7 | import org.junit.jupiter.api.Test; 8 | 9 | public class PRAcroFormTest { 10 | 11 | @Test 12 | public void infiniteLoopTest() throws Exception { 13 | try (InputStream is = PRAcroFormTest.class.getResourceAsStream("/pades_opposite_infinite_loop.pdf"); 14 | PdfReader reader = new PdfReader(is)) { 15 | assertTimeoutPreemptively(ofMillis(500), () -> { 16 | reader.getAcroForm(); 17 | }); 18 | } 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/PdfNameTreeTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import java.util.Arrays; 6 | import java.util.HashMap; 7 | import org.junit.jupiter.api.Test; 8 | 9 | class PdfNameTreeTest { 10 | 11 | @Test 12 | void shouldReadTree() { 13 | 14 | PdfDictionary pdfDictionary = new PdfDictionary(PdfName.PDF); 15 | final PdfBoolean pdfBoolean = new PdfBoolean(true); 16 | final String keyName = "test"; 17 | pdfDictionary.put(PdfName.NAMES, new PdfArray(Arrays.asList(new PdfString(keyName), pdfBoolean))); 18 | 19 | final HashMap<String, PdfObject> tree = PdfNameTree.readTree(pdfDictionary); 20 | assertEquals(1, tree.size()); 21 | assertEquals(pdfBoolean, tree.get(keyName)); 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/PdfPTableTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static org.assertj.core.api.Assertions.assertThatThrownBy; 4 | 5 | import com.lowagie.text.DocumentException; 6 | import com.lowagie.text.error_messages.MessageLocalization; 7 | import java.io.IOException; 8 | import org.junit.jupiter.api.Test; 9 | 10 | class PdfPTableTest { 11 | 12 | @Test 13 | void whenAddCellWithSelf_shouldThrowException() { 14 | PdfPTable table = new PdfPTable(1); 15 | assertThatThrownBy(() -> table.addCell(table)) 16 | .isInstanceOf(DocumentException.class) 17 | .hasMessage("Unable to add self to table contents."); 18 | } 19 | 20 | @Test 21 | void whenAddCellWithSelf_shouldThrowException_pt() throws IOException { 22 | MessageLocalization.setLanguage("pt", null); 23 | PdfPTable table = new PdfPTable(1); 24 | assertThatThrownBy(() -> table.addCell(table)) 25 | .isInstanceOf(DocumentException.class) 26 | .hasMessage("Não é possível adicionar a si mesmo ao conteúdo da tabela."); 27 | MessageLocalization.setLanguage("en", null); 28 | } 29 | 30 | 31 | } -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/PdfPrinterGraphics2DTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static org.junit.jupiter.api.Assertions.assertEquals; 4 | 5 | import com.lowagie.text.Document; 6 | import java.awt.Graphics; 7 | import java.awt.Graphics2D; 8 | import java.awt.print.PrinterJob; 9 | import java.io.ByteArrayOutputStream; 10 | import org.junit.jupiter.api.Test; 11 | 12 | class PdfPrinterGraphics2DTest { 13 | 14 | @Test 15 | void testCreate() { 16 | try (Document document = new Document()) { 17 | PdfWriter writer = PdfWriter.getInstance(document, new ByteArrayOutputStream()); 18 | document.open(); 19 | Graphics2D graphics1 = writer.getDirectContent().createPrinterGraphics(10, 10, PrinterJob.getPrinterJob()); 20 | Graphics graphics2 = graphics1.create(); 21 | assertEquals(PdfPrinterGraphics2D.class, graphics1.getClass()); 22 | assertEquals(PdfPrinterGraphics2D.class, graphics2.getClass()); 23 | graphics2.dispose(); 24 | graphics1.dispose(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/PdfTestBaseTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import com.lowagie.text.Document; 4 | import com.lowagie.text.DocumentException; 5 | import com.lowagie.text.Paragraph; 6 | import java.io.ByteArrayOutputStream; 7 | import org.junit.jupiter.api.Assertions; 8 | import org.junit.jupiter.api.Test; 9 | 10 | public class PdfTestBaseTest { 11 | 12 | @Test 13 | void testCreatePdfStream() throws DocumentException { 14 | ByteArrayOutputStream stream = new ByteArrayOutputStream(); 15 | Document pdf = null; 16 | try { 17 | pdf = PdfTestBase.createPdf(stream); 18 | pdf.open(); 19 | pdf.newPage(); 20 | pdf.add(new Paragraph("Hello World!")); 21 | } finally { 22 | // close document 23 | if (pdf != null) { 24 | pdf.close(); 25 | } 26 | } 27 | final byte[] bytes = stream.toByteArray(); 28 | Assertions.assertNotNull(bytes, "There should be some PDF-bytes there."); 29 | String header = new String(bytes, 0, 5); 30 | Assertions.assertEquals(header, "%PDF-", "This is no PDF."); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/ProcSetTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import com.lowagie.text.Chunk; 4 | import com.lowagie.text.Document; 5 | import java.io.IOException; 6 | import org.apache.commons.io.output.ByteArrayOutputStream; 7 | import org.junit.jupiter.api.Assertions; 8 | import org.junit.jupiter.api.Test; 9 | 10 | public class ProcSetTest { 11 | 12 | @Test 13 | public void procSetTest1() throws IOException { 14 | ByteArrayOutputStream stream = new ByteArrayOutputStream(); 15 | Document document = new Document(); 16 | PdfWriter.getInstance(document, stream); 17 | document.open(); 18 | document.add(Chunk.NEWLINE); 19 | document.close(); 20 | PdfReader reader = new PdfReader(stream.toByteArray()); 21 | Assertions.assertNull(reader.getPageN(1).getAsDict(PdfName.RESOURCES).get(PdfName.PROCSET)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/TabTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import com.lowagie.text.Chunk; 4 | import com.lowagie.text.Document; 5 | import com.lowagie.text.PageSize; 6 | import com.lowagie.text.pdf.parser.PdfTextExtractor; 7 | import java.io.ByteArrayOutputStream; 8 | import java.io.IOException; 9 | import org.junit.jupiter.api.Assertions; 10 | import org.junit.jupiter.api.Test; 11 | 12 | class TabTest { 13 | 14 | @Test 15 | void TabTest1() throws IOException { 16 | ByteArrayOutputStream stream = new ByteArrayOutputStream(); 17 | String stringWithTab = "data\ttable"; 18 | try (Document document 19 | = new Document(PageSize.A4.rotate(), 10, 10, 10, 10)) { 20 | Document.compress = false; 21 | PdfWriter.getInstance(document, stream); 22 | document.open(); 23 | Chunk a = new Chunk(stringWithTab); 24 | document.add(a); 25 | } 26 | PdfReader rd = new PdfReader(stream.toByteArray()); 27 | PdfTextExtractor pdfTextExtractor = new PdfTextExtractor(rd); 28 | Assertions.assertEquals(stringWithTab, pdfTextExtractor.getTextFromPage(1)); 29 | Document.compress = true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/TrueTypeFontTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | class TrueTypeFontTest { 8 | 9 | @Test 10 | void testTrueTypeFontDefaultConstructor() { 11 | TrueTypeFont font = new TrueTypeFont(); 12 | assertThat(font).isNotNull(); 13 | } 14 | 15 | @Test 16 | void testGetTtcNameNoTtc() { 17 | assertThat(TrueTypeFont.getTTCName("font.ttf")).isEqualTo("font.ttf"); 18 | } 19 | 20 | @Test 21 | void testGetTtcName() { 22 | assertThat(TrueTypeFont.getTTCName("font.ttc,123456")).isEqualTo("font.ttc"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/TrueTypeFontUnicodeTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf; 2 | 3 | import static org.assertj.core.api.Assertions.assertThatThrownBy; 4 | 5 | import com.lowagie.text.DocumentException; 6 | import org.junit.jupiter.api.Test; 7 | 8 | class TrueTypeFontUnicodeTest { 9 | 10 | // Test that an Exception will be thrown when the font is not a TTF 11 | @Test 12 | void test() { 13 | assertThatThrownBy( 14 | () -> new TrueTypeFontUnicode("notReallyAFont", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, null, true)) 15 | .isInstanceOf(DocumentException.class) 16 | .hasMessage("notReallyAFont is not a TTF font file."); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /openpdf/src/test/java/com/lowagie/text/pdf/encryption/StandardDecryptionTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.text.pdf.encryption; 2 | 3 | import com.lowagie.text.pdf.PdfEncryption; 4 | import com.lowagie.text.pdf.PdfWriter; 5 | import org.junit.jupiter.api.Assertions; 6 | import org.junit.jupiter.api.Test; 7 | 8 | public class StandardDecryptionTest { 9 | 10 | @Test 11 | public void testAESDecryptionOnEmptyArray() { 12 | // setup AES 128 encryption 13 | PdfEncryption decrypt = new PdfEncryption(); 14 | decrypt.setCryptoMode(PdfWriter.ENCRYPTION_AES_128, 0); 15 | byte[] key = new byte[16]; // create fake key, it does not matter for this test 16 | decrypt.setupByEncryptionKey(key, 128); 17 | decrypt.setHashKey(0, 0); 18 | 19 | // try to decrypt an empty array - expected no NPE 20 | byte[] result = decrypt.decryptByteArray(new byte[]{}); 21 | 22 | // verify empty array returned 23 | Assertions.assertNotNull(result); 24 | Assertions.assertEquals(result.length, 0); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /openpdf/src/test/resources/EmptyPage.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/EmptyPage.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/GitHub-Mark-32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/GitHub-Mark-32px.png -------------------------------------------------------------------------------- /openpdf/src/test/resources/H.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/H.gif -------------------------------------------------------------------------------- /openpdf/src/test/resources/HelloWorldMeta.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/HelloWorldMeta.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/OutlineUriActionWithNoTitle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/OutlineUriActionWithNoTitle.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/SimulatedBoldAndStrokeWidth.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/SimulatedBoldAndStrokeWidth.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/barcode_macro_pdf_417.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/barcode_macro_pdf_417.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/encodingTest.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/encodingTest.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/NotoSansThaiLooped/NotoSansThaiLooped-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/NotoSansThaiLooped/NotoSansThaiLooped-Regular.ttf -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/Viaoda_Libre/ViaodaLibre-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/Viaoda_Libre/ViaodaLibre-Regular.ttf -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/font-awesome/fa-v4compatibility.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/font-awesome/fa-v4compatibility.ttf -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.eot -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.otf -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.woff -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Bold.woff2 -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Regular.eot -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Regular.woff -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/jaldi/Jaldi-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/jaldi/Jaldi-Regular.woff2 -------------------------------------------------------------------------------- /openpdf/src/test/resources/fonts/liberation/LiberationSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/fonts/liberation/LiberationSerif-Regular.ttf -------------------------------------------------------------------------------- /openpdf/src/test/resources/gradient.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/gradient.tiff -------------------------------------------------------------------------------- /openpdf/src/test/resources/identity-h.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/identity-h.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/imageTest/ImageTest.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/imageTest/ImageTest.gif -------------------------------------------------------------------------------- /openpdf/src/test/resources/imageTest/ImageTest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/imageTest/ImageTest.jpg -------------------------------------------------------------------------------- /openpdf/src/test/resources/imageTest/ImageTest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/imageTest/ImageTest.png -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue1298/lzw-cmap-table-encoded.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue1298/lzw-cmap-table-encoded.bin -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue1298/lzw-ps-function-1-encoded.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue1298/lzw-ps-function-1-encoded.bin -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue1298/lzw-ps-function-2-decoded.txt: -------------------------------------------------------------------------------- 1 | { 2 | 1.0 3 index 0.000000 mul 1.0 exch sub mul 2 index 0.000000 mul 1.0 exch sub mul 1 index 0.000000 mul 1.0 exch sub mul 1.0 exch sub 4 1 roll 3 | 1.0 3 index 1.000000 mul 1.0 exch sub mul 2 index 0.000000 mul 1.0 exch sub mul 1 index 1.000000 mul 1.0 exch sub mul 1.0 exch sub 4 1 roll 4 | 1.0 3 index 0.000000 mul 1.0 exch sub mul 2 index 1.000000 mul 1.0 exch sub mul 1 index 0.000000 mul 1.0 exch sub mul 1.0 exch sub 4 1 roll 5 | 1.0 3 index 0.000000 mul 1.0 exch sub mul 2 index 0.000000 mul 1.0 exch sub mul 1 index 0.000000 mul 1.0 exch sub mul 1.0 exch sub 4 1 roll 6 | pop 7 | pop 8 | pop 9 | } -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue1298/lzw-ps-function-2-encoded.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue1298/lzw-ps-function-2-encoded.bin -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/Demo1_encrypted_.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/Demo1_encrypted_.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/MuPDF-AES256-R6-u=user-o=owner.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/MuPDF-AES256-R6-u=user-o=owner.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/THISISATEST_PWP.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/THISISATEST_PWP.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/c-r6-in-pw=owner4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/c-r6-in-pw=owner4.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/copied-positive-P.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/copied-positive-P.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/enc-XI-R6,V5,O=master.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/enc-XI-R6,V5,O=master.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=attachment,encrypted-attachments.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=attachment,encrypted-attachments.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=view,O=master.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=view,O=master.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=view,attachments,cleartext-metadata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=view,attachments,cleartext-metadata.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=wwwww,O=wwwww.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/enc-XI-R6,V5,U=wwwww,O=wwwww.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/enc-XI-long-password=qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcv.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/enc-XI-long-password=qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcv.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/encrypted-positive-P.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/encrypted-positive-P.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/encrypted_hello_world_r6-pw=hôtel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/encrypted_hello_world_r6-pw=hôtel.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/graph-encrypted-pw=user.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/graph-encrypted-pw=user.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/issue6010_1-pw=owner.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/issue6010_1-pw=owner.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/issue6010_2-pw=æøå.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/issue6010_2-pw=æøå.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/nontrivial-crypt-filter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/nontrivial-crypt-filter.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/pr6531_1-pw=asdfasdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/pr6531_1-pw=asdfasdf.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/pr6531_2-pw=asdfasdf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/pr6531_2-pw=asdfasdf.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/pwProtectedAES256_openPDFiss375.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/pwProtectedAES256_openPDFiss375.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/issue375/unfilterable-with-crypt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/issue375/unfilterable-with-crypt.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/merge-acroforms.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/merge-acroforms.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/objectXref.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/objectXref.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/open_protected.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/open_protected.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/openpdf_bug_test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/openpdf_bug_test.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/pades_infinite_loop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/pades_infinite_loop.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/pades_opposite_infinite_loop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/pades_opposite_infinite_loop.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/parseTable.html: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <title>Test</title> 4 | </head> 5 | <body> 6 | <br/> 7 | <table> 8 | <tr> <!--test--> 9 | <td rowspan="4">line 1</td> 10 | <td rowspan="4">line 2</td> 11 | <td>line 3</td> 12 | <td>line 4</td> 13 | <td>line 5</td> 14 | <td>line 6</td> 15 | <td>line 7</td> 16 | <td>line 8</td> 17 | </tr> 18 | <tr> 19 | <td>line 3</td> 20 | <td>line 4</td> 21 | <td>line 5</td> 22 | <td>line 6</td> 23 | <td>line 7</td> 24 | <td>line 8</td> 25 | </tr> 26 | <tr> 27 | <td>line 3</td> 28 | <td>line 4</td> 29 | <td>line 5</td> 30 | <td>line 6</td> 31 | <td>line 7</td> 32 | <td>line 8</td> 33 | </tr> 34 | <tr> 35 | <td>line 3</td> 36 | <td>line 4</td> 37 | <td>line 5</td> 38 | <td>line 6</td> 39 | <td>line 7</td> 40 | <td>line 8</td> 41 | </tr> 42 | </table> 43 | </body> 44 | </html> 45 | -------------------------------------------------------------------------------- /openpdf/src/test/resources/parseTitle.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"/> 5 | <title>Title</title> 6 | </head> 7 | <body> 8 | <p>This is a test</p> 9 | <p>This is a test2</p> 10 | </body> 11 | </html> 12 | -------------------------------------------------------------------------------- /openpdf/src/test/resources/pdf_digital_signature_timestamp.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/pdf_digital_signature_timestamp.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/pdf_form_metadata_issue_254.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/pdf_form_metadata_issue_254.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/pdfsmartcopy_bec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/pdfsmartcopy_bec.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/sample_signed-sha1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/sample_signed-sha1.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/sample_signed-sha512.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/sample_signed-sha512.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/siwa.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/openpdf/src/test/resources/siwa.pdf -------------------------------------------------------------------------------- /openpdf/src/test/resources/stylesTest/backgroundColor.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"> 5 | </head> 6 | <body> 7 | <span style="background-color:#0000ff">Blue background</span><br/> 8 | <span style="background-color:blue">Blue background</span><br/> 9 | <span style="background: none repeat scroll 0% 0% #0000ff">Blue background</span><br/> 10 | <span style="background: blue none repeat scroll 0% 0%">Blue background</span><br/> 11 | </body> 12 | </html> 13 | -------------------------------------------------------------------------------- /openpdf/src/test/resources/stylesTest/fontColor.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"> 5 | </head> 6 | <body> 7 | <span style="color:#0000ff">Blue text</span><br/> 8 | <span style="color:blue">Blue text</span><br/> 9 | </body> 10 | </html> 11 | -------------------------------------------------------------------------------- /openpdf/src/test/resources/stylesTest/fontSize.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"> 5 | </head> 6 | <body> 7 | <span>Text</span><br/> 8 | <span style="font-size:8.0pt">Text 8.0pt</span><br/> 9 | <span style="font-size:20px">Text 20px</span><br/> 10 | <span style="font-size:1.5em">Text 1.5em</span><br/> 11 | <span style="font-size:50%">Text 50%</span> 12 | </body> 13 | </html> 14 | -------------------------------------------------------------------------------- /openpdf/src/test/resources/stylesTest/fontSizeNamed.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"> 5 | </head> 6 | <body> 7 | <span style="font-size:20pt"> 8 | <span style="font-size:xx-small">Text xx-small</span><br/> 9 | <span style="font-size:x-small">Text x-small</span><br/> 10 | <span style="font-size:small">Text small</span><br/> 11 | <span style="font-size:medium">Text medium</span><br/> 12 | <span style="font-size:large">Text large</span><br/> 13 | <span style="font-size:x-large">Text x-large</span><br/> 14 | <span style="font-size:xx-large">Text xx-large</span><br/> 15 | <span style="font-size:xxx-large">Text xxx-large</span><br/> 16 | </span> 17 | 18 | <span style="font-size:20pt"> 19 | <span style="font-size:smaller">Text smaller</span><br/> 20 | <span style="font-size:larger">Text larger</span><br/> 21 | </span> 22 | </body> 23 | </html> 24 | -------------------------------------------------------------------------------- /pdf-swing/pom.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 | <modelVersion>4.0.0</modelVersion> 5 | 6 | <parent> 7 | <groupId>com.github.librepdf</groupId> 8 | <artifactId>openpdf-parent</artifactId> 9 | <version>2.2.5-SNAPSHOT</version> 10 | </parent> 11 | 12 | <artifactId>pdf-swing</artifactId> 13 | <name>OpenPDF Swing</name> 14 | 15 | <properties> 16 | <java-module-name>com.github.librepdf.pdfSwing</java-module-name> 17 | </properties> 18 | 19 | <dependencies> 20 | <dependency> 21 | <groupId>com.github.librepdf</groupId> 22 | <artifactId>openpdf</artifactId> 23 | <version>${project.version}</version> 24 | </dependency> 25 | <dependency> 26 | <groupId>org.swinglabs</groupId> 27 | <artifactId>pdf-renderer</artifactId> 28 | </dependency> 29 | <dependency> 30 | <groupId>org.dom4j</groupId> 31 | <artifactId>dom4j</artifactId> 32 | </dependency> 33 | </dependencies> 34 | 35 | </project> 36 | -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/io/filters/PdfFilter.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.rups.io.filters; 2 | 3 | import java.io.File; 4 | import javax.swing.filechooser.FileFilter; 5 | 6 | 7 | /** 8 | * Filters PDF files in a JFileChooser. 9 | */ 10 | public class PdfFilter extends FileFilter { 11 | 12 | /** 13 | * A public instance of the PdfFilter. 14 | */ 15 | public static final PdfFilter INSTANCE = new PdfFilter(); 16 | 17 | /** 18 | * @param f File 19 | * @return boolean 20 | * @see javax.swing.filechooser.FileFilter#accept(java.io.File) 21 | */ 22 | public boolean accept(File f) { 23 | if (f.isDirectory()) { 24 | return true; 25 | } 26 | return f.getName().toLowerCase().endsWith(".pdf"); 27 | } 28 | 29 | /** 30 | * @return String 31 | * @see javax.swing.filechooser.FileFilter#getDescription() 32 | */ 33 | public String getDescription() { 34 | return "*.pdf PDF files"; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/array.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/attribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/attribute.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/boolean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/boolean.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/copyright_notice.txt: -------------------------------------------------------------------------------- 1 | Copyright notice for the icons in this directory: 2 | 3 | 4 | Silk icon set 1.3 5 | 6 | _________________________________________ 7 | Mark James 8 | http://www.famfamfam.com/lab/icons/silk/ 9 | _________________________________________ 10 | 11 | This work is licensed under a 12 | Creative Commons Attribution 2.5 License. 13 | [ http://creativecommons.org/licenses/by/2.5/ ] 14 | 15 | This means you may use it for any purpose, 16 | and make any changes you like. 17 | All I ask is that you include a link back 18 | to this page in your credits. 19 | 20 | Are you using this icon set? Send me an email 21 | (including a link or picture if available) to 22 | mjames at gmail dot com 23 | 24 | Any other questions about this icon set please 25 | contact mjames at gmail dot com -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/dictionary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/dictionary.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/form.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/name.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_first.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_last.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_next.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/navigation_previous.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/null.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/null.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/number.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/number.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/outline.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/page.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/pages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/pages.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/pdf.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/pi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/pi.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/ref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/ref.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/ref_recursive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/ref_recursive.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/stream.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/string.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/string.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/tag.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/text.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/icons/xfa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-swing/src/main/java/com/lowagie/rups/view/icons/xfa.png -------------------------------------------------------------------------------- /pdf-swing/src/main/java/com/lowagie/rups/view/itext/XfaTextArea.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.rups.view.itext; 2 | 3 | import com.lowagie.rups.io.OutputStreamResource; 4 | import com.lowagie.rups.io.TextAreaOutputStream; 5 | import java.io.IOException; 6 | import javax.swing.JScrollPane; 7 | import javax.swing.JTextArea; 8 | 9 | /** 10 | * TextArea that visualizes the XFA XML file. 11 | */ 12 | public class XfaTextArea extends JScrollPane { 13 | 14 | /** 15 | * A Serial Version UID. 16 | */ 17 | private static final long serialVersionUID = -8275229961781669457L; 18 | /** 19 | * The text area with the content stream. 20 | */ 21 | protected JTextArea text; 22 | 23 | /** 24 | * Constructs a StreamTextArea. 25 | */ 26 | public XfaTextArea() { 27 | super(); 28 | text = new JTextArea(); 29 | setViewportView(text); 30 | } 31 | 32 | public void clear() { 33 | text.setText(""); 34 | } 35 | 36 | public void load(OutputStreamResource xml) throws IOException { 37 | TextAreaOutputStream stream = new TextAreaOutputStream(text); 38 | xml.writeTo(stream); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /pdf-swing/src/main/resources/META-INF/LICENSES.md: -------------------------------------------------------------------------------- 1 | # Licenses 2 | 3 | ## Licenses of OpenPDF 4 | 5 | OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 6 | or GNU Lesser General Public License 2.1. 7 | 8 | The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` 9 | 10 | ### Mozilla Public License Version 2.0 11 | 12 | Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file 13 | [MPL-2.0.txt](MPL-2.0.txt). 14 | 15 | ### GNU Lesser General Public License 2.1 16 | 17 | Please see https://www.gnu.org/licenses/old-licenses/lgpl-2.1 or the attached file 18 | [LGPL-2.1.md](LGPL-2.1.md). 19 | 20 | #### Apache License, Version 2.0 21 | 22 | Some files use code from different Apache projects. The source code of these files contains the appropriate copyright 23 | notices as described in the Appendix of `http://www.apache.org/licenses/LICENSE-2.0`. 24 | 25 | Please see https://www.apache.org/licenses/LICENSE-2.0 or the attached file 26 | [APACHE-LICENSE-2.0.txt](APACHE-LICENSE-2.0.txt). 27 | 28 | -------------------------------------------------------------------------------- /pdf-toolbox/src/main/java/com/lowagie/toolbox/plugins/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/main/java/com/lowagie/toolbox/plugins/rotate.png -------------------------------------------------------------------------------- /pdf-toolbox/src/main/java/com/lowagie/toolbox/plugins/translate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/main/java/com/lowagie/toolbox/plugins/translate.png -------------------------------------------------------------------------------- /pdf-toolbox/src/main/java/com/lowagie/toolbox/plugins/zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/main/java/com/lowagie/toolbox/plugins/zoom.png -------------------------------------------------------------------------------- /pdf-toolbox/src/main/resources/1t3xt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/main/resources/1t3xt.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/main/resources/META-INF/LICENSES.md: -------------------------------------------------------------------------------- 1 | # Licenses 2 | 3 | ## Licenses of OpenPDF 4 | 5 | OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 6 | or GNU Lesser General Public License 2.1. 7 | 8 | The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` 9 | 10 | ### Mozilla Public License Version 2.0 11 | 12 | Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file 13 | [MPL-2.0.txt](MPL-2.0.txt). 14 | 15 | ### GNU Lesser General Public License 2.1 16 | 17 | Please see https://www.gnu.org/licenses/old-licenses/lgpl-2.1 or the attached file 18 | [LGPL-2.1.md](LGPL-2.1.md). 19 | 20 | #### Apache License, Version 2.0 21 | 22 | Some files use code from different Apache projects. The source code of these files contains the appropriate copyright 23 | notices as described in the Appendix of `http://www.apache.org/licenses/LICENSE-2.0`. 24 | 25 | Please see https://www.apache.org/licenses/LICENSE-2.0 or the attached file 26 | [APACHE-LICENSE-2.0.txt](APACHE-LICENSE-2.0.txt). 27 | 28 | -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/colors/otsoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/colors/otsoe.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/colors/pngnow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/colors/pngnow.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/coordinates/hitchcock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/coordinates/hitchcock.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/hitchcock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/hitchcock.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/optionalcontent/pngnow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/optionalcontent/pngnow.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/pageevents/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/directcontent/pageevents/logo.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/fonts/getting/liz.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/fonts/getting/liz.otf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/forms/create/bruno.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/forms/create/bruno.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/forms/fill/register.xfdf: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"> 3 | <fields> 4 | <field name="name"> 5 | <value>Bruno Lowagie</value> 6 | </field> 7 | <field name="address"> 8 | <value>Baeyensstraat 121, Sint-Amandsberg</value> 9 | </field> 10 | <field name="postal_code"> 11 | <value>9040</value> 12 | </field> 13 | <field name="email"> 14 | <value>bruno@lowagie.com</value> 15 | </field> 16 | </fields> 17 | <f href="SimpleRegistrationForm.pdf"/> 18 | </xfdf> -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/general/copystamp/watermark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/general/copystamp/watermark.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/html/getacro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/html/getacro.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/html/iText.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/html/iText.bmp -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/html/iText.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/html/iText.tif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/html/iText.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/html/iText.wmf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/html/otsoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/html/otsoe.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/html/pngnow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/html/pngnow.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/anchors/cards.mpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/anchors/cards.mpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/anchors/iText.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/anchors/iText.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/columns/caesar_coin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/columns/caesar_coin.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/columns/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/columns/cover.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/hitchcock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/hitchcock.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/sunflower-back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/sunflower-back.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/sunflower-front.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/sunflower-front.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/vonnegut.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/images/vonnegut.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/alternatives/iText.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/alternatives/iText.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/alternatives/otsoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/alternatives/otsoe.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/otsoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/otsoe.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/pdfptable/otsoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/java/com/lowagie/examples/objects/tables/pdfptable/otsoe.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/java/com/lowagie/toolbox/plugins/watermarker/WatermarkerToolTest.java: -------------------------------------------------------------------------------- 1 | package com.lowagie.toolbox.plugins.watermarker; 2 | 3 | public class WatermarkerToolTest { 4 | 5 | /** 6 | * Adding text at absolute positions. 7 | * 8 | * @param args no arguments needed 9 | * <p> 10 | * Before passing that test, you have to create a MyFile.pdf at the project root. The generated files 11 | * will be written there too. 12 | */ 13 | public static void main(String[] args) { 14 | WatermarkerTool.main(new String[]{"MyFile.pdf", "Specimen", "120", "0.5", "MyFile-watermark.pdf"}); 15 | WatermarkerTool.main( 16 | new String[]{"MyFile.pdf", "Specimen", "120", "0.5", "MyFile-watermark-red.pdf", "#FF0000"}); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/CryptoSignedSha256.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/CryptoSignedSha256.pdf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/H.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/H.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/MyFile.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/MyFile.pdf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/cc-test-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/cc-test-64x64.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/cc-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/cc-test.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/form/PdfFormLayoutProcessor.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/form/PdfFormLayoutProcessor.odt -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/form/PdfFormLayoutProcessor.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/form/PdfFormLayoutProcessor.pdf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/images/mushroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/images/mushroom.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSans-Regular.ttf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSansArabic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSansArabic-Regular.ttf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSansMath-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSansMath-Regular.ttf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSansMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSansMono-Regular.ttf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/NotoSerif-Regular.ttf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/fonts/noto/README: -------------------------------------------------------------------------------- 1 | 2 | The fonts Noto*.ttf are licensed under the SIL Open Font License 3 | see LICENSE. 4 | The newest version is available under 5 | https://github.com/notofonts/latin-greek-cyrillic 6 | -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/html/parseHelloWorld.html: -------------------------------------------------------------------------------- 1 | <html> 2 | <body> 3 | <p>What should you say?</p> 4 | <ul> 5 | <li>Hello</li> 6 | <li>World</li> 7 | </ul> 8 | <ol> 9 | <li>Element-1 10 | <ol> 11 | <li>Element-1-1</li> 12 | <li>Element-1-2</li> 13 | </ol> 14 | </li> 15 | <li>Element-2 16 | <ol> 17 | <li>Element-2-1</li> 18 | <li>Element-2-2</li> 19 | </ol> 20 | </li> 21 | </ol> 22 | </body> 23 | </html> -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/html/parseTable.html: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <title>Test</title> 4 | </head> 5 | <body> 6 | <table> 7 | <tr> 8 | <td>line 3</td> 9 | <td>line 4</td> 10 | <td>line 4</td> 11 | <td>line 4</td> 12 | <td>line 4</td> 13 | </tr> 14 | </table> 15 | </body> 16 | </html> -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/com/lowagie/examples/html/parseTitle.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="UTF-8"/> 5 | <title>Title</title> 6 | </head> 7 | <body> 8 | <p>This is a test</p> 9 | <p>This is a test2</p> 10 | </body> 11 | </html> -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/getacro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/getacro.gif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/grayscaled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/grayscaled.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/groups.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/groups.pdf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/iText.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/iText.bmp -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/iText.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/iText.tif -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/iText.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/iText.wmf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/layers.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/layers.pdf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/otsoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/otsoe.jpg -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/pattern.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/pattern.pdf -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/pngnow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/pngnow.png -------------------------------------------------------------------------------- /pdf-toolbox/src/test/resources/templates.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LibrePDF/OpenPDF/8a145efb0ffc60439c3cde6059b6b85e95a71bac/pdf-toolbox/src/test/resources/templates.pdf --------------------------------------------------------------------------------