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
a8e798db
Commit
a8e798db
authored
Oct 04, 2021
by
AP matsuo koji
😲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CSRender Readme.txt更新。/Resultファイル情報追加
parent
6f700b7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
17 deletions
+29
-17
CSRender_ReadMe.txt
CSRender/CSRender_ReadMe.txt
+5
-0
Program.cs
CSRender/Program.cs
+24
-17
CSRender.exe
bin/Release/CSRender.exe
+0
-0
No files found.
CSRender/CSRender_ReadMe.txt
View file @
a8e798db
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画像を出力
...
...
CSRender/Program.cs
View file @
a8e798db
...
...
@@ -105,14 +105,16 @@ For more information,see /H /? or /?
[Basic Rendering] 基本的なレンダリング
{
pgName
}
[/<Render Options>] <PDFPath|PDFDir>
/F <pdfPath|pdfDir> : pdfPath(pdfファイル名|ディレクトリ) /Fは省略可能
/O <output directory> : 出力ディレクトリ。省略時は""IMG""フォルダ
/O|Output <output directory> : 出力ディレクトリ。
省略時はPDF指定の場合は同一階層の"".IMG""フォルダ。
ディレクトリ指定の場合は""<ディレクトリ名>.IMG""、差分画像は""<ディレクトリ名>.DiffImage""。
[Render Options] レンダリングオプション
/D <解像度> : 解像度指定 9 - 300dpi(default=72dpi)
/D
|Dpi
<解像度> : 解像度指定 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> : ページの範囲を指定する(省略時は全ページ)
/P
|Page
<PageRange> : ページの範囲を指定する(省略時は全ページ)
連続した範囲を指定する場合は、ハイフン('-')を用いる。終了側を省略すると最終pageまで。
複数のページを指定する場合は、カンマ(',')を用いる
Ex. /P ""1,2,30-100"" //1,2pages and 30-100pages.
...
...
@@ -122,26 +124,26 @@ For more information,see /H /? or /?
/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
[Obs]
/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] 比較用ハッシュ値作成コマンド
{
pgName
}
/MkHash ...<Render Options>... <PDF|PDF dir>
/MKHash : ハッシュ値を出力する。前記の[Render Options]を指定すること
[HASHファイル作成]
[Compare command] 比較コマンド
{
pgName
}
/FC ...<Render Options>...
<Target PDF|PDF dir>
<Reference PDF|PDF dir>
{
pgName
}
/FC ...<Render Options>...
[/F]<Target PDF|PDF dir> [/Ref|Refernce]
<Reference PDF|PDF dir>
/FC : 2つのPDFを比較する。前記の[Render Options]を指定すること。無名引数が2つ必要です
事前に/MkHashを実行しておくことで高速に処理できる
/RESULT <result file> : 比較結果を格納するファイルパス
/Ref|Reference <<Reference PDF|PDF dir>> : 比較ファイル指定
/Result <result file> : 比較結果を格納するファイルパス
/FCコマンドを指定すると一致したら0,不一致なら1を返却するようになる
<result file>は、<pageNum(1始まり)>,<[OK] or [@Difference]>の行で構成される
[ELSE ] その他のオプション
/NoExeSepa :実行分離しない(遅い)
/Para <プロセス並行数>:本Exeの並行数を指定(デフォルト4)
/ParaPage <ページ処理スレッド数>:ページ処理のスレッド数を指定(デフォルト4)
[obs]/NoExeSepa :実行分離しない(遅い)
/H or /? : This help"
);
// HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
...
...
@@ -201,9 +203,11 @@ For more information,see /H /? or /?
return
-
1
;
}
else
if
(
isOpt
(
"/F"
))
{
pm
.
pdfPath
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
}
else
if
(
isOpt
(
"/O"
))
{
}
else
if
(
isOpt
(
"/Ref"
,
"/Reference"
))
{
pm
.
pdfPathRef
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
}
else
if
(
isOpt
(
"/O"
,
"/Output"
))
{
pm
.
outuptImageDir
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
}
else
if
(
isOpt
(
"/D"
))
{
}
else
if
(
isOpt
(
"/D"
,
"/DPI"
))
{
pm
.
dpi
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
if
(!
double
.
TryParse
(
pm
.
dpi
,
out
double
dmy
))
{
Console
.
WriteLine
(
$"解像度が不正です:/D
{
pm
.
dpi
}
"
);
...
...
@@ -220,11 +224,11 @@ For more information,see /H /? or /?
}
else
if
(
isOpt
(
"/ParaPage"
))
{
string
paraNum
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
if
(!
int
.
TryParse
(
paraNum
,
out
pm
.
paraPage
)){
Console
.
WriteLine
(
$"並行数(ページスレッド数が不正です:/
p
araPage
{
paraNum
}
"
);
Console
.
WriteLine
(
$"並行数(ページスレッド数が不正です:/
P
araPage
{
paraNum
}
"
);
DispHelpNoArg
();
return
-
1
;
}
}
else
if
(
isOpt
(
"/P"
))
{
}
else
if
(
isOpt
(
"/P"
,
"/Page"
))
{
pm
.
pageRange
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
""
;
// next word.
}
else
if
(
isOpt
(
"/JPG"
,
"/JPEG"
))
{
pm
.
imageType
=
"JPG"
;
...
...
@@ -277,8 +281,6 @@ For more information,see /H /? or /?
var
arg
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
"True"
;
// next word.
string
[]
sel
=
{
"True"
,
"1"
,
"ON"
};
pm
.
bVerbose
=
sel
.
Contains
(
arg
,
eIgnoreCase
);
}
else
if
(
isOpt
(
"/SubExe"
))
{
pm
.
subExe
=
(
qu
.
Count
>
0
)
?
qu
.
Dequeue
()
:
null
;
// next word.
var
sp
=
pm
.
subExe
.
Split
(
':'
);
...
...
@@ -600,6 +602,7 @@ For more information,see /H /? or /?
if
(
!
loopResult
.
IsCompleted
)
{
Console
.
WriteLine
(
"Abort!"
);
pm
.
bMkHash
=
false
;
// Hash値保存抑制
ret
=-
1
;
}
////tokenSource.Cancel();// 処理のキャンセル
//if ( tokenSource.IsCancellationRequested ) {
...
...
@@ -674,6 +677,9 @@ For more information,see /H /? or /?
watch
.
Stop
();
var
SummaryResult
=
$"\n[結果]\n"
;
SummaryResult
+=
$"Args =
{
argsStr
}
\n"
;
SummaryResult
+=
$"Target =
{
pm
.
pdfPath
}
\n"
;
SummaryResult
+=
$"Reference=
{
pm
.
pdfPathRef
}
\n"
;
SummaryResult
+=
$"不整合ファイル群=
{
pdfPathLstNoBoth
.
Count
()}
\n"
;
foreach
(
var
f
in
pdfPathLstNoBoth
)
{
SummaryResult
+=
$"\tWarning [no match]=
{
f
}
\n"
;
...
...
@@ -688,7 +694,8 @@ For more information,see /H /? or /?
File
.
WriteAllText
(
Path
.
GetFullPath
(
pm
.
resultPath
),
(
SummaryResult
+
rData
));
}
echo
(
$"****************[終了]セパのFCモード***
{
argsStr
}
***************"
);
}
else
{
// NoExeSepa
ret
=
noMatchPageNum
;
// 返値 0:OK,!0=不一致Page数
}
else
{
// NoExeSepa -> Obsolate
echo
(
$@"****************NoExeSepa*****
{
argsStr
}
**************"
);
if
(
pm
.
resultPath
!=
""
)
{
// 初期化
File
.
WriteAllText
(
Path
.
GetFullPath
(
pm
.
resultPath
),
""
);
...
...
@@ -736,7 +743,7 @@ For more information,see /H /? or /?
}
watch
.
Stop
();
Console
.
WriteLine
(
$"result=
{
ret
}
,time=
{
watch
.
ElapsedMilliseconds
/
1000.0
}
[sec]"
);
return
ret
;
//success.
return
ret
;
//success.
// 返値 0:OK,!0=不一致Page数
}
// リソースからの取得
...
...
bin/Release/CSRender.exe
View file @
a8e798db
No preview for this file type
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