Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KenPanCS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QCD
Tools
KenPanCS
Commits
f236a640
Commit
f236a640
authored
May 08, 2022
by
AP matsuo koji
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ヘルプ修正
- Target ,Verboseの明記
parent
1273d2ed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
81 deletions
+107
-81
Program.cs
CSRender/Program.cs
+17
-11
CSRender_ReadMe.adoc
CSRender_ReadMe.adoc
+90
-0
CSRender_ReadMe.txt
CSRender_ReadMe.txt
+0
-70
No files found.
CSRender/Program.cs
View file @
f236a640
...
@@ -127,23 +127,24 @@ For more information,see /H /? or /?
...
@@ -127,23 +127,24 @@ For more information,see /H /? or /?
[Obs]/PDFium <0or1>: GoogoleのPDFiumViewerエンジンを使用する(default=1>
[Obs]/PDFium <0or1>: GoogoleのPDFiumViewerエンジンを使用する(default=1>
[未]/BM,/BT,/BA,/BA,/BC: Select one box.(default=/BC:CrobBox): Boxies:MediaBox/BleedBox/TrimBox/ArtBox/CropBox
[未]/BM,/BT,/BA,/BA,/BC: Select one box.(default=/BC:CrobBox): Boxies:MediaBox/BleedBox/TrimBox/ArtBox/CropBox
[Make Hash command] 比較用ハッシュ値作成コマンド
[Make Hash command]
/MkHash
比較用ハッシュ値作成コマンド
{
pgName
}
/MkHash ...<Render Options>... <PDF|PDF dir>
{
pgName
}
/MkHash ...<Render Options>... <PDF|PDF dir>
/MKHash : ハッシュ値を出力する。前記の[Render Options]を指定すること
/MKHash : ハッシュ値を出力する。前記の[Render Options]を指定すること
[Compare command] 比較コマンド
[Compare command]
/Fc
比較コマンド
{
pgName
}
/F
C ...<Render Options>... [/F]
<Target PDF|PDF dir> [/Ref|Refernce] <Reference PDF|PDF dir>
{
pgName
}
/F
c ...<Render Options>... [/Tgt|Target]
<Target PDF|PDF dir> [/Ref|Refernce] <Reference PDF|PDF dir>
/FC : 2つのPDFを比較する。前記の[Render Options]を指定すること。無名引数が2つ必要です
/FC : 2つのPDFを比較する。前記の[Render Options]を指定すること。無名引数が2つ必要です
事前に/MkHashを実行しておくことで高速に処理できる
事前に/MkHashを実行しておくことで高速に処理できる
/Ref|Reference <<Reference PDF|PDF dir>> : 比較ファイル指定
/Tgt|Target <<Target PDF|PDF dir>> : ターゲットファイル指定
/Ref|Reference <<Reference PDF|PDF dir>> : リファレンスファイル指定(比較先)
/Result <result file> : 比較結果を格納するファイルパス
/Result <result file> : 比較結果を格納するファイルパス
/FCコマンドを指定すると一致したら0,不一致なら1を返却するようになる
/FCコマンドを指定すると一致したら0,不一致なら1を返却するようになる
<result file>は、<pageNum(1始まり)>,<[OK] or [@Difference]>の行で構成される
<result file>は、<pageNum(1始まり)>,<[OK] or [@Difference]>の行で構成される
[ELSE
] その他のオプション
[ELSE] その他のオプション
/Para <プロセス並行数>:本Exeの並行数を指定(デフォルト4)
/Para
:
<プロセス並行数>:本Exeの並行数を指定(デフォルト4)
/ParaPage <ページ処理スレッド数>:ページ処理のスレッド数を指定(デフォルト4)
/ParaPage
:
<ページ処理スレッド数>:ページ処理のスレッド数を指定(デフォルト4)
/Verbose : 詳細表示
/Verbose
[True|1]
: 詳細表示
[obs]/NoExeSepa :実行分離しない(遅い)
[obs]/NoExeSepa :実行分離しない(遅い)
/H or /? : This help"
);
/H or /? : This help"
);
...
@@ -202,7 +203,7 @@ For more information,see /H /? or /?
...
@@ -202,7 +203,7 @@ For more information,see /H /? or /?
if
(
isOpt
(
"/?"
,
"/H"
,
"/Help"
))
{
if
(
isOpt
(
"/?"
,
"/H"
,
"/Help"
))
{
DispHelpDetail
();
DispHelpDetail
();
return
-
1
;
return
-
1
;
}
else
if
(
isOpt
(
"/F"
))
{
}
else
if
(
isOpt
(
"/F"
,
"/Tgt"
,
"/Target"
))
{
pm
.
pdfPath
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
pm
.
pdfPath
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
}
else
if
(
isOpt
(
"/Ref"
,
"/Reference"
))
{
}
else
if
(
isOpt
(
"/Ref"
,
"/Reference"
))
{
pm
.
pdfPathRef
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
pm
.
pdfPathRef
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
...
@@ -279,7 +280,7 @@ For more information,see /H /? or /?
...
@@ -279,7 +280,7 @@ For more information,see /H /? or /?
return
-
1
;
return
-
1
;
}
}
}
else
if
(
isOpt
(
"/Verbose"
))
{
}
else
if
(
isOpt
(
"/Verbose"
))
{
var
arg
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
(
)
:
"True"
;
// next word.
var
arg
=
(
qu
.
Count
>
0
)
?
(!
qu
.
Peek
().
StartsWith
(
"/"
)?
qu
.
Dequeue
()
:
"True"
)
:
"True"
;
// next word.
string
[]
sel
=
{
"True"
,
"1"
,
"ON"
};
string
[]
sel
=
{
"True"
,
"1"
,
"ON"
};
pm
.
bVerbose
=
sel
.
Contains
(
arg
,
eIgnoreCase
);
pm
.
bVerbose
=
sel
.
Contains
(
arg
,
eIgnoreCase
);
}
else
if
(
isOpt
(
"/SubExe"
))
{
}
else
if
(
isOpt
(
"/SubExe"
))
{
...
@@ -353,7 +354,7 @@ For more information,see /H /? or /?
...
@@ -353,7 +354,7 @@ For more information,see /H /? or /?
bDirMode
=
true
;
bDirMode
=
true
;
pdfPathLst
=
System
.
IO
.
Directory
.
GetFiles
(
pm
.
pdfPath
,
"*.pdf"
/*, System.IO.SearchOption.AllDirectories*/
);
pdfPathLst
=
System
.
IO
.
Directory
.
GetFiles
(
pm
.
pdfPath
,
"*.pdf"
/*, System.IO.SearchOption.AllDirectories*/
);
pdfPathLst
=
Array
.
ConvertAll
(
pdfPathLst
,
f
=>
Path
.
GetFileName
(
f
));
pdfPathLst
=
Array
.
ConvertAll
(
pdfPathLst
,
f
=>
Path
.
GetFileName
(
f
));
// 配列書き換え
(ファイル名のみにする
// 配列書き換え
(ファイル名のみにする)
// var enumLst = pdfPathLst.Select(f => Path.GetFileName(f)); LINQ式に置き換えることも可能(返り値は配列ではない)
// var enumLst = pdfPathLst.Select(f => Path.GetFileName(f)); LINQ式に置き換えることも可能(返り値は配列ではない)
//foreach ( var f in pdfPathLst) {
//foreach ( var f in pdfPathLst) {
// Console.WriteLine($@"path1={f}");
// Console.WriteLine($@"path1={f}");
...
@@ -378,6 +379,11 @@ For more information,see /H /? or /?
...
@@ -378,6 +379,11 @@ For more information,see /H /? or /?
Console
.
WriteLine
(
$"比較ファイルが存在しません:
{
pm
.
pdfPathRef
}
"
);
Console
.
WriteLine
(
$"比較ファイルが存在しません:
{
pm
.
pdfPathRef
}
"
);
return
-
1
;
return
-
1
;
}
}
// 同一フォルダorファイルの禁止
if
(
Path
.
GetFullPath
(
pm
.
pdfPath
).
Equals
(
Path
.
GetFullPath
(
pm
.
pdfPathRef
),
StringComparison
.
OrdinalIgnoreCase
)
){
Console
.
WriteLine
(
"ターゲットとリファレンスが同一です"
);
return
-
1
;
}
bool
bDir2
=
File
.
GetAttributes
(
pm
.
pdfPathRef
).
HasFlag
(
FileAttributes
.
Directory
);
bool
bDir2
=
File
.
GetAttributes
(
pm
.
pdfPathRef
).
HasFlag
(
FileAttributes
.
Directory
);
if
(
bDir2
)
{
if
(
bDir2
)
{
if
(!
bDir
)
{
if
(!
bDir
)
{
...
...
CSRender_ReadMe.adoc
0 → 100644
View file @
f236a640
:lang: ja
include::config.adoc[]
:toc: left
{ExtendStyle}
// After need empty-one-line
= CSRenderCLI Readme
[.text-right]
--
2022/05/08
--
== Change Log
* V1.3.2.x:2022/05/08 :
- /fc時のhashFile異常時にhashFileを再作成する。PDFファイル更新をチェック
- /fc時のターゲットとリファレンスの同一パスを禁止
* V1.3.2.0:2021/12/20 :aRGB4チャンネル保存からRGB3チャンネルに変更
* V1.3.1.0:2021/10/04 :UWP用、Data.pdfの削除、整理
- UWP用コード削除。通常のファイルアクセスやMemoryStreamに変更
- Widnows RT Windows.Data.pdfの使用を削除.PDFiumのみとした
- /ParaPageオプション追加。PageRenderのスレッド数(Def=4)
- TIFF出力時のJpegのノイズ削除
* V1.3.0.4:2021/04/29 :Helpの記述抜け "/Result"の対応
* V1.3.0.3:2020/11/22 :/Result <比較結果> を実装。diff画像を出力
* V1.3.0.2:2020/07/11 :不具合修正
比較時に差異があるとクラッシュしていた。streamのフラッシュミス
* V1.3.0.1:2020/06/20 :不具合修正
2つのファイルの比較が常にOKになっていた可能性があるので修正
* V1.3.0.0:2020/06/10 :基本的なPDFの画像化(PNG,JPG)とPDFの比較を行えるもの
== Command-Line Parameters
以下、CSRender /? のヘルプ内容です
TestSampleフォルダに使用例がありますので合わせて参照のこと
CSRender.exe [/<Opts>] <PDFPath or PDFDir>
* Render of PDF file. available 3 command mode:[Basic Rendering] [Make Hash command] [Compare command], and [Render Options]
PDFの画像化は[Basic Rendering]。
比較は/MkHash([Make Hash command])後に、/FC([Compare command])で高速実行できます。
[Basic Rendering] 基本的なレンダリング
CSRender.exe [/<Render Options>] <PDFPath|PDFDir>
/F <pdfPath|pdfDir> : pdfPath(pdfファイル名|ディレクトリ) /Fは省略可能
/O <output directory> : 出力ディレクトリ。省略時は"IMG"フォルダ
[Render Options] レンダリングオプション
/D <解像度> : 解像度指定 9 - 300dpi(default=72dpi)
/JPG,/JPEG,/PNG,/TIF,/TIFF,/GIF,/BMP: Select one output format.(default=/JPG)
/JPEGQ <quality>: Jpegの品質指定1-100(default=91)
/P <PageRange> : ページの範囲を指定する(省略時は全ページ)
連続した範囲を指定する場合は、ハイフン('-')を用いる。終了側を省略すると最終pageまで。
複数のページを指定する場合は、カンマ(',')を用いる
Ex. /P "1,2,30-100" //1,2pages and 30-100pages.
[Unsupport] 未対応↓
/L <input List text> : 入力PDFファイルリスト(*unsupport)
/T <tempPath> : テンポラリフォルダを指定(省略時は出力先フォルダと同じ(*unsupport no need)
/OP <0|1> : オーバープリントのOn/Off (省略時は1)(*unsupport allways on[1])
/U <0|1> : 同名上書き設定 0:上書きしない 1:上書き(*unsupport allways overwrite[1])
/OFFSET <X> <Y> : ミリ単位でオフセットを指定する(省略時は共に0mm)(*unsupport)
/PDFium <0or1>: GoogoleのPDFiumViewerエンジンを使用する(default=1>
【未】/BM,/BT,/BA,/BA,/BC: Select one box.(default=/BC:CrobBox): Boxies:MediaBox/BleedBox/TrimBox/ArtBox/CropBox
[Make Hash command] 比較用ハッシュ値作成コマンド
CSRender.exe /MkHash ...<Render Options>... <PDF|PDF dir>
/MKHash : ハッシュ値を出力する。前記の[Render Options]を指定すること
[HASHファイル作成]
[Compare command] 比較コマンド
CSRender.exe /FC ...<Render Options>... <Target PDF|PDF dir> <Reference PDF|PDF dir>
/FC : 2つのPDFを比較する。前記の[Render Options]を指定すること。無名引数が2つ必要です
事前に/MkHashを実行しておくことで高速に処理できる
【未】/RESULT <result file> : 比較結果を格納するファイルパス
/FCコマンドを指定すると一致したら0,不一致なら1を返却するようになる
<result file>は、<pageNum(1始まり)>,<OK or NG>の行で構成される
[ELSE ] その他のオプション
/PDFium <0|1>:PDFiumライブラリを使う,デフォルト=1
/NoExeSepa :実行分離しない(遅い)
内部コマンド:/SubExe <WCF_PipeAddress> :実行分離,PDF単位で別Processで処理
/H or /? : This help
END
\ No newline at end of file
CSRender_ReadMe.txt
deleted
100644 → 0
View file @
1273d2ed
V1.3.2.0:2021/12/20 :aRGB4チャンネル保存からRGB3チャンネルに変更
V1.3.1.0:2021/10/04 :UWP用、Data.pdfの削除、整理
* UWP用コード削除。通常のファイルアクセスやMemoryStreamに変更
* Widnows RT Windows.Data.pdfの使用を削除.PDFiumのみとした
* /ParaPageオプション追加。PageRenderのスレッド数(Def=4)
* TIFF出力時のJpegのノイズ削除
V1.3.0.4:2021/04/29 :Helpの記述抜け "/Result"の対応
V1.3.0.3:2020/11/22 :/Result <比較結果> を実装。diff画像を出力
V1.3.0.2:2020/07/11 :不具合修正
比較時に差異があるとクラッシュしていた。streamのフラッシュミス
V1.3.0.1:2020/06/20 :不具合修正
2つのファイルの比較が常にOKになっていた可能性があるので修正
V1.3.0.0:2020/06/10 :基本的なPDFの画像化(PNG,JPG)とPDFの比較を行えるもの
以下、CSRender /? のヘルプ内容です]
TestSampleフォルダに使用例がありますので合わせて参照のこと
CSRender.exe [/<Opts>] <PDFPath or PDFDir>
* Render of PDF file. available 3 command mode:[Basic Rendering] [Make Hash command] [Compare command], and [Render Options]
PDFの画像化は[Basic Rendering]。
比較は/MkHash([Make Hash command])後に、/FC([Compare command])で高速実行できます。
[Basic Rendering] 基本的なレンダリング
CSRender.exe [/<Render Options>] <PDFPath|PDFDir>
/F <pdfPath|pdfDir> : pdfPath(pdfファイル名|ディレクトリ) /Fは省略可能
/O <output directory> : 出力ディレクトリ。省略時は"IMG"フォルダ
[Render Options] レンダリングオプション
/D <解像度> : 解像度指定 9 - 300dpi(default=72dpi)
/JPG,/JPEG,/PNG,/TIF,/TIFF,/GIF,/BMP: Select one output format.(default=/JPG)
/JPEGQ <quality>: Jpegの品質指定1-100(default=91)
/P <PageRange> : ページの範囲を指定する(省略時は全ページ)
連続した範囲を指定する場合は、ハイフン('-')を用いる。終了側を省略すると最終pageまで。
複数のページを指定する場合は、カンマ(',')を用いる
Ex. /P "1,2,30-100" //1,2pages and 30-100pages.
[Unsupport] 未対応↓
/L <input List text> : 入力PDFファイルリスト(*unsupport)
/T <tempPath> : テンポラリフォルダを指定(省略時は出力先フォルダと同じ(*unsupport no need)
/OP <0|1> : オーバープリントのOn/Off (省略時は1)(*unsupport allways on[1])
/U <0|1> : 同名上書き設定 0:上書きしない 1:上書き(*unsupport allways overwrite[1])
/OFFSET <X> <Y> : ミリ単位でオフセットを指定する(省略時は共に0mm)(*unsupport)
/PDFium <0or1>: GoogoleのPDFiumViewerエンジンを使用する(default=1>
【未】/BM,/BT,/BA,/BA,/BC: Select one box.(default=/BC:CrobBox): Boxies:MediaBox/BleedBox/TrimBox/ArtBox/CropBox
[Make Hash command] 比較用ハッシュ値作成コマンド
CSRender.exe /MkHash ...<Render Options>... <PDF|PDF dir>
/MKHash : ハッシュ値を出力する。前記の[Render Options]を指定すること
[HASHファイル作成]
[Compare command] 比較コマンド
CSRender.exe /FC ...<Render Options>... <Target PDF|PDF dir> <Reference PDF|PDF dir>
/FC : 2つのPDFを比較する。前記の[Render Options]を指定すること。無名引数が2つ必要です
事前に/MkHashを実行しておくことで高速に処理できる
【未】/RESULT <result file> : 比較結果を格納するファイルパス
/FCコマンドを指定すると一致したら0,不一致なら1を返却するようになる
<result file>は、<pageNum(1始まり)>,<OK or NG>の行で構成される
[ELSE ] その他のオプション
/PDFium <0|1>:PDFiumライブラリを使う,デフォルト=1
/NoExeSepa :実行分離しない(遅い)
内部コマンド:/SubExe <WCF_PipeAddress> :実行分離,PDF単位で別Processで処理
/H or /? : This help
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment