ospi
clone your own copy | download snapshot

About

ospi

For installation instructions, see the INSTALL file.

ospi is a PDF imposer based on PoDoFo. It produces PDF files from PDF files, re-arranging pages according to an imposition plan. ospi is a Free software released under GPLv3

Invocation

ospi takes all its parameters in the form of key=value pairs. The only required key is "plan_file" which indicates to the program which imposition file to process. An optional key goes for "plan_type" to instruct the program on which plan reader it should call to process the plan file. If this key is missing, it will try to guess based on the extension of the plan filename. All other parameters are specific to each plan reader.

ospi processes imposition plan files in:

  • plain text format (simple)
  • JSON format (json).

Simple

The simple format is primarily intended to test ospi.

/skip/

JSON

The json format has been developed by CatPrint.com to integrate their workflow. The descrition of the format is as follows:

{
"plan": [{
  "page_width": decimal_ps_points,
  "page_height": decimal_ps_points,
  "slots": [{
    "width":  decimal_ps_points, /*width, height default to source page dimensions*/
    "height": decimal_ps_points,
    "left":   decimal_ps_points, 
    "top":    decimal_ps_points, 
    "file":   "local file location",
    "page":   1, /* page of PDF, if absent defaults to 1 (in "natural counting")*/
    "remote_file": { 
      "url": "remote file location", 
      "type": "‘pdf’ | ‘jpg’ | ‘html’"
    },
    "crop_width":  decimal_ps_points,
    "crop_height": decimal_ps_points,
    "crop_left":   decimal_ps_points,
    "crop_top":    decimal_ps_points,
    "rotation":    "0 | 1 | 2 | 3"
    }, ...
    /* repeat for each slot */
    ]
  }, ...
  /* repeat for each page */
  ]
}

Example:

$ ospi plan_file=plan8up.json plan_type=json output_file_name=imposed_doc.pdf

Snapshots | iceberg

No images in this repository’s iceberg at this time

Inside this repository

Log

 

Pierre Marchandsaid

— First actual commit

Saturday, 24th March 2012 - 17:14

 

Pierre Marchandshouted

— Still prototyping, got it worked on ugly or large pdfs as good mixed
input pdfs. Now kind of saving

Monday, 26th March 2012 - 14:02

 

Pierre Marchandblabed out

— reader factory
+ simple reader

Monday, 26th March 2012 - 17:06

 

Pierre Marchandspoke

— made simple reader work

Monday, 26th March 2012 - 17:29

 

Pierre Marchandargued

— Added parameters

Tuesday, 27th March 2012 - 01:38

 

Pierre Marchandlet loose

— First bits of the JSON reader

Tuesday, 27th March 2012 - 03:10

 

Pierre Marchandexpressed

— First prototype of JSON reader

Tuesday, 27th March 2012 - 17:49

 

Pierre Marchandspilled the beans

— First working prototype with JSON imposition plan

Tuesday, 27th March 2012 - 18:34

 

Pierre Marchandshouted

— Added cropbox to sourcepage

Wednesday, 28th March 2012 - 01:03

 

Pierre Marchandtold

— Implemented cropping + added internet file fetching (test purpose only)

Wednesday, 28th March 2012 - 12:27

 

Pierre Marchanddiscovered

— Forgot curl.c

Wednesday, 28th March 2012 - 12:30

 

Pierre Marchandblabed out

— Forgot json headers

Wednesday, 28th March 2012 - 12:31

 

Pierre Marchandblabed

— stabilized Transformations

Thursday, 29th March 2012 - 22:17

 

Pierre Marchandrendered

— Added origin point option to Transform::rotate

Thursday, 29th March 2012 - 23:59

 

Pierre Marchandrendered

— Fixed association of transformations coming from JSON

Friday, 30th March 2012 - 00:20

 

Pierre Marchandpeached

— cleanup debug output

Friday, 30th March 2012 - 02:19

 

Pierre Marchandlet on

— prevents to get non-existing pages

Friday, 30th March 2012 - 03:09

 

Pierre Marchandlet the cat out of the bag

— slot centered matrix transformations for JSON plans

Sunday, 1st April 2012 - 12:00

 

Pierre Marchandpeached

— made the command line more consistent

Sunday, 1st April 2012 - 13:22

 

Pierre Marchandcomplained

— Make optional use of GMP, hope for more stable floating point arithmetic

Sunday, 1st April 2012 - 17:14

 

Pierre Marchandwhispered

— A simple INSTALL file

Monday, 2nd April 2012 - 15:42

 

Pierre Marchandtold

— A README file

Monday, 2nd April 2012 - 16:08

 

Ben Hughesrevealed

— Updated install document with attempt at organizing dependencies...

Monday, 2nd April 2012 - 22:12

 

Ben Hughesverbalised

— Added some other dependencies to the INSTALL file to get this compiling on Ubuntu.

Monday, 2nd April 2012 - 22:47

 

Ben Hughesbabbled out

— Added build to the gitignore file.

Monday, 2nd April 2012 - 22:48

 

Pierre Marchandspilled the beans

— Added a poor man's id genereator

Tuesday, 3rd April 2012 - 18:29

 

Pierre Marchandbabbled out

— Few wording fixes

Tuesday, 3rd April 2012 - 18:30

 

Pierre Marchandgave away

— made insertion of the same source page on same target page more efficient

Wednesday, 4th April 2012 - 10:40

 

pmpublished

— few fixes to build with older boost

Tuesday, 3rd April 2012 - 21:02

 

Pierre Marchandironized

— Merge branch 'master' of github.com:catprintlabs/Imposer

Conflicts:
src/ReaderJSONCPP.cpp

Wednesday, 4th April 2012 - 10:47

 

Pierre Marchandblabed

— Fixed osx build

Wednesday, 4th April 2012 - 15:55

 

Pierre Marchandsaid

— Added proper output_file_name key to json reader

Thursday, 5th April 2012 - 10:11

 

Pierre Marchandspoke

— Allow same source pages with different crop boxes on the same target page

Monday, 9th April 2012 - 01:22

 

Ben Hughesunwraped

— Major updates to INSTALL instructions.

Monday, 9th April 2012 - 20:42

 

Ben Hughesuttered

— Converted installation instructions to markdown.

Monday, 9th April 2012 - 20:45

 

Ben Hughesunwraped

— Fixed INSTALL.md code formatting.

Monday, 9th April 2012 - 20:49

 

Ben Hugheslet out

— Another INSTALL.md formatting fix.

Monday, 9th April 2012 - 20:50

 

Ben Hughesbabbled out

— Added bullets to dependencies section of INSTALL.md.

Monday, 9th April 2012 - 20:51

 

Ben Hughesdiscovered

— INSTALL.md formatting fix.

Monday, 9th April 2012 - 20:51

 

Ben Hughesconfessed

— Converted README file to markdown.

Monday, 9th April 2012 - 20:53

 

Ben Hughesverbalised

— Formatting fix for README.md.

Monday, 9th April 2012 - 20:54

 

Ben Hughestalked

— Temporarily copying install/readme to placate cmake...

Monday, 9th April 2012 - 21:08

 

Pierre Marchanddivulged

— updated INSTALL files

Tuesday, 10th April 2012 - 23:50

 

Pierre Marchanduttered

— Store pointer in variable for inspection

Wednesday, 11th April 2012 - 17:12

 

Pierre Marchandpeached

— Avoid storing page pointers as they might become invalid

Wednesday, 11th April 2012 - 17:53

 

Pierre Marchandsaid

— Added a first prototype for a python plan reader

Thursday, 12th April 2012 - 10:30

 

Pierre Marchandverbalised

— Make old GCC happier

Thursday, 12th April 2012 - 10:39

 

Pierre Marchandunwraped

— More sophisticated python reader

Thursday, 12th April 2012 - 16:01

 

Pierre Marchandspoke

— Introduced Point mapping

Tuesday, 1st May 2012 - 11:26

 

Pierre Marchandsaid

— Added in JSON reader: relative dimensions and output page size computation

Tuesday, 1st May 2012 - 18:10

 

Pierre Marchandspilled the beans

— Added in JSON reader: support for bleed_extention (aka expand)

Wednesday, 2nd May 2012 - 11:47

 

Pierre Marchanddisclosed

— Removed bleed_extension

Wednesday, 2nd May 2012 - 16:32

 

Pierre Marchandbring out

— JSONReader: made cropbox the default clipping reference

Wednesday, 2nd May 2012 - 23:39

 

Pierre Marchandcried

— accept plan data on the command line + improved plan stream reading in JSON reader

Monday, 14th May 2012 - 18:16

 

Pierre Marchandclaimed

— fixes #2

Tuesday, 15th May 2012 - 07:48

 

Pierre Marchandargued

— Should fix #3

Tuesday, 22nd May 2012 - 13:08

 

Pierreverbalized

— Avoid formation of invalid tokens when concatenating content streams

Wednesday, 20th June 2012 - 01:45

 

Pierre Marchandexpressed

— ReaderPython - Added translation point as the base point for rotation.
It simplifies a lot rotation computation for intuitive plan composition,
but possibily brings limitations.

Saturday, 12th January 2013 - 12:25

 

Pierre Marchandsaid

— Added a sample python plan, note that it's still a prototype

Wednesday, 8th May 2013 - 10:03

 

Pierre Marchandlet the cat out of the bag

— updated boost.filesystem dependency

Friday, 16th October 2015 - 11:26

 

Pierre Marchandtalked

— fixed newer versions of GMP do not implicitly cast mpf_class to double

Tuesday, 5th January 2016 - 15:50