NAME

PDF::pdf2json - helper module to retrieve data from pdf2json

VERSION

version 0.002

SYNOPSIS

  my $data = PDF::pdf2json->pdf2json( '/path/to/file.pdf' );
  # [
  #    {
  #       "number" : 1,
  #       "pages" : 3,
  #       "width" : 918,
  #       "height" : 1188,
  #       "fonts" : [
  #          {
  #             "fontspec" : "0",
  #             "family" : "Times",
  #             "size" : "12",
  #             "color" : "#000000"
  #          }
  #       ],
  #       "text" : [
  #          {
  #             "top" : 192,
  #             "left" : 223,
  #             "width" : 24,
  #             "height" : 13,
  #             "font" : 0,
  #             "data" : "test"
  #          },
  #          {
  #             "top" : 1044,
  #             "left" : 455,
  #             "width" : 7,
  #             "height" : 13,
  #             "font" : 0,
  #             "data" : "1"
  #          }
  #       ]
  #    },
  #    # ... more data for each page of the PDF
  # ]

METHODS

pdf2json($pdf_file_name, %param)

    my $pdf2json_data = PDF::pdf2json->pdf2json( "file.pdf", page => 1 );

Parameters you can pass in:

page: integer of single page to process (1-based)

If this parameter is not specified, all pages will be returned.

quiet: boolean to switch the quiet flag for pdf2json (-q)

Default is true.

SEE ALSO

AUTHOR

Zakariyya Mughal <zmughal@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Zakariyya Mughal.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.