资源简介
把html文档直接生成pdf,不需要在服务器安装软件,可以在iis使用。
代码片段和文件信息
using System;
using System.Drawing.Printing;
using System.Globalization;
using System.Threading;
using Common.Logging;
namespace Pechkin
{
///
/// Global configuration object. Is used to create converter objects.
///
/// It uses fluid notation to change its fields.
///
public class GlobalConfig
{
private string _paperSize = “A4“;
private string _paperWidth; // for example “4cm“
private string _paperHeight; // or “12in“
private string _paperOrientation = “Portrait“; // must be either “Landscape“ or “Portrait“
private string _colorMode = “Color“; // must be either “Color“ or “Grayscale“
private string _resolution; // deprecated has no effect
private string _dpi; // DPI used when printing like “80“
private string _pageOffset; // start page number (used in headers footers and TOC)
private string _copies; // number of copies to include into the document =)
private string _collate = “false“; // collate copies or not must be either “true“ or “false“
private string _outline = “false“; // generate table of contents must be either “true“ or “false“
private string _outlineDepth = “4“; // outline depth
private string _dumpOutline = ““; // filename to dump outline in xml format
private string _output = ““; // filename to dump PDF into if “-“ then it‘s dumped into stdout
private string _documenttitle; // title for the PDF document
private string _useCompression = “true“; // turns on lossless compression of the PDF file
private string _marginTop; // size of the top margin (ex. “2cm)
private string _marginRight;
private string _marginBottom;
private string _marginLeft;
private string _outputFormat = “pdf“; // can be “ps“ or “pdf“
private string _imageDpi; // maximum DPI for the images in document
private string _imageQuality; // specifies JPEG compression factor for the (reencoded) images in pdf from “0“ to “100“
private string _cookieJar; // path to (text) file used to load and store cookies
[Obsolete(“Setting paper size by name doesn‘t work in the lib. Use the overload that takes PaperKind instead.“)]
public GlobalConfig SetPaperSize(string sizeName)
{
_paperSize = sizeName;
_paperHeight = ““;
_paperWidth = ““;
return this;
}
public GlobalConfig SetPaperSize(PaperKind kind)
{
// don‘t work
//return SetPaperSize(Enum.GetName(typeof(PaperKind) kind));
if (PechkinStatic.PaperSizes.ContainsKey(kind))
{
PechkinStatic.StrPaperSize ps = PechkinStatic.PaperSizes[kind];
return SetPaperSize(ps.Width ps.Height);
}
LogManager.GetCurrentClassLo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-22 09:57 Pechkin-master\
文件 146 2013-11-22 09:57 Pechkin-master\.gitignore
目录 0 2013-11-22 09:57 Pechkin-master\.nuget\
文件 169 2013-11-22 09:57 Pechkin-master\.nuget\NuGet.Config
文件 6698 2013-11-22 09:57 Pechkin-master\.nuget\NuGet.targets
文件 619520 2013-11-22 09:57 Pechkin-master\.nuget\nuget.exe
文件 3080 2013-11-22 09:57 Pechkin-master\Pechkin.sln
目录 0 2013-11-22 09:57 Pechkin-master\Pechkin\
目录 0 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\
文件 131 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\BeginEventHandler.cs
文件 125 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\ErrorEventHandler.cs
文件 122 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\FinishEventHandler.cs
文件 89 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\LibDeInitEventHandler.cs
文件 87 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\LibInitEventHandler.cs
文件 156 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\PhaseChangedEventHandler.cs
文件 159 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\ProgressChangedEventHandler.cs
文件 129 2013-11-22 09:57 Pechkin-master\Pechkin\EventHandlers\WarningEventHandler.cs
文件 16000 2013-11-22 09:57 Pechkin-master\Pechkin\GlobalConfig.cs
文件 4807 2013-11-22 09:57 Pechkin-master\Pechkin\IPechkin.cs
文件 36617 2013-11-22 09:57 Pechkin-master\Pechkin\ob
文件 16773780 2013-11-22 09:57 Pechkin-master\Pechkin\Pechkin.0.5.8.1.nupkg
文件 5644 2013-11-22 09:57 Pechkin-master\Pechkin\Pechkin.csproj
文件 1043 2013-11-22 09:57 Pechkin-master\Pechkin\Pechkin.nuspec
文件 6621 2013-11-22 09:57 Pechkin-master\Pechkin\PechkinBindings.cs
文件 23517 2013-11-22 09:57 Pechkin-master\Pechkin\PechkinStatic.cs
目录 0 2013-11-22 09:57 Pechkin-master\Pechkin\Properties\
文件 1526 2013-11-22 09:57 Pechkin-master\Pechkin\Properties\AssemblyInfo.cs
目录 0 2013-11-22 09:57 Pechkin-master\Pechkin\Reference\
目录 0 2013-11-22 09:57 Pechkin-master\Pechkin\Reference\include\
文件 1928 2013-11-22 09:57 Pechkin-master\Pechkin\Reference\include\converter.hh
文件 1475 2013-11-22 09:57 Pechkin-master\Pechkin\Reference\include\dllbegin.inc
............此处省略158个文件信息
相关资源
- 深入理解C# 高清 pdf
- FIRFilter(C# FIR滤波器——含低通、高
- 中控cm50消费机SDK,C#源码
- C#强大的反编译工具 dnSpy
- C#MyKTV完整项目
- 仓库管理系统源程序(C#+sql)
- 人脸识别摄像头抓拍C#源码
- 深入理解C#(第3版)
- C#超市管理系统
- C# 进销存管理系统,自己根据需求写
- ASP.NET MVC4 Web 编程.422页.高清完整版
- C# excel处理源码
- C#项目开发案例全程实录(第2版).
- 精通C#游戏编程.pdf
- 包含了halcon,C#编程,联合开发,机器
- 在线教育 asp.net源码
- 《C#面向对象设计模式纵横谈》全套视
- Learning hard C#学习笔记pdf及源码
- 狼奔C#MVC代码生成器V6.6
- C#年会抽奖软件
- 自己搜集的多达20个C#项目实战开发及
- asp.net(c#) 与 highcharts 数据库交互
- RabbitMQ-分布式消息队列C#、文档、工具
- C#利用Emgu人脸识别Demo可直接运行
- C#编成Modbus TCP连接PLC寄存器读取、写
-
基于winform的xm
l菜单编辑器c#源码) - c#简单的选课系统用 数据库的造作完
- C#编写、自动温度报警器
- 深入理解c# 第三版 高清
- LIS解码开发源代码(c#)加资料01
评论
共有 条评论