Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.GhostScript.Test
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.GhostScript.Test
Commits
8e952a00
Commit
8e952a00
authored
Jul 19, 2020
by
leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6680007f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
3 deletions
+59
-3
Form1.Designer.cs
Form1.Designer.cs
+54
-3
Form1.cs
Form1.cs
+5
-0
No files found.
Form1.Designer.cs
View file @
8e952a00
...
@@ -38,13 +38,18 @@
...
@@ -38,13 +38,18 @@
this
.
btnPrint
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnPrint
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cbxPrinter
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
cbxPrinter
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnRun
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
rtbArguments
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
textBox1
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// btnExportImage
// btnExportImage
//
//
this
.
btnExportImage
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
143
);
this
.
btnExportImage
.
Location
=
new
System
.
Drawing
.
Point
(
424
,
110
);
this
.
btnExportImage
.
Name
=
"btnExportImage"
;
this
.
btnExportImage
.
Name
=
"btnExportImage"
;
this
.
btnExportImage
.
Size
=
new
System
.
Drawing
.
Size
(
8
4
,
23
);
this
.
btnExportImage
.
Size
=
new
System
.
Drawing
.
Size
(
11
4
,
23
);
this
.
btnExportImage
.
TabIndex
=
0
;
this
.
btnExportImage
.
TabIndex
=
0
;
this
.
btnExportImage
.
Text
=
"导出图片"
;
this
.
btnExportImage
.
Text
=
"导出图片"
;
this
.
btnExportImage
.
UseVisualStyleBackColor
=
true
;
this
.
btnExportImage
.
UseVisualStyleBackColor
=
true
;
...
@@ -129,14 +134,55 @@
...
@@ -129,14 +134,55 @@
this
.
label3
.
TabIndex
=
4
;
this
.
label3
.
TabIndex
=
4
;
this
.
label3
.
Text
=
"选择打印机"
;
this
.
label3
.
Text
=
"选择打印机"
;
//
//
// btnRun
//
this
.
btnRun
.
Location
=
new
System
.
Drawing
.
Point
(
465
,
179
);
this
.
btnRun
.
Name
=
"btnRun"
;
this
.
btnRun
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
63
);
this
.
btnRun
.
TabIndex
=
9
;
this
.
btnRun
.
Text
=
"执行(RUN)"
;
this
.
btnRun
.
UseVisualStyleBackColor
=
true
;
this
.
btnRun
.
Click
+=
new
System
.
EventHandler
(
this
.
btnRun_Click
);
//
// rtbArguments
//
this
.
rtbArguments
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
rtbArguments
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
rtbArguments
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
17
);
this
.
rtbArguments
.
Name
=
"rtbArguments"
;
this
.
rtbArguments
.
Size
=
new
System
.
Drawing
.
Size
(
420
,
300
);
this
.
rtbArguments
.
TabIndex
=
10
;
this
.
rtbArguments
.
Text
=
"-dQUIET\n-dPARANOIDSAFER\n-dBATCH\n-dNOPAUSE\n-dNOPROMPT\n-sDEVICE="
;
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
rtbArguments
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
162
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
426
,
320
);
this
.
groupBox1
.
TabIndex
=
11
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"通过参数执行GhostScript"
;
//
// textBox1
//
this
.
textBox1
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
139
);
this
.
textBox1
.
Name
=
"textBox1"
;
this
.
textBox1
.
Size
=
new
System
.
Drawing
.
Size
(
340
,
21
);
this
.
textBox1
.
TabIndex
=
5
;
this
.
textBox1
.
Text
=
"https://www.ghostscript.com/documentation.html"
;
//
// Form1
// Form1
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
553
,
300
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
548
,
494
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
btnRun
);
this
.
Controls
.
Add
(
this
.
cbxPrinter
);
this
.
Controls
.
Add
(
this
.
cbxPrinter
);
this
.
Controls
.
Add
(
this
.
btnPrint
);
this
.
Controls
.
Add
(
this
.
btnPrint
);
this
.
Controls
.
Add
(
this
.
btnSelectSaveFolder
);
this
.
Controls
.
Add
(
this
.
btnSelectSaveFolder
);
this
.
Controls
.
Add
(
this
.
textBox1
);
this
.
Controls
.
Add
(
this
.
tbxSaveFolder
);
this
.
Controls
.
Add
(
this
.
tbxSaveFolder
);
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label2
);
...
@@ -147,6 +193,7 @@
...
@@ -147,6 +193,7 @@
this
.
Name
=
"Form1"
;
this
.
Name
=
"Form1"
;
this
.
Text
=
"PDF文件扩展功能"
;
this
.
Text
=
"PDF文件扩展功能"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Form1_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Form1_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
PerformLayout
();
...
@@ -164,6 +211,10 @@
...
@@ -164,6 +211,10 @@
private
System
.
Windows
.
Forms
.
Button
btnPrint
;
private
System
.
Windows
.
Forms
.
Button
btnPrint
;
private
System
.
Windows
.
Forms
.
ComboBox
cbxPrinter
;
private
System
.
Windows
.
Forms
.
ComboBox
cbxPrinter
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Label
label3
;
private
System
.
Windows
.
Forms
.
Button
btnRun
;
private
System
.
Windows
.
Forms
.
RichTextBox
rtbArguments
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
TextBox
textBox1
;
}
}
}
}
Form1.cs
View file @
8e952a00
...
@@ -50,5 +50,10 @@ namespace Test
...
@@ -50,5 +50,10 @@ namespace Test
//Kivii.GhostScript.Tools.ToPrinter(@"C:\Test\1.pdf", cbxPrinter.SelectedItem.ToString());
//Kivii.GhostScript.Tools.ToPrinter(@"C:\Test\1.pdf", cbxPrinter.SelectedItem.ToString());
Kivii
.
GhostScript
.
Tools
.
ToPrinter
(
tbxFileSource
.
Text
,
cbxPrinter
.
SelectedItem
.
ToString
());
Kivii
.
GhostScript
.
Tools
.
ToPrinter
(
tbxFileSource
.
Text
,
cbxPrinter
.
SelectedItem
.
ToString
());
}
}
private
void
btnRun_Click
(
object
sender
,
EventArgs
e
)
{
Kivii
.
GhostScript
.
Tools
.
Run
(
rtbArguments
.
Lines
);
}
}
}
}
}
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