App-12567834

 view release on metacpan or  search on metacpan

12567834  view on Meta::CPAN

#!/usr/bin/perl
use 5.034 ; use warnings ; 
use Time::HiRes qw [ gettimeofday tv_interval ] ;
my ${ dt_start } = [ gettimeofday ] ; 
use Encode qw[ decode_utf8 encode_utf8 ] ; 
use Getopt::Std ; getopts ',c:2:b:p' , \my %o  ; 
use Term::ANSIColor qw[ color :constants ] ; $Term::ANSIColor::AUTORESET = 1 ;
use FindBin qw[ $Script ] ; 
use List::Util qw[ min max uniq ] ; 
use utf8 ; 
use Scalar::Util qw[ looks_like_number ] ; 

no warnings ; 
* d3 = sub { $_[0] =~ s/(?<=\d)(?=(\d\d\d)+($|\D))/,/gr } ;
use warnings ; 

$ARGV[0] //= 8 ; 
$o{c} //= 100 ;  # 「ページ指定」受付最大文字列長さ
$o{b} //= 1 ; 
 # 入力ファイルがもしもAdobe生成されたときに「ページサイズと処理」で「複数」の指定を受けたあとだったときに

12567834  view on Meta::CPAN

  use FindBin qw[ $Script ] ; 
  $ARGV[1] //= '' ;
  open my $FH , '<' , $0 ;
  while(<$FH>){
    s/\$0/$Script/g ;
    print $_ if s/^=head1// .. s/^=cut// and $ARGV[1] =~ /^o(p(t(i(o(ns?)?)?)?)?)?$/i ? m/^\s+\-/ : 1;
  }
  close $FH ;
  exit 0 ;
}
=encoding utf8

=head1 $0 

12567834 NUMBER_OF_PAGES
12567834 N1 N2 
12567834 N1-N2
   NUMER_OF_PAGES は、出力したい元のPDFファイルのページ数である。1始まりを仮定。
   N1 と N2 は、最初のページ番号 と 最後のページ番号である。

  Adobe Acrobat Reader 等のソフトウェアで PDFファイルの「小冊子」印刷をする時に、

12567834.pm  view on Meta::CPAN

package App::12567834 ;  
our $VERSION = '0.022' ; 
our $DATE = '2025-04-17T20:00+09:00' ; 

=encoding utf8

=head1 NAME

App::12567834 - Adobe等のソフトで小冊子印刷のページ指定時に、1枚印刷するごとに元のPDFから順に4ページずつになるようにする。
When specifying pages for booklet printing in software such as Adobe, 
arrange the pages so that every printed sheet contains four pages 
from the original PDF in sequential order.


=head1 SYNOPSIS



( run in 1.087 second using v1.01-cache-2.11-cpan-49f99fa48dc )