GithubHelp home page GithubHelp logo

fspdf's Introduction

		   Low-level PDF manipulation for F#

		     Daniel Beer <[email protected]>
			      13 Mar 2017

The code contained here consists of a module for manipulating PDF
objects (pdf.fs), and a very simple parser for Adobe Font Metrics files
and glyph-lists (afm.fs).

Things it can do:

  * Create arbitrary PDF documents.

  * Read objects from PDF documents (although it does not support
    parsing or decompression of content streams -- you need to implement
    this yourself).

  * Deep-copy objects from one PDF document to another (e.g. to use a
    page of one document as an image or background in another).

  * Calculate text sizes given a string, a point size, and an Adobe Font
    Metrics file.

PDFs of arbitrary complexity can be created, but you may find it useful
to wrap the module in something higher-level and more specific to your
needs.

Included is an example program (example.fs), which takes as arguments
the name of an input and an output PDF file. Page 1 of the input file is
extracted, and then a single-page output file is created which shows
page 1 of the input file scaled down and centered in the middle of the
page, with a blue border and a centered caption above it.

Building the example
--------------------

The included code should be able to be run on nearly any system. It has
no dependencies outside the .NET standard library. If you're on a Linux
system with mono and the F# compiler installed, type "make" to build.

If you're building manually, select all F# files for building, with
example.fs last in the list. You will also need to include glyphlist.txt
and Times-Roman.afm as assembly resources. The names of these resources
should be the same as their filenames.

fspdf's People

Contributors

dlbeer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fspdf's Issues

Line drawings ?

can I also draw lines and polylines in a PDF with this tools?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.