Group
Extension

Matches 1

PDF-pdf2json ( Z/ZM/ZMUGHAL/PDF-pdf2json-0.002.tar.gz, ZMUGHAL, 2014; MetaCPAN )
PDF-pdf2json/lib/PDF/pdf2json.pm ( view source; MetaCPAN )
F::pdf2json;
# ABSTRACT: helper module to retrieve data from pdf2json
$PDF::pdf2json::VERSION = '0.002';
use strict;
use warnings;

use File::Temp;
use Path::Class;
use Alien::pdf2json;
use JSON::Mayb
eXS;

our $alien = Alien::pdf2json->new;

sub pdf2json {
	my ($self, $pdf, %param) = @_;
	$param{quiet} //= 1;

	my $temp_fh = File::Temp->new ( UNLINK => 0 );
	my @args = ();
	if( exists $param{page}
		$alien->pdf2json_path,
		'-enc', 'UTF-8',
		@args,
		$pdf,
		$temp_fh->filename,
	];
	my $ret = system( @$cmd  );
	die "pdf2json failed" if $ret;

	# read data from temp file
	my $json_data = file( 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.