Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.Lims.ReportPrinter
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
陶然
Kivii.Client.Lims.ReportPrinter
Commits
cc57d2a4
Commit
cc57d2a4
authored
Nov 06, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印参数调整,提高打印质量,但会降低打印速度
parent
0082aceb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
25 deletions
+61
-25
App.config
Src/App.config
+5
-5
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+0
-0
FrmMain.cs
Src/FrmMain.cs
+38
-3
Kivii.Client.Lims.ReportPrinter.V4.0.csproj
Src/Kivii.Client.Lims.ReportPrinter.V4.0.csproj
+10
-10
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+2
-2
packages.config
Src/packages.config
+6
-5
No files found.
Src/App.config
View file @
cc57d2a4
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configuration
>
<
connectionStrings
>
<!--<
add
name
=
"Database"
providerName
=
"Sqlite"
connectionString
=
"$ROOT\AppData\primary.sqlite"
/>-->
<
connectionStrings
>
</
connectionStrings
>
<!--<
add
name
=
"Database"
providerName
=
"Sqlite"
connectionString
=
"$ROOT\AppData\primary.sqlite"
/>-->
</
configuration
>
</
connectionStrings
></
configuration
>
\ No newline at end of file
\ No newline at end of file
Src/FrmMain.Designer.cs
View file @
cc57d2a4
This diff is collapsed.
Click to expand it.
Src/FrmMain.cs
View file @
cc57d2a4
...
@@ -464,22 +464,57 @@ namespace Kivii.Client.Lims.ReportPrinter
...
@@ -464,22 +464,57 @@ namespace Kivii.Client.Lims.ReportPrinter
//args.Add($"-sOutputFile=%printer%{ _printerSettings.PrinterName}");
//args.Add($"-sOutputFile=%printer%{ _printerSettings.PrinterName}");
//args.Add(printFilePath);
//args.Add(printFilePath);
#
endregion
#
endregion
//List<string> args = new List<string>();
//args.Add("");
//args.Add("-dQUIET");
//args.Add("-dNOPAUSE");
//args.Add("-dPDFFitPage");
//args.Add("-dBATCH");
//if (cbxFirstPage.Checked)
//{
// args.Add("-dFirstPage=1");
// args.Add("-dLastPage=1");
//}
//args.Add("-c");
//args.Add($"\"mark /NoCancel true /BitsPerPixel 8 /OutputFile(%printer%{_printerSettings.PrinterName}) /QueryUser 3 /UserSettings<</DocumentName ({job.Title}) /MaxResolution 320>>(mswinpr2) finddevice putdeviceprops setdevice\"");
//args.Add("-f");
//args.Add($"\"{printFilePath}\"");
List
<
string
>
args
=
new
List
<
string
>();
List
<
string
>
args
=
new
List
<
string
>();
args
.
Add
(
""
);
// 基本打印配置
args
.
Add
(
""
);
// 占位符
args
.
Add
(
"-dQUIET"
);
args
.
Add
(
"-dQUIET"
);
args
.
Add
(
"-dNOPAUSE"
);
args
.
Add
(
"-dNOPAUSE"
);
args
.
Add
(
"-dPDFFitPage"
);
args
.
Add
(
"-dPDFFitPage"
);
// 页面适配
// 提高分辨率和颜色深度
args
.
Add
(
"-dBATCH"
);
args
.
Add
(
"-dBATCH"
);
//args.Add("-dMaxResolution=600"); // 提高分辨率到600 dpi
//args.Add("-dBitsPerPixel=24"); // 提高颜色深度
// 增强抗锯齿效果
args
.
Add
(
"-dTextAlphaBits=4"
);
// 提升文字抗锯齿效果
args
.
Add
(
"-dGraphicsAlphaBits=4"
);
// 提升图像抗锯齿效果
// 选择打印的页面范围(若只打印第一页)
if
(
cbxFirstPage
.
Checked
)
if
(
cbxFirstPage
.
Checked
)
{
{
args
.
Add
(
"-dFirstPage=1"
);
args
.
Add
(
"-dFirstPage=1"
);
args
.
Add
(
"-dLastPage=1"
);
args
.
Add
(
"-dLastPage=1"
);
}
}
// 打印设备配置
args
.
Add
(
"-c"
);
args
.
Add
(
"-c"
);
args
.
Add
(
$"\"mark /NoCancel true /BitsPerPixel 8 /OutputFile(%printer%
{
_printerSettings
.
PrinterName
}
) /QueryUser 3 /UserSettings<</DocumentName (
{
job
.
Title
}
) /MaxResolution 320>>(mswinpr2) finddevice putdeviceprops setdevice\""
);
args
.
Add
(
$"\"mark /NoCancel true /BitsPerPixel 24 /OutputFile(%printer%
{
_printerSettings
.
PrinterName
}
) /QueryUser 3 /UserSettings<</DocumentName (
{
job
.
Title
}
) /MaxResolution 320>>(mswinpr2) finddevice putdeviceprops setdevice\""
);
// 指定要打印的文件
args
.
Add
(
"-f"
);
args
.
Add
(
"-f"
);
args
.
Add
(
$"\"
{
printFilePath
}
\""
);
args
.
Add
(
$"\"
{
printFilePath
}
\""
);
// 调用执行命令
// 例如:Process.Start("path_to_ghostscript", string.Join(" ", args));
//string s = string.Join(" ", args.ToArray());
//string s = string.Join(" ", args.ToArray());
//isPrintSucceed |= Kivii.GhostScript.Tools.Run(args.ToArray()) == 0;
//isPrintSucceed |= Kivii.GhostScript.Tools.Run(args.ToArray()) == 0;
...
...
Src/Kivii.Client.Lims.ReportPrinter.V4.0.csproj
View file @
cc57d2a4
...
@@ -44,23 +44,23 @@
...
@@ -44,23 +44,23 @@
<ApplicationManifest>
Properties\app.manifest
</ApplicationManifest>
<ApplicationManifest>
Properties\app.manifest
</ApplicationManifest>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"Kivii.Common.V4.0, Version=5.6.2024.1
16
0, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.Common.V4.0, Version=5.6.2024.1
024
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
packages\Kivii.Common.5.6.2024.116
0\lib\net40\Kivii.Common.V4.0.dll
</HintPath>
<HintPath>
..\..\packages\Kivii.Common.5.6.2024.1024
0\lib\net40\Kivii.Common.V4.0.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"Kivii.Core.V4.0, Version=5.6.202
3.9
000, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.Core.V4.0, Version=5.6.202
4.10
000, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
packages\Kivii.Core.5.6.2023.9
000\lib\net40\Kivii.Core.V4.0.dll
</HintPath>
<HintPath>
..\..\packages\Kivii.Core.5.6.2024.10
000\lib\net40\Kivii.Core.V4.0.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"Kivii.GhostScript.V4.0, Version=5.5.2021.2010, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.GhostScript.V4.0, Version=5.5.2021.2010, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
packages\Kivii.GhostScript.5.5.2021.2010\lib\net40\Kivii.GhostScript.V4.0.dll
</HintPath>
<HintPath>
packages\Kivii.GhostScript.5.5.2021.2010\lib\net40\Kivii.GhostScript.V4.0.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"Kivii.Linq.Sqlite.V4.0, Version=5.6.202
3.3
000, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.Linq.Sqlite.V4.0, Version=5.6.202
4.7
000, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
packages\Kivii.Linq.Sqlite.5.6.2023.3
000\lib\net40\Kivii.Linq.Sqlite.V4.0.dll
</HintPath>
<HintPath>
..\..\packages\Kivii.Linq.Sqlite.5.6.2024.7
000\lib\net40\Kivii.Linq.Sqlite.V4.0.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"Kivii.Linq.V4.0, Version=5.6.2024.
2
000, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.Linq.V4.0, Version=5.6.2024.
10
000, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
packages\Kivii.Linq.5.6.2024.2
000\lib\net40\Kivii.Linq.V4.0.dll
</HintPath>
<HintPath>
..\..\packages\Kivii.Linq.5.6.2024.10
000\lib\net40\Kivii.Linq.V4.0.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"Kivii.Pdf.V4.0, Version=5.6.202
2.122
00, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.Pdf.V4.0, Version=5.6.202
4.70
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
packages\Kivii.Pdf.5.6.2022.122
00\lib\net40\Kivii.Pdf.V4.0.dll
</HintPath>
<HintPath>
..\..\packages\Kivii.Pdf.5.6.2024.70
00\lib\net40\Kivii.Pdf.V4.0.dll
</HintPath>
</Reference>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Core"
/>
...
...
Src/Properties/AssemblyInfo.cs
View file @
cc57d2a4
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.
914
0")]
[assembly: AssemblyVersion("5.4.2024.
1106
0")]
[assembly: AssemblyFileVersion("5.4.2024.
914
0")]
[assembly: AssemblyFileVersion("5.4.2024.
1106
0")]
Src/packages.config
View file @
cc57d2a4
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
packages
>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2024.1
16
0"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2024.1
024
0"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.202
3.9
000"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.202
4.10
000"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.GhostScript"
version
=
"5.5.2021.2010"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.GhostScript"
version
=
"5.5.2021.2010"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.2024.
2
000"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.2024.
10
000"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Linq.Sqlite"
version
=
"5.6.202
3.3
000"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Linq.Sqlite"
version
=
"5.6.202
4.7
000"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Pdf"
version
=
"5.6.202
2.122
00"
targetFramework
=
"net40"
/>
<
package
id
=
"Kivii.Pdf"
version
=
"5.6.202
4.70
00"
targetFramework
=
"net40"
/>
</
packages
>
</
packages
>
\ No newline at end of file
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