Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: b9da8ebedd
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (26 sloc) 0.771 kB
PDFObjectStore - stores the object heirarchy for the PDF document
By Devon Govett
PDFReference = require './reference'
class PDFObjectStore
constructor: ->
@objects = {}
@length = 0
@root = @ref
Type: 'Catalog'
Pages: @ref
Type: 'Pages'
Count: 0
Kids: []
@pages =['Pages']
ref: (data) ->
@push ++@length, data
push: (id, data) ->
ref = new PDFReference(id, data)
@objects[id] = ref
return ref
addPage: (page) ->['Kids'].push(page.dictionary)['Count']++
module.exports = PDFObjectStore
Jump to Line
Something went wrong with that request. Please try again.