在线PDF转换网站集合

Jquery CDN ,

网站加载速度在线监测工具

此实现不是 Windows 平台 FIPS 验证的加密算法的一部分。

02
2015
11

利用CCProxy设置外网代理上GOOGLE

 

如果你有一台国外的服务器,那么就可以通过安装CCProxy 外网代理上Google, 操作步骤如下:

 

1. 在国外的服务器或VPS 上安装  CCProxy ,  在CCProxy主界面上,单击设置->高级->网络,在弹出的高级对话框中取消选中“禁止局域网外部用户”,单击“确定”按钮,其他的都不用动。

CCProxy默认的socks端口为:1080。

24
2015
10

“System.BadImageFormatException”类型的未经处理的异常在 System.Windows.Forms.dll 中发生

 “System.BadImageFormatException”类型的未经处理的异常在 System.Windows.Forms.dll 中发生



C#调用VC dll 出现“System.BadImageFormatException”,编写vc dll时用的是x86平台,即32位,而编译C#时用的x64, 即64位

将C#切换到x86平台编译,编译通过

20
2015
10

C# 复制远程电脑文件到本机

 


一。 DOS 命令的方法 


a. 连接上指定ip电脑
net use \\192.168.0.1\ipc$ " 密码 " /user:" 用户名 "
net use \\192.168.0.1\ipc$ "" /user:"administrator"

20
2015
10

C# 获取插入的U盘的盘符信息

 

using System.IO;

 

DriveInfo[] allDrives = DriveInfo.GetDrives();

foreach (DriveInfo d in allDrives)
{
    Console.WriteLine("Drive {0}", d.Name);
    Console.WriteLine("  File type: {0}", d.DriveType);
}

20
2015
10

C# 监测U盘插入

 


启动程序后,如果有U盘插入,会有提示信息


   public partial class Form1 : Form
    {
        public const int WM_DEVICECHANGE = 0x219;
        public const int DBT_DEVICEARRIVAL = 0x8000;
        public const int DBT_CONFIGCHANGECANCELED = 0x0019;
        public const int DBT_CONFIGCHANGED = 0x0018;
        public const int DBT_CUSTOMEVENT = 0x8006;
        public const int DBT_DEVICEQUERYREMOVE = 0x8001;
        public const int DBT_DEVICEQUERYREMOVEFAILED = 0x8002;
        public const int DBT_DEVICEREMOVECOMPLETE = 0x8004;
        public const int DBT_DEVICEREMOVEPENDING = 0x8003;
        public const int DBT_DEVICETYPESPECIFIC = 0x8005;
        public const int DBT_DEVNODES_CHANGED = 0x0007;
        public const int DBT_QUERYCHANGECONFIG = 0x0017;
        public const int DBT_USERDEFINED = 0xFFFF;

16
2015
10

telerik 的 RadDiagram控件 铅笔和钢笔工具默认不填充形状内的背景色

 

 

用铅笔和钢笔工具画图的时候, 形状默认会填充颜色, 如果是画形状还好,如果是画线的话就没必要填充颜色了, 设置如下:

 

首先要引用

xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Diagrams.Primitives;assembly=Telerik.Windows.Controls.Diagrams"

 

16
2015
10

Crop that pdf page horizontaly into 4 pieces and create a new pdf for each piece

 

  

Crop that pdf page horizontaly into 4 pieces and create a new pdf for each piece


 

Document document = new Document("D:\\AP Data\\copy.pdf");
 
//Create the Copy of the page
document.Pages.Insert(2, document.Pages[1]);
document.Pages.Insert(3, document.Pages[1]);
document.Pages.Insert(4, document.Pages[1]);
 
double segment = (document.Pages[1].Rect.Height / 4);
double half = (document.Pages[1].Rect.Height / 2);
double width = document.Pages[1].Rect.Width;
double height = document.Pages[1].Rect.Height;
 
//Create Crops
Aspose.Pdf.Rectangle pageRect = new Aspose.Pdf.Rectangle(0,  height - segment,width , height);
document.Pages[1].CropBox = pageRect;
 
pageRect = new Aspose.Pdf.Rectangle(0, height - half, width, height - segment);
document.Pages[2].CropBox = pageRect;
 
pageRect = new Aspose.Pdf.Rectangle(0, height - half, width, (height - half) - segment);
document.Pages[3].CropBox = pageRect;
 
pageRect = new Aspose.Pdf.Rectangle(0, 0, width, half - segment);
document.Pages[4].CropBox = pageRect;
 
document.Save("D:\\AP Data\\test_Crop.pdf");

16
2015
10

Crop Pdf from each edge

 

public void TrimPdf(string sourceFilePath, string outputFilePath)
  {
        PdfReader pdfReader = new PdfReader(sourceFilePath);
        float widthTo_Trim =         iTextSharp.text.Utilities.MillimetersToPoints(5);

16
2015
10

C# Crop PDF File

 

   static void cropiTxtSharp()
   {
        string file ="C:\\testpdf.pdf";
        string oldchar = "testpdf.pdf";
        string repChar = "test.pdf";
        PdfReader reader = new PdfReader(file);
        PdfDictionary pageDict;
        PdfRectangle rect = new PdfRectangle(0, 1000, 600, 115);
        pageDict = reader.GetPageN(1);
        pageDict.Put(PdfName.CROPBOX, rect);
        PdfStamper stamper = new PdfStamper(reader, new FileStream(file.Replace(oldchar, repChar), FileMode.Create, FileAccess.Write));
        stamper.Close();
        reader.Close();
    }

15
2015
10

js 点击按钮实现“隐藏,稍后弹出提示”的功能

 

右下角的信息弹出后,点击按钮实现 隐藏,稍后提示功能


        //隐藏, 稍后提示
        function hidelater(divId) {
            document.getElementById(divId).style.display = "none";
            setTimeout(function () { document.getElementById(divId).style.display = "block"; }, 10000);
        }