{"id":31067201,"url":"https://github.com/pcorless/icepdf","last_synced_at":"2026-04-07T05:02:56.149Z","repository":{"id":37682875,"uuid":"232965261","full_name":"pcorless/icepdf","owner":"pcorless","description":"PDF Rendering and Viewing API in Java","archived":false,"fork":false,"pushed_at":"2026-04-01T03:37:37.000Z","size":38011,"stargazers_count":119,"open_issues_count":22,"forks_count":25,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-04-01T05:40:00.220Z","etag":null,"topics":["annotation-tool","annotations","headless","java","pdf","pdf-converter","pdf-manipulation-utitilies","pdf-reader","pdf-viewer","redaction","redactions","redactor","signatures"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pcorless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"pcorless"}},"created_at":"2020-01-10T04:26:30.000Z","updated_at":"2026-04-01T03:08:37.000Z","dependencies_parsed_at":"2024-05-28T05:06:36.792Z","dependency_job_id":"321c015a-31ca-4c61-bc17-fc21855c789b","html_url":"https://github.com/pcorless/icepdf","commit_stats":null,"previous_names":[],"tags_count":169,"template":false,"template_full_name":null,"purl":"pkg:github/pcorless/icepdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorless%2Ficepdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorless%2Ficepdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorless%2Ficepdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorless%2Ficepdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcorless","download_url":"https://codeload.github.com/pcorless/icepdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcorless%2Ficepdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation-tool","annotations","headless","java","pdf","pdf-converter","pdf-manipulation-utitilies","pdf-reader","pdf-viewer","redaction","redactions","redactor","signatures"],"created_at":"2025-09-15T19:23:48.982Z","updated_at":"2026-04-07T05:02:56.141Z","avatar_url":"https://github.com/pcorless.png","language":"Java","readme":"# ICEpdf\n\nICEpdf is a pure Java PDF document rendering and viewing solution. ICEpdf can parse and render documents based on the \nlatest PDF standards (Portable Document Format v1.6/Adobe® Acrobat® 7).\n\nICEpdf is a community-driven project with the goal of supporting and enhancing the ICEpdf library.  \n\n## Contributing\nICEpdf is an open source project and is always looking for more contributors.  To get involved, visit:\n\n - [Issue Reporting Guide](https://github.com/pcorless/icepdf/wiki/Issue-Reporting-Guide)\n - [Good Beginner Bugs](https://github.com/pcorless/icepdf/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)\n - [Projects](https://github.com/pcorless/icepdf/projects)\n - [Frequently Asked Questions](https://github.com/pcorless/icepdf/wiki/Frequently-Asked-Questions)\n   \u003c!-- Code Contribution Guide --\u003e \n ## Getting Started\n Whether you are long time user of the API or a new user, there ton of information on the \n [Wiki](https://github.com/pcorless/icepdf/wiki) pages.  Create a pull requests and use the issue tracker, the more\n help and feedback we get the better we can make the project.\n\n \n ### Getting the jars, javadoc and source from maven central \n ```xml\n \u003cdependency\u003e\n \u003cgroupId\u003ecom.github.pcorless.icepdf\u003c/groupId\u003e\n \u003cartifactId\u003eicepdf-core\u003c/artifactId\u003e\n \u003cversion\u003e7.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n\u003cgroupId\u003ecom.github.pcorless.icepdf\u003c/groupId\u003e\n\u003cartifactId\u003eicepdf-viewer\u003c/artifactId\u003e\n\u003cversion\u003e7.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n\u003c!-- optional dependency for embedding fonts --\u003e\n\u003cgroupId\u003ecom.github.pcorless.icepdf\u003c/groupId\u003e\n\u003cartifactId\u003eicepdf-fonts\u003c/artifactId\u003e\n\u003cversion\u003e7.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n ```\n \n ## Getting the Code\n To get a local copy of the current code, clone it using git:\n ```\n$ git clone https://github.com/pcorless/icepdf.git\n$ cd icepdf\n```\n \n ### Building ICEpdf\n In order to use the library you need to build at least the Core library and if you intend you use the Viewer\n component you'll also need to build the Viewer library.  The project can be built with Gradle or Maven, we have\n no preference, pick one that makes you happier.\n\nBuilds as they are currently configured to target Java 11.\n\n#### Building With Maven\n```\n# core module\n~$ mvn -pl :icepdf-core package\n\n# viewer module, -am insures dependencies are build \n~$ mvn -pl :icepdf-viewer -am package\n\n# Viewer jar with all dependences in one self executing jar\n~$ mvn -pl :icepdf-viewer -am package -P assembly \n\n# examples module, -am insures dependencies are build \n~$ mvn -pl :png-capture -am package\n# or with full group id. \n~$ mvn -pl org.icepdf.examples:png-capture -am package\n~$ java -jar icepdf-viewer-7.0.0-SNAPSHOT-jar-with-dependencies.jar\n\n# Whole project hierarchy can be built with or with full group id. \n~$ mvn package\n\n ```\n#### Building With Gradle\n\nBuild the core jar using the following Gradle command\n\n```~$ gradle :core:core-awt:assemble ```\n\nBuild the viewer jar using the following Gradle command\n\n```~$ gradle :viewer:viewer-awt:assemble``` \n\nBuild the annotation creation example using the following Gradle command\n\n```~$  gradle :examples:annotation:creation:assemble```\n\nBuild the distribution zip and tar archives\n\n```\n# defaultTasks allows for a call to just gradle \n~$ gradle\n# or one can use the full task list \n~$ gradle projectReport, sourcesJar, genPomFileForCoreJarPub, genPomFileForViewerJarPub, osDistZip, osDistTar\n```\n\n ## Using ICEpdf Viewer Component\n The `org.icepdf.core.ri.common.SwingController` class provides convenience methods for the most common UI actions, \n such as rotating the document, setting the zoom level, etc. The `org.icepdf.core.ri.common.SwingViewBuilder` class is \n responsible for creating the PDF Viewer component panel populated with Swing components configured to work with the \n SwingController.\n \n When using the SwingViewBuilder and SwingController classes, it is usually not necessary to use the Document object\n directly. The SwingController class does this for you.\n \n The following code snippet illustrates how to build a PDF Viewer component:\n ```java\nString filePath = \"somefilepath/myfile.pdf\";\n\n// initiate font caching for faster startups\nFontPropertiesManager.getInstance().loadOrReadSystemFonts();\n\n// build a controller\nSwingController controller = new SwingController();\n\n// Build a SwingViewFactory configured with the controller\nSwingViewBuilder factory = new SwingViewBuilder(controller);\n\n// Use the factory to build a JPanel that is pre-configured\n//with a complete, active Viewer UI.\nJPanel viewerComponentPanel = factory.buildViewerPanel();\n\n// add copy keyboard command\nComponentKeyBinding.install(controller, viewerComponentPanel);\n\n// add interactive mouse link annotation support via callback\ncontroller.getDocumentViewController().setAnnotationCallback(\n      new org.icepdf.ri.common.MyAnnotationCallback(\n             controller.getDocumentViewController()));\n\n// Create a JFrame to display the panel in\nJFrame window = new JFrame(\"Using the Viewer Component\");\nwindow.getContentPane().add(viewerComponentPanel);\nwindow.pack();\nwindow.setVisible(true);\n\n// Open a PDF document to view\ncontroller.openDocument(filePath);\n```\n ## Page Captures\n \n The Document class provides functionality for rendering PDF content into other formats via a Java2D graphics context.\n As a result, rendering PDF content to other formats is a relatively simple process with very powerful results. ICEpdf \n also supports Java headless mode when rending PDF content, which can be useful for server side solutions.\n\nExamples of extraction techniques like png, svg, and tiff can be found examples/capture folder. The following is an\nexample of how to save page captures in an SVG format\n \n ```java\nString filePath = \"somefilepath/myfile.pdf\";\nDocument document = new Document();\ndocument.setFile(filePath);\n\n// Get a DOMImplementation\nDOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();\n// Create an instance of org.w3c.dom.Document\norg.w3c.dom.Document svgDocument = domImpl.createDocument(null,\"svg\",null);\n// Create an instance of the SVG Generator\nSVGGraphics2D svgGenerator = new SVGGraphics2D(svgDocument);\nfloat userRotation = 0;\nfloat userZoom = 1;\nint pageNumber = 0;\n\nPDimension pdfDimension=document.getPageDimension(pageNumber,userRotation,userZoom);\nsvgGenerator.setSVGCanvasSize(pdfDimension.toDimension());\n\n// paint the page to the Batik svgGenerator graphics context.\ndocument.paintPage(pageNumber,svgGenerator,\n     GraphicsRenderingHints.PRINT,\n     Page.BOUNDARY_CROPBOX,\n     userRotation,\n     userZoom);\n\nFile file = new File(\"svgCapture_\"+pageNumber+\".svg\");\n// Finally, stream the SVG using UTF-8character byte encoding\nWriter fileWriter = new OutputStreamWriter(new FileOutputStream(file),StandardCharsets.UTF_8);\n// Enable SVG CSS style attribute\nboolean SVG_CSS = true;\nsvgGenerator.stream(fileWriter,SVG_CSS);\n```\n\nMake sure to take a look at the [Wiki](https://github.com/pcorless/icepdf/wiki/Usage-Examples) for more examples of\nextracting content.\n\n \n ## Learning\n  \n ### Examples\n\nThere are a bunch of examples located in the root of the project grouped by common usage scenarios. Similarly, the\nWiki contains [example](https://github.com/pcorless/icepdf/wiki/Usage-Examples) information. \n\n ### API Documentation\n \n Both the Gradle and Maven builds will generate the API documentation for the Core and Viewer libraries. \n \n","funding_links":["https://github.com/sponsors/pcorless"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcorless%2Ficepdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcorless%2Ficepdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcorless%2Ficepdf/lists"}