EBook-Generator

 view release on metacpan or  search on metacpan

lib/EBook/Generator/Exporter/PDF.pm  view on Meta::CPAN

	# create pdf
	print "creating pdf...";

	my $cmd =
		# temporarily set path of local texmf tree to make
		# it able to find garamond files ;)
		'cd "'.$tmpdir->dirname().'"; '.
		"TEXMFHOME='".$self->{'options'}->{'local-tex-tree-path'}."' ".
		#EBook::Generator::Parser::getCommandPath('pdflatex').' '.
		(-f '/usr/bin/pdflatex' ? '/usr/bin/pdflatex' : '/usr/texbin/pdflatex ').' '.
		($ebook->{'options'}->{'debug'} == 1 ? () : '-interaction=batchmode').' '.
		'main.tex'.
		' 2>&1';
		#' > /dev/null 2>&1';
		
	my $output  = `$cmd`;
	   $output .= `$cmd` if $self->{'has-section'}; # second time for table-of-contents
		
	# copy pdf to final place
	my $pdf_filename   = $tmpdir->dirname().'/main.pdf';	
  my $final_filename = $self->{'final-dir'}.$ebook->{'meta'}->{'title'}.'.pdf';



( run in 0.235 second using v1.01-cache-2.11-cpan-8d75d55dd25 )