All Projects → eseifert → Vectorgraphics2d

eseifert / Vectorgraphics2d

Licence: other
Graphics2D implementations to export various vector file formats

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Vectorgraphics2d

Itext7
iText 7 for Java represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every workflow.
Stars: ✭ 913 (+949.43%)
Mutual labels:  svg, pdf, pdf-generation
Itext7 Dotnet
iText 7 for .NET is the .NET version of the iText 7 library, formerly known as iTextSharp, which it replaces. iText 7 represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every workflow.
Stars: ✭ 698 (+702.3%)
Mutual labels:  svg, pdf, pdf-generation
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (+59.77%)
Mutual labels:  svg, pdf, pdf-generation
Openhtmltopdf
An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
Stars: ✭ 1,096 (+1159.77%)
Mutual labels:  svg, pdf, pdf-generation
Html Pdf Service
LGPL V3. Java Spring Boot microservice with RESTful webconsole and service endpoints that convert HTML to PDF, optionally styling with CSS and templating with JSON using Flying Saucer, PDF Box and Jackson libraries. Available on Docker Hub.
Stars: ✭ 12 (-86.21%)
Mutual labels:  pdf, pdf-generation
Asciidoctor Pdf
📃 Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
Stars: ✭ 868 (+897.7%)
Mutual labels:  pdf, pdf-generation
Mkdocs With Pdf
Generate a single PDF file from MkDocs repository.
Stars: ✭ 39 (-55.17%)
Mutual labels:  pdf, pdf-generation
Mobius
Scripts to extract data from the COVID-19 Google Community Mobility Reports
Stars: ✭ 47 (-45.98%)
Mutual labels:  svg, pdf
Pdfsave
Convert websites into readable PDFs
Stars: ✭ 46 (-47.13%)
Mutual labels:  pdf, pdf-generation
Dicom Ecg Plot
Dicom ECG Viewer and Converter. Convert to PDF, PNG, JPG, SVG, ...
Stars: ✭ 84 (-3.45%)
Mutual labels:  svg, pdf
Php Svg Lib
SVG file parsing / rendering library
Stars: ✭ 1,146 (+1217.24%)
Mutual labels:  svg, pdf
Hexapdf
Versatile PDF creation and manipulation for Ruby
Stars: ✭ 852 (+879.31%)
Mutual labels:  pdf, pdf-generation
Notion Pdf Export
A tool to allow batch PDF export for free Notion users. You can export as HTML and then use this tool to convert those into PDFs.
Stars: ✭ 66 (-24.14%)
Mutual labels:  pdf, pdf-generation
Unipdf
Golang PDF library for creating and processing PDF files (pure go)
Stars: ✭ 1,171 (+1245.98%)
Mutual labels:  pdf, pdf-generation
Alivepdf
[Official AlivePDF] - AlivePDF is a client side AS3 PDF generation library for Adobe Flash, Flex and AIR
Stars: ✭ 29 (-66.67%)
Mutual labels:  pdf, pdf-generation
Satysfi
A statically-typed, functional typesetting system
Stars: ✭ 815 (+836.78%)
Mutual labels:  pdf, pdf-generation
Sile
Simon’s Improved Layout Engine
Stars: ✭ 1,032 (+1086.21%)
Mutual labels:  pdf, pdf-generation
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+6904.6%)
Mutual labels:  svg, pdf
Html Pdf Chrome
HTML to PDF converter via Chrome/Chromium
Stars: ✭ 629 (+622.99%)
Mutual labels:  pdf, pdf-generation
Maker.js
📐⚙ 2D vector line drawing and shape modeling for CNC and laser cutters.
Stars: ✭ 1,185 (+1262.07%)
Mutual labels:  svg, pdf

.. image:: https://eseifert.github.io/vectorgraphics2d/logo.png

.. image:: https://travis-ci.org/eseifert/vectorgraphics2d.svg?branch=master :target: https://travis-ci.org/eseifert/vectorgraphics2d

VectorGraphics2D ################

VectorGraphics2D provides implementations of Java's Graphics2D interface and exports the graphics in various vector file formats. Currently, there is support for the following vector file formats:

  • Encapsulated PostScript® (EPS)
  • Scalable Vector Graphics (SVG)
  • Portable Document Format (PDF)

Additional formats can be easily added.

Features

  • Support for EPS, PDF, and SVG formats
  • Rendering of all geometric shapes provided by the java.awt.Graphics2D interface
  • Shapes and text can be made transparent (except in EPS)
  • Arbitrary clipping paths can be defined
  • Output of bitmap images
  • Easily extensible
  • Small footprint (JAR is below 100 kilobytes)

Currently, most operations are supported, i.e. VectorGraphics2D is able to handle clipping gradients, or compression. Some features are still missing, like text encodings, embedded fonts, or metadata support. Although its early stage VectorGraphics2D is already used successfully in several projects to export vector graphics.

Requirements

VectorGraphics2D requires at least Java 8 and Gradle 5 or higher to build.

Installation

Without build management system

You can just add VectorGraphics2D-0.13.jar to the classpath of your project.

Using VectorGraphics2D with Maven

.. code:: xml

<dependency>
    <groupId>de.erichseifert.vectorgraphics2d</groupId>
    <artifactId>VectorGraphics2D</artifactId>
    <version>0.13</version>
</dependency>

Using VectorGraphics2D with Gradle

.. code:: groovy

dependencies {
    compile group: 'de.erichseifert.vectorgraphics2d', name: 'VectorGraphics2D', version: '0.13'
}

Using VectorGraphics2D with sbt

.. code:: scala

libraryDependencies += "de.erichseifert.vectorgraphics2d" % "VectorGraphics2D" % "0.13"

Usage

A VectorGraphics2D object can be used as a replacement for a Graphics2D object. All calls to the VectorGraphics2D instance will be recorded and can later be retrieved as a CommandSequence:

.. code:: java

Graphics2D vg2d = new VectorGraphics2D();
vg2d.draw(new Rectangle2D.Double(0.0, 0.0, 20.0, 20.0));
CommandSequence commands = ((VectorGraphics2D) vg2d).getCommands();

This command sequence can then be exported to a EPS, PDF or SVG document using a processor for the desired file type, i.e. EPSProcessor for EPS, PDFProcessor for PDF and SVGProcessor for SVG. Additionally, format specific output options can be passed to the processor when it is created. For example, a compression option can be passed for PDF:

.. code:: java

PDFProcessor pdfProcessor = new PDFProcessor(true);

Another method to get a processor is Processors.get(String):

.. code:: java

Processor pdfProcessor = Processors.get("pdf");

Finally, a document can be generated from the commands and written to an output stream:

.. code:: java

Document doc = pdfProcessor.getDocument(commands, PageSize.A4);
doc.writeTo(new FileOutputStream("rect.pdf"));
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].