├── .gitignore
├── Bing.EasyPrint.sln
├── LICENSE
├── Publish.bat
├── README.md
├── asset
├── images
│ └── icon.png
└── props
│ ├── misc.props
│ ├── package.props
│ ├── sourcelink.env.props
│ └── target.feature.props
├── common.props
├── common.tests.props
├── src
├── Bing.EasyPrint.Templates
│ ├── Bing.EasyPrint.Templates.csproj
│ ├── Bing.EasyPrint.Templates.xml
│ ├── Bing
│ │ └── EasyPrint
│ │ │ ├── Elements
│ │ │ ├── BpBarcodeElement.cs
│ │ │ ├── BpElement.cs
│ │ │ ├── BpElementAll.cs
│ │ │ ├── BpFontElement.cs
│ │ │ ├── BpImageElement.cs
│ │ │ └── BpQrCodeElement.cs
│ │ │ └── Model
│ │ │ ├── BgField.cs
│ │ │ ├── BpBorder.cs
│ │ │ ├── BpCell.cs
│ │ │ ├── BpCoordinate.cs
│ │ │ ├── BpFont.cs
│ │ │ ├── BpMargin.cs
│ │ │ ├── BpRange.cs
│ │ │ ├── BpRow.cs
│ │ │ ├── BpTemplate.cs
│ │ │ ├── BpText.cs
│ │ │ ├── FeedLine.cs
│ │ │ └── PrintBatchParam.cs
│ ├── project.dependency.props
│ └── project.props
└── Bing.EasyPrint
│ ├── Bing.EasyPrint.csproj
│ ├── Bing.EasyPrint.xml
│ ├── Bing
│ └── EasyPrint
│ │ ├── CPCL
│ │ └── Metadata
│ │ │ └── PrintCommandStruct.cs
│ │ ├── IPrintValue.cs
│ │ └── IPrintValueDescriptor.cs
│ ├── CPCL
│ ├── CPCLCommandInfo.cs
│ ├── CPCLPrintCommand.Advanced.cs
│ ├── CPCLPrintCommand.Barcode.cs
│ ├── CPCLPrintCommand.Base.cs
│ ├── CPCLPrintCommand.Component.cs
│ ├── CPCLPrintCommand.Graphics.cs
│ ├── CPCLPrintCommand.QrCode.cs
│ ├── CPCLPrintCommand.Text.cs
│ ├── CPCLPrintCommand.cs
│ ├── Components
│ │ ├── Barcode1DComponent.cs
│ │ ├── BoxComponent.cs
│ │ ├── DashLineComponent.cs
│ │ ├── ImageComponent.cs
│ │ ├── LineComponent.cs
│ │ ├── QRCodeComponent.cs
│ │ ├── SplitLineComponent.cs
│ │ └── TextComponent.cs
│ ├── Helper.cs
│ └── Metadata
│ │ ├── ComponentMetadata.cs
│ │ ├── MetadataBase.cs
│ │ ├── MetadataType.cs
│ │ └── RawMetadata.cs
│ ├── Core
│ └── BufferWriter.cs
│ ├── DefaultEasyPrint.cs
│ ├── Enums
│ ├── BarcodeType.cs
│ ├── FontSize.cs
│ ├── LineStyle.cs
│ ├── PrintColor.cs
│ ├── PrintOrientation.cs
│ ├── QrCodeCorrectionLevel.cs
│ ├── QrCodeUnitSize.cs
│ ├── RotationAngle.cs
│ └── TextStyle.cs
│ ├── Extensions
│ ├── Extensions.IBufferWriter.cs
│ ├── Extensions.IEasyPrint.cs
│ ├── Extensions.IPrintComponent.cs
│ └── Extensions.Service.cs
│ ├── IBufferWriter.cs
│ ├── IEasyPrint.cs
│ ├── IPrintCommand.cs
│ └── IPrintComponent.cs
├── tests
└── Bing.EasyPrint.Tests
│ ├── Bing.EasyPrint.Tests.csproj
│ ├── Biz
│ ├── BizLabelTest.cs
│ ├── Images
│ │ └── logo.jpg
│ ├── Label
│ │ ├── PrintPriceLabelBase.cs
│ │ ├── PrintPriceLabelBy15mm.cs
│ │ ├── PrintPriceLabelBy70mm.cs
│ │ └── PrintPriceLabelBy90mm.cs
│ ├── PriceLabel.cs
│ ├── PrintPageType.cs
│ └── ShippingLabel.cs
│ ├── BufferWriterTest.cs
│ ├── CPCL
│ ├── CPCLPrintCommandTest.Advanced.cs
│ ├── CPCLPrintCommandTest.Component.cs
│ ├── CPCLPrintCommandTest.Graphics.cs
│ ├── CPCLPrintCommandTest.Other.cs
│ ├── CPCLPrintCommandTest.QrCode.cs
│ └── CPCLPrintCommandTest.cs
│ ├── RawPrinterHelper.cs
│ ├── SimpleTest.cs
│ └── TestBase.cs
└── version.props
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 |
--------------------------------------------------------------------------------
/Bing.EasyPrint.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.5.33530.505
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bing.EasyPrint", "src\Bing.EasyPrint\Bing.EasyPrint.csproj", "{A202D824-3223-4E7B-A79B-96303192CAEB}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bing.EasyPrint.Tests", "tests\Bing.EasyPrint.Tests\Bing.EasyPrint.Tests.csproj", "{FE2CAB1A-E0EF-4775-AF4C-901314DF2939}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_SolutionItems", "_SolutionItems", "{814AC42F-7E98-49C3-8ADD-FB14BE172923}"
11 | EndProject
12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asset", "asset", "{9F52451E-CCA8-45DD-BA5D-C2CACA07CF77}"
13 | EndProject
14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{3C915628-5110-495E-B561-63C8BCEF3240}"
15 | ProjectSection(SolutionItems) = preProject
16 | asset\props\misc.props = asset\props\misc.props
17 | asset\props\package.props = asset\props\package.props
18 | asset\props\sourcelink.env.props = asset\props\sourcelink.env.props
19 | asset\props\target.feature.props = asset\props\target.feature.props
20 | EndProjectSection
21 | EndProject
22 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bing.EasyPrint.Templates", "src\Bing.EasyPrint.Templates\Bing.EasyPrint.Templates.csproj", "{441B45FB-76F8-4E61-9CA4-0E5BAB44B64F}"
23 | EndProject
24 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{8D7519A2-B1A1-4E91-B18E-32B3DA392DE5}"
25 | ProjectSection(SolutionItems) = preProject
26 | asset\images\icon.png = asset\images\icon.png
27 | EndProjectSection
28 | EndProject
29 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{2757A100-98D6-443E-ACB0-EA6065A7BE88}"
30 | ProjectSection(SolutionItems) = preProject
31 | Publish.bat = Publish.bat
32 | EndProjectSection
33 | EndProject
34 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{6F0DFB0A-D54A-4992-873F-73E16A2FB258}"
35 | ProjectSection(SolutionItems) = preProject
36 | .gitignore = .gitignore
37 | common.props = common.props
38 | common.tests.props = common.tests.props
39 | LICENSE = LICENSE
40 | version.props = version.props
41 | EndProjectSection
42 | EndProject
43 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{58F59A06-E35F-476A-8A8B-E6E315926B68}"
44 | ProjectSection(SolutionItems) = preProject
45 | README.md = README.md
46 | EndProjectSection
47 | EndProject
48 | Global
49 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
50 | Debug|Any CPU = Debug|Any CPU
51 | Release|Any CPU = Release|Any CPU
52 | EndGlobalSection
53 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
54 | {A202D824-3223-4E7B-A79B-96303192CAEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {A202D824-3223-4E7B-A79B-96303192CAEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {A202D824-3223-4E7B-A79B-96303192CAEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {A202D824-3223-4E7B-A79B-96303192CAEB}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {FE2CAB1A-E0EF-4775-AF4C-901314DF2939}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 | {FE2CAB1A-E0EF-4775-AF4C-901314DF2939}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 | {FE2CAB1A-E0EF-4775-AF4C-901314DF2939}.Release|Any CPU.ActiveCfg = Release|Any CPU
61 | {FE2CAB1A-E0EF-4775-AF4C-901314DF2939}.Release|Any CPU.Build.0 = Release|Any CPU
62 | {441B45FB-76F8-4E61-9CA4-0E5BAB44B64F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63 | {441B45FB-76F8-4E61-9CA4-0E5BAB44B64F}.Debug|Any CPU.Build.0 = Debug|Any CPU
64 | {441B45FB-76F8-4E61-9CA4-0E5BAB44B64F}.Release|Any CPU.ActiveCfg = Release|Any CPU
65 | {441B45FB-76F8-4E61-9CA4-0E5BAB44B64F}.Release|Any CPU.Build.0 = Release|Any CPU
66 | EndGlobalSection
67 | GlobalSection(SolutionProperties) = preSolution
68 | HideSolutionNode = FALSE
69 | EndGlobalSection
70 | GlobalSection(NestedProjects) = preSolution
71 | {9F52451E-CCA8-45DD-BA5D-C2CACA07CF77} = {814AC42F-7E98-49C3-8ADD-FB14BE172923}
72 | {3C915628-5110-495E-B561-63C8BCEF3240} = {9F52451E-CCA8-45DD-BA5D-C2CACA07CF77}
73 | {8D7519A2-B1A1-4E91-B18E-32B3DA392DE5} = {9F52451E-CCA8-45DD-BA5D-C2CACA07CF77}
74 | {2757A100-98D6-443E-ACB0-EA6065A7BE88} = {814AC42F-7E98-49C3-8ADD-FB14BE172923}
75 | {6F0DFB0A-D54A-4992-873F-73E16A2FB258} = {814AC42F-7E98-49C3-8ADD-FB14BE172923}
76 | {58F59A06-E35F-476A-8A8B-E6E315926B68} = {814AC42F-7E98-49C3-8ADD-FB14BE172923}
77 | EndGlobalSection
78 | GlobalSection(ExtensibilityGlobals) = postSolution
79 | SolutionGuid = {01422DBE-8356-4DFA-9C0B-4A15E1B0A46F}
80 | EndGlobalSection
81 | EndGlobal
82 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Bing
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Publish.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | echo =======================================================================
4 | echo Bing.EasyPrint
5 | echo =======================================================================
6 |
7 | ::create nuget_packages
8 | if not exist nuget_packages (
9 | md nuget_packages
10 | echo Create nuget_packages folder.
11 | )
12 |
13 | ::clear nuget_packages
14 | for /R "nuget_packages" %%s in (*) do (
15 | del %%s
16 | )
17 | echo Cleaned up all nuget packages.
18 | echo.
19 |
20 | ::start to package all projects
21 |
22 | ::EasyPrint
23 | dotnet pack src/Bing.EasyPrint -c Release -o nuget_packages
24 |
25 | for /R "nuget_packages" %%s in (*symbols.nupkg) do (
26 | del %%s
27 | )
28 |
29 | echo.
30 | echo.
31 |
32 | set /p key=input key:
33 | set source=https://api.nuget.org/v3/index.json
34 |
35 | for /R "nuget_packages" %%s in (*.nupkg) do (
36 | call dotnet nuget push %%s -k %key% -s %source%
37 | echo.
38 | )
39 |
40 | pause
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bing-framework/Bing.EasyPrint/4edfb2ed74d875f221cefaf8ec11f6a26c2c2fca/README.md
--------------------------------------------------------------------------------
/asset/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bing-framework/Bing.EasyPrint/4edfb2ed74d875f221cefaf8ec11f6a26c2c2fca/asset/images/icon.png
--------------------------------------------------------------------------------
/asset/props/misc.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/asset/props/package.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | 简玄冰
4 | 简玄冰
5 | 简玄冰
6 | https://github.com/bing-framework/Bing.EasyPrint
7 | git
8 | https://github.com/bing-framework/Bing.EasyPrint
9 | icon.png
10 | LICENSE
11 | bing;print;easyprint;cpcl;escpos;
12 |
13 |
--------------------------------------------------------------------------------
/asset/props/sourcelink.env.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/asset/props/target.feature.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | enable
4 | disable
5 |
6 |
7 |
8 | enable
9 | disable
10 |
11 |
12 |
13 | enable
14 | disable
15 |
16 |
17 |
18 | enable
19 | disable
20 |
21 |
22 |
--------------------------------------------------------------------------------
/common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | net7.0;net6.0;netcoreapp3.1;netstandard2.0;netstandard2.1;
4 |
5 |
6 |
7 |
8 | latest
9 | $(NoWarn);CS1591;NETSDK1138
10 | $(NoWarn);CS1591;NETSDK1138
11 |
12 |
13 |
14 | $(MSBuildThisFileDirectory)/output/debug/
15 |
16 |
17 |
18 | $(MSBuildThisFileDirectory)/output/release/
19 |
20 |
21 |
22 | $(AssemblyName).xml
23 |
24 |
25 |
26 | $(AssemblyName).xml
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/common.tests.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | latest
4 | $(NoWarn);CS1591;NETSDK1138
5 | false
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 2.4.5
14 | 2.4.3
15 | 2.4.3
16 | 2.4.3
17 | runtime; build; native; contentfiles; analyzers; buildtransitive
18 | all
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing.EasyPrint.Templates.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing.EasyPrint.Templates.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bing.EasyPrint.Templates
5 |
6 |
7 |
8 |
9 | 条码元素
10 |
11 |
12 |
13 |
14 | 宽度
15 |
16 |
17 |
18 |
19 | 高度
20 |
21 |
22 |
23 |
24 | 最小显示元素
25 |
26 |
27 |
28 |
29 | 类型
30 |
31 | 1=文字;2=图片;3=二维码;4=条形码
32 |
33 |
34 |
35 | 显示的属性信息
36 |
37 |
38 |
39 |
40 | 元素显示间距
41 |
42 |
43 |
44 |
45 | 左上角起始坐标
46 |
47 |
48 |
49 |
50 | 右下角终止坐标
51 |
52 |
53 |
54 |
55 | 显示元素扩展。便于存储元素所有属性信息,只有其中一个不为空
56 |
57 |
58 |
59 |
60 | 图片显示元素
61 |
62 |
63 |
64 |
65 | 文字显示元素
66 |
67 |
68 |
69 |
70 | 二维码显示元素
71 |
72 |
73 |
74 |
75 | 条码显示元素
76 |
77 |
78 |
79 |
80 | 文字显示元素
81 |
82 |
83 |
84 |
85 | 字体大小
86 |
87 |
88 |
89 |
90 | 字体风格
91 |
92 |
93 |
94 |
95 | 字体名称
96 |
97 |
98 |
99 |
100 | 字体加粗
101 |
102 |
103 |
104 |
105 | 图片元素
106 |
107 |
108 |
109 |
110 | 宽度
111 |
112 |
113 |
114 |
115 | 高度
116 |
117 |
118 |
119 |
120 | 是否压缩
121 |
122 |
123 |
124 |
125 | 二维码元素
126 |
127 |
128 |
129 |
130 | 宽度
131 |
132 |
133 |
134 |
135 | 高度
136 |
137 |
138 |
139 |
140 | 字段
141 |
142 |
143 |
144 |
145 | 标题
146 |
147 |
148 |
149 |
150 | 字段属性名
151 |
152 |
153 |
154 |
155 | 属性值
156 |
157 |
158 |
159 |
160 | 是否自动换行
161 |
162 |
163 |
164 |
165 | 是否自适应宽度
166 |
167 |
168 |
169 |
170 | 属性取值函数
171 |
172 |
173 |
174 |
175 | 边框样式
176 |
177 |
178 |
179 |
180 | 顶部线条类型。
181 |
182 | 1=实线;2=虚线
183 |
184 |
185 |
186 | 右部线条类型。
187 |
188 | 1=实线;2=虚线
189 |
190 |
191 |
192 | 左部线条类型。
193 |
194 | 1=实线;2=虚线
195 |
196 |
197 |
198 | 下部线条线条类型。
199 |
200 | 1=实线;2=虚线
201 |
202 |
203 |
204 | 背景颜色
205 |
206 | 1=白色;2=黑色;3=黄色
207 |
208 |
209 |
210 | 单元格
211 |
212 |
213 |
214 |
215 | 宽度
216 |
217 |
218 |
219 |
220 | 边框样式
221 |
222 |
223 |
224 |
225 | 单元行列表。列拆行
226 |
227 |
228 |
229 |
230 | 显示的元素列表
231 |
232 |
233 |
234 |
235 | 显示的元素,便于存储显示元素全量信息(只用于前端和存储,不参与运算逻辑)
236 |
237 |
238 |
239 |
240 | 坐标
241 |
242 |
243 |
244 |
245 | X轴坐标
246 |
247 |
248 |
249 |
250 | Y轴坐标
251 |
252 |
253 |
254 |
255 | 字体
256 |
257 |
258 |
259 |
260 | 字体大小
261 |
262 |
263 |
264 |
265 | 字体风格
266 |
267 |
268 |
269 |
270 | 字体名称
271 |
272 |
273 |
274 |
275 | 字体加粗
276 |
277 |
278 |
279 |
280 | 字体放大
281 |
282 |
283 |
284 |
285 | 是否自动换行
286 |
287 |
288 |
289 |
290 | 是否自适应宽度
291 |
292 |
293 |
294 |
295 | 间距
296 |
297 |
298 |
299 |
300 | 上间距
301 |
302 |
303 |
304 |
305 | 左间距
306 |
307 |
308 |
309 |
310 | 右间距
311 |
312 |
313 |
314 |
315 | 下间距
316 |
317 |
318 |
319 |
320 | 范围
321 |
322 |
323 |
324 |
325 | 左上角起始坐标
326 |
327 |
328 |
329 |
330 | 右下角终止坐标
331 |
332 |
333 |
334 |
335 | 单元行
336 |
337 |
338 |
339 |
340 | 高度
341 |
342 |
343 |
344 |
345 | 边框类型
346 |
347 |
348 |
349 |
350 | 单元格列表
351 |
352 |
353 |
354 |
355 | 模板
356 |
357 |
358 |
359 |
360 | 纸张类型
361 |
362 | 1=A4
363 |
364 |
365 |
366 | 宽度
367 |
368 |
369 |
370 |
371 | 高度
372 |
373 |
374 |
375 |
376 | 背景颜色
377 |
378 | 1=白色;2=黑色;3=黄色
379 |
380 |
381 |
382 | 边框颜色
383 |
384 |
385 |
386 |
387 | 单元行列表
388 |
389 |
390 |
391 |
392 | 文本
393 |
394 |
395 |
396 |
397 | 文字大小
398 |
399 |
400 |
401 |
402 | 文字类型
403 |
404 |
405 |
406 |
407 | 文字风格
408 |
409 |
410 |
411 |
412 | 分割线
413 |
414 |
415 |
416 |
417 | 行
418 |
419 |
420 |
421 |
422 | 高度
423 |
424 |
425 |
426 |
427 | 打印批量参数
428 |
429 | 类型
430 |
431 |
432 |
433 | 模板
434 |
435 |
436 |
437 |
438 | 打印主数据。注:属性值不支持List,Map,类对象
439 |
440 |
441 |
442 |
443 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Elements/BpBarcodeElement.cs:
--------------------------------------------------------------------------------
1 | namespace Bing.EasyPrint.Elements
2 | {
3 | ///
4 | /// 条码元素
5 | ///
6 | public class BpBarcodeElement : BpElement
7 | {
8 | ///
9 | /// 宽度
10 | ///
11 | public int Width { get; set; }
12 |
13 | ///
14 | /// 高度
15 | ///
16 | public int Height { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Elements/BpElement.cs:
--------------------------------------------------------------------------------
1 | using Bing.EasyPrint.Model;
2 |
3 | namespace Bing.EasyPrint.Elements
4 | {
5 | ///
6 | /// 最小显示元素
7 | ///
8 | public class BpElement
9 | {
10 | ///
11 | /// 类型
12 | ///
13 | /// 1=文字;2=图片;3=二维码;4=条形码
14 | public int Type { get; set; }
15 |
16 | ///
17 | /// 显示的属性信息
18 | ///
19 | public BgField Field { get; set; }
20 |
21 | ///
22 | /// 元素显示间距
23 | ///
24 | public BpMargin Margin { get; set; }
25 |
26 | ///
27 | /// 左上角起始坐标
28 | ///
29 | public BpCoordinate StartCoordinate { get; set; }
30 |
31 | ///
32 | /// 右下角终止坐标
33 | ///
34 | public BpCoordinate EndCoordinate { get; set; }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Elements/BpElementAll.cs:
--------------------------------------------------------------------------------
1 | namespace Bing.EasyPrint.Elements
2 | {
3 | ///
4 | /// 显示元素扩展。便于存储元素所有属性信息,只有其中一个不为空
5 | ///
6 | public class BpElementAll
7 | {
8 | ///
9 | /// 图片显示元素
10 | ///
11 | public BpImageElement ImageElement{ get; set; }
12 |
13 | ///
14 | /// 文字显示元素
15 | ///
16 | public BpFontElement FontElement { get; set; }
17 |
18 | ///
19 | /// 二维码显示元素
20 | ///
21 | public BpQrCodeElement QrCodeElement{ get; set; }
22 |
23 | ///
24 | /// 条码显示元素
25 | ///
26 | public BpBarcodeElement BarcodeElement{ get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Elements/BpFontElement.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Bing.EasyPrint.Elements
3 | {
4 | ///
5 | /// 文字显示元素
6 | ///
7 | public class BpFontElement : BpElement
8 | {
9 | ///
10 | /// 字体大小
11 | ///
12 | public int FontSize { get; set; }
13 |
14 | ///
15 | /// 字体风格
16 | ///
17 | public int FontStyle { get; set; }
18 |
19 | ///
20 | /// 字体名称
21 | ///
22 | public int FontName { get; set; }
23 |
24 | ///
25 | /// 字体加粗
26 | ///
27 | public bool Bold { get; set; }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Elements/BpImageElement.cs:
--------------------------------------------------------------------------------
1 | namespace Bing.EasyPrint.Elements
2 | {
3 | ///
4 | /// 图片元素
5 | ///
6 | public class BpImageElement : BpElement
7 | {
8 | ///
9 | /// 宽度
10 | ///
11 | public int Width{ get; set; }
12 |
13 | ///
14 | /// 高度
15 | ///
16 | public int Height{ get; set; }
17 |
18 | ///
19 | /// 是否压缩
20 | ///
21 | public bool IsCompress { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Elements/BpQrCodeElement.cs:
--------------------------------------------------------------------------------
1 | namespace Bing.EasyPrint.Elements
2 | {
3 | ///
4 | /// 二维码元素
5 | ///
6 | public class BpQrCodeElement : BpElement
7 | {
8 | ///
9 | /// 宽度
10 | ///
11 | public int Width { get; set; }
12 |
13 | ///
14 | /// 高度
15 | ///
16 | public int Height { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Bing.EasyPrint.Templates/Bing/EasyPrint/Model/BgField.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Bing.EasyPrint.Model
4 | {
5 | ///
6 | /// 字段
7 | ///
8 | public class BgField
9 | {
10 | ///
11 | /// 标题
12 | ///
13 | public string Title { get; set; }
14 |
15 | ///
16 | /// 字段属性名
17 | ///
18 | public string Name { get; set; }
19 |
20 | ///
21 | /// 属性值
22 | ///
23 | public string Value { get; set; }
24 |
25 | ///
26 | /// 是否自动换行
27 | ///
28 | public bool NeedFeedLine { get; set; } = true;
29 |
30 | ///
31 | /// 是否自适应宽度
32 | ///
33 | public bool Fit { get; set; } = false;
34 |
35 | ///
36 | /// 属性取值函数
37 | ///
38 | public Func