(options =>
28 | {
29 | // This lambda determines whether user consent for non-essential cookies is needed for a given request.
30 | options.CheckConsentNeeded = context => true;
31 | options.MinimumSameSitePolicy = SameSiteMode.None;
32 | });
33 |
34 |
35 | services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
36 | }
37 |
38 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
39 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
40 | {
41 | if (env.IsDevelopment())
42 | {
43 | app.UseDeveloperExceptionPage();
44 | }
45 | else
46 | {
47 | app.UseExceptionHandler("/Home/Error");
48 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
49 | app.UseHsts();
50 | }
51 |
52 | app.UseHttpsRedirection();
53 | app.UseStaticFiles();
54 | app.UseCookiePolicy();
55 |
56 | app.UseMvc(routes =>
57 | {
58 | routes.MapRoute(
59 | name: "default",
60 | template: "{controller=Home}/{action=Index}/{id?}");
61 | });
62 | WkhtmltoxConfig.Setup(env.WebRootPath);
63 | //WkhtmltoxConfig.Setup(env.WebRootPath,"custompath"); //配置wwwroot下个文件地址,默认为Wkhtmltox
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
163 |
164 |
XXX委托审批意见书
165 |
单位(盖章): xxxxxxxx 收文日期: 2019-04-15
166 |
167 |
168 |
169 |
170 | 年度 项目救助 人,共需资金 万元(人民币),请审核。
171 |
172 |
173 | |
174 |
175 |
176 |
177 | 市级项目官员
178 | 审核意见
179 | |
180 |
181 |
182 | 经复核、抽查,该项目按年度计划执行,材料真实准确,符合救助条件,申报流程合规,同意实施并承担相应的监督责任。
183 | 签字: 年 月 日
184 |
185 | |
186 |
187 |
188 |
189 | 市级秘书长
190 | 审核意见
191 | |
192 |
193 |
194 | 经对项目材料和复核、抽查流程的审查,该项目符合年度计划和申报条件,同意实施并承担相应的监督责任。
195 | 签字: 年 月 日
196 |
197 | |
198 |
199 |
200 |
201 | 市级领导
202 | 审批意见
203 | |
204 |
205 |
206 | 经县级和本市对项目的审查复核,该项目符合相关要求,同意实施、报XXXXX并承担相应的监督责任。
207 | 签字: 年 月 日
208 |
209 | |
210 |
211 |
212 |
213 | XXXXXX
214 | 金会备案确认
215 | |
216 |
217 |
218 | 项目部审核:
219 | 资金部审核:
220 | 秘书长(签字): 年 月 日
221 | 负责人(签字): 年 月 日
222 |
223 | |
224 |
225 |
226 |
227 |
228 |
229 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/Home/Privacy.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Privacy Policy";
3 | }
4 | @ViewData["Title"]
5 |
6 | Use this page to detail your site's privacy policy.
7 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 | @model ErrorViewModel
2 | @{
3 | ViewData["Title"] = "Error";
4 | }
5 |
6 | Error.
7 | An error occurred while processing your request.
8 |
9 | @if (Model.ShowRequestId)
10 | {
11 |
12 | Request ID: @Model.RequestId
13 |
14 | }
15 |
16 | Development Mode
17 |
18 | Swapping to Development environment will display more detailed information about the error that occurred.
19 |
20 |
21 | The Development environment shouldn't be enabled for deployed applications.
22 | It can result in displaying sensitive information from exceptions to end users.
23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
24 | and restarting the app.
25 |
26 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/Shared/_CookieConsentPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNetCore.Http.Features
2 |
3 | @{
4 | var consentFeature = Context.Features.Get();
5 | var showBanner = !consentFeature?.CanTrack ?? false;
6 | var cookieString = consentFeature?.CreateConsentCookie();
7 | }
8 |
9 | @if (showBanner)
10 | {
11 |
12 | Use this space to summarize your privacy and cookie use policy.
Learn More.
13 |
16 |
17 |
25 | }
26 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewData["Title"] - Czar.HtmlToPdfImage.Test
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
42 |
43 |
44 |
45 | @RenderBody()
46 |
47 |
48 |
49 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
66 |
72 |
73 |
74 |
75 | @RenderSection("Scripts", required: false)
76 |
77 |
78 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/_ViewImports.cshtml:
--------------------------------------------------------------------------------
1 | @using Czar.HtmlToPdfImage.Test
2 | @using Czar.HtmlToPdfImage.Test.Models
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = null;
3 | }
4 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Warning"
5 | }
6 | },
7 | "AllowedHosts": "*"
8 | }
9 |
--------------------------------------------------------------------------------
/test/Czar.HtmlToPdfImage.Test/wwwroot/Linux/help-wkhtmltoimage.txt:
--------------------------------------------------------------------------------
1 | Name:
2 | wkhtmltoimage 0.12.2.1 (with patched qt)
3 |
4 | Synopsis:
5 | wkhtmltoimage [OPTIONS]...