0.6.2
This commit is contained in:
25
leaf.php
25
leaf.php
@@ -2,7 +2,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Leaf - Tools for Book Scans
|
// Leaf - Tools for Book Scans
|
||||||
$version = "0.6.1";
|
$version = "0.6.2";
|
||||||
$time_start = microtime(true);
|
$time_start = microtime(true);
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
@@ -165,6 +165,26 @@ foreach ($files as $file) {
|
|||||||
|
|
||||||
fin();
|
fin();
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Makepdf: combine finished images into a pdf with python img2pdf
|
||||||
|
//////////////////////
|
||||||
|
} elseif (args("app") == "makepdf") {
|
||||||
|
echo Welcome("Combine images into pdf");
|
||||||
|
/////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$input = args("dir")."*.*";
|
||||||
|
$dest = basename(getcwd()).".pdf";
|
||||||
|
if (file_exists($dest)) {
|
||||||
|
$dest = basename(getcwd())."_".rand(1000,9999).".pdf";
|
||||||
|
if (file_exists($dest)) { msg("Freak accident",1); }
|
||||||
|
}
|
||||||
|
echo "Creating pdf...\n\n";
|
||||||
|
exec("img2pdf --verbose --viewer-page-layout twocolumnright --output ".$dest." ".$input);
|
||||||
|
msg("Press return to open in Acrobat",2);
|
||||||
|
exec("open ".$dest." -b com.adobe.Acrobat");
|
||||||
|
|
||||||
|
fin();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// DPIset: batch set resolution tags
|
// DPIset: batch set resolution tags
|
||||||
//////////////////////
|
//////////////////////
|
||||||
@@ -654,4 +674,7 @@ echo "\nFinished! Press return to open all files in Photoshop\n";
|
|||||||
fgets(fopen("php://stdin","r"));
|
fgets(fopen("php://stdin","r"));
|
||||||
exec("open ".implode(" ",$files)." -b com.adobe.Photoshop");
|
exec("open ".implode(" ",$files)." -b com.adobe.Photoshop");
|
||||||
|
|
||||||
|
// check bridge labels
|
||||||
|
// for i in *; do exiftool -s -s -s -Label $i; done
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user