pageoffice pdf去掉水印_java pageoffice 水印 - CSDN
精华内容
参与话题
  • java实现word文档转pdf,并添加水印

    万次阅读 热门讨论 2019-03-12 15:09:39
    前段时间,项目需要自动生成...将word文档转化为PDF是项目中常见的需求之一,目前主流的方法可以分为两大类,一类是利用各种Office应用进行转换,譬如Microsoft Office、WPS以及LiberOffice,另一种是利用各种语言提...

    前段时间,项目需要自动生成word文档,用WordFreeMarker生成word文档后,又要求生成的文档能在浏览器浏览,思来想去,把word文档转成pdf就好了,于是乎研究了一下。

    将word文档转化为PDF是项目中常见的需求之一,目前主流的方法可以分为两大类,一类是利用各种Office应用进行转换,譬如Microsoft Office、WPS以及LiberOffice,另一种是利用各种语言提供的对于Office文档读取的接口(譬如Apache POI,jacob,docx4j,openoffice),这些要么收费,要么要装插件,要么转换之后样式走形,乱码等等。

    我使用Aspose.Words for Java 可以导出复杂WORD PDF HTML 多种数据格式 
    官方下载地址:http://www.aspose.com/java/word-component.aspx 

    我所用的版本是aspose-words-14.9.0-jdk16。需要到的两个jar包(所需jar包下载),也可以联系我,免费分享。

    废话不多说,直接上代码:

    import java.io.File;
    import java.io.FileOutputStream;
    
    
    
    import java.io.IOException;
    
    import org.slf4j.Logger;
    
    import com.aspose.words.Document;
    import com.aspose.words.SaveFormat;
    
    
    /**
     * 
    * @ClassName: Word2PdfUtilt
    * @Description: PDF转换工具类
    * @author mzl
    * @date 2018年7月30日 下午5:26:44
    *
     */
    public class Word2PdfUtilt {
    	
    	protected static Logger log = Log.get();
    	
    	public static void main(String[] args) {
           doc2pdf("D:\\Workspaces\\小花测试_20180731094521.doc","D:\\Workspaces\\test.pdf");
    
        }
    	
    
        public static void doc2pdf(String inPath, String outPath) {
        	FileOutputStream os =null;
            try {
                File file = new File(outPath); // 新建一个空白pdf文档
                os = new FileOutputStream(file);
                Document doc = new Document(inPath); // Address是将要被转化的word文档
                doc.save(os, SaveFormat.PDF);
            } catch (Exception e) {
                e.printStackTrace();
            }finally{
            	if(os!=null){
            		try {
    					os.close();
    				} catch (IOException e) {
    					e.printStackTrace();
    				}
            	}
            }
        }
    
    
    }

    转成PDF格式后,图片等样式均没有乱。

    以上就是生产PDF的步骤了,接下来添加水印:

     /**
         * 
        * @Title: insertWatermarkText
        * @Description: PDF生成水印
        * @author mzl
        * @param doc
        * @param watermarkText
        * @throws Exception
        * @throws
         */
        private static void insertWatermarkText(Document doc, String watermarkText) throws Exception
        {
    
            Shape watermark = new Shape(doc, ShapeType.TEXT_PLAIN_TEXT);
    
    
            //水印内容
            watermark.getTextPath().setText(watermarkText);
            //水印字体
            watermark.getTextPath().setFontFamily("宋体");
            //水印宽度
            watermark.setWidth(500);
            //水印高度
            watermark.setHeight(100);
            //旋转水印
            watermark.setRotation(-40);
            //水印颜色
            watermark.getFill().setColor(Color.lightGray); 
            watermark.setStrokeColor(Color.lightGray); 
    
            watermark.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
            watermark.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
            watermark.setWrapType(WrapType.NONE);
            watermark.setVerticalAlignment(VerticalAlignment.CENTER);
            watermark.setHorizontalAlignment(HorizontalAlignment.CENTER);
    
            Paragraph watermarkPara = new Paragraph(doc);
            watermarkPara.appendChild(watermark);
    
            for (Section sect : doc.getSections())
            {
                insertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HEADER_PRIMARY);
                insertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HEADER_FIRST);
                insertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HEADER_EVEN);
            }
            System.out.println("Watermark Set");
        }
        
        
    
        private static void insertWatermarkIntoHeader(Paragraph watermarkPara, Section sect, int headerType) throws Exception
        {
            HeaderFooter header = sect.getHeadersFooters().getByHeaderFooterType(headerType);
    
            if (header == null)
            {
                header = new HeaderFooter(sect.getDocument(), headerType);
                sect.getHeadersFooters().add(header);
            }
    
            header.appendChild(watermarkPara.deepClone(true));
        }
    

    效果图如下,我添加的水印为我的博客昵称:择依MZL

    展开全文
  • 使用Spire.PDF for.NET的时候,会出现Evaluation Warning : The document was created with Spire.PDF for .NET. 水印。 如果需求是不到10页的pdf,可以使用官方免费版本,没有水印。 官方免费版本下载地址: ...

    阿里云优惠卷,戳我领取

    使用Spire.PDF for.NET的时候,会出现Evaluation Warning : The document was created with Spire.PDF for .NET. 水印。
    在这里插入图片描述

    如果需求是不到10页的pdf,可以使用官方免费版本,没有水印。
    官方免费版本下载地址:
    https://u20002878.pipipan.com/fs/20002878-372752254

    在这里插入图片描述
    另外附上这个dll的一些代码作为参考:
    (以下代码参考自:https://www.cnblogs.com/Yesi/p/9844042.html 但稍作修改并非完全相同)

    阿里云优惠卷,戳我领取

    using System;
    using System.Drawing;
    using System.Windows.Forms;
    using Spire.Pdf;
    using Spire.Pdf.Graphics;
    using Spire.Pdf.Annotations;
    
    namespace GetPDF
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
    
            }
    
            private void CreatPDF(string url,string name)
            {
                float x = 50;
                float y = 50;
                string hang1 = "测试文字1";
                string hang2 = "测试文字2";
                string hang3 = "测试文字3";
                PdfDocument pdf = new PdfDocument();//新建一个pdf
                PdfPageBase page = pdf.Pages.Add();//新建pdf的一页
                PdfTrueTypeFont font1 = new PdfTrueTypeFont(new Font("Arial Unicode MS", 30f, FontStyle.Regular), true);//创建一个pdf的字体
                page.Canvas.DrawString(hang1, font1, PdfBrushes.Black, new PointF(x, y)); y += 50;
                page.Canvas.DrawString(hang2, font1, PdfBrushes.Black, new PointF(x, y)); y += 50;
                page.Canvas.DrawString(hang3, font1, PdfBrushes.Black, new PointF(x, y)); y += 50;
               // PdfStringFormat format = new PdfStringFormat();
               // format.MeasureTrailingSpaces = true;
                x += font1.MeasureString(str, format).Width;
    
                //超链接
                PdfTrueTypeFont font2 = new PdfTrueTypeFont(new Font("Arial Unicode MS", 30f, FontStyle.Underline), true);
                PdfTextWebLink webLink = new PdfTextWebLink();
                webLink.Url = url;
                webLink.Text = url;
                webLink.Font = font2;
                webLink.Brush = PdfBrushes.Blue;
                webLink.DrawTextWebLink(page.Canvas, new PointF(x, y));
                pdf.SaveToFile(name + ".pdf");创建pdf
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                CreatPDF(textBox2.Text, textBox1.Text);
            }
        }
    }
    

    阿里云优惠卷,戳我领取

    展开全文
  • 有关于.net 仿百度文库在线预览Word、Excel、PPT等office相关文件
    有关于.net 仿百度文库在线预览Word、Excel、PPT等office相关文件。这里我们使用Aspose相关组件,将office文件转化为Pdf格式文件存储或在线预览(Word可以存为Png格式,但是直接保存只会保存第一页)。
    

    Aspose.Words.dll 操作Word

    首先说转换为PDF格式存储和显示:

    /// <summary>
            /// 将Word转换为Pdf 
            /// </summary>
            /// <param name="strFilePath">文件地址</param>
            /// <param name="savepath">保存地址</param>
            /// <returns></returns>
            public bool Word2Pdf(string strFilePath,string savepath)
            {
    
                try
                {
    
                    Aspose.Words.Document doc = new Aspose.Words.Document(strFilePath);
                    //将Word保存到指定路径下 savepath:保存路径
                    doc.Save(savepath, Aspose.Words.SaveFormat.Pdf);
                    //将Word保存至数据流中 再通过Response显示在页面中
                    MemoryStream memStream = new MemoryStream();
                    doc.Save(memStream, Aspose.Words.SaveFormat.Pdf);
                    byte[] bt = memStream.ToArray();
                    Response.ContentType = "application/pdf";
                    Response.OutputStream.Write(bt, 0, bt.Length);
                    return true;
                }
                catch (Exception)
                {
                    return false;
                }
            }

    然后,在线以图片的形式显示在网页上,分页显示调用一次显示一张图片,可以添加js做成类似于翻书的效果。

    /// <summary>
            /// 将Word转换为Png 
            /// </summary>
            /// <param name="filepath">文件地址</param>
            /// <param name="pageIndex">要转换的页</param>
            /// <returns></returns>
    public void Word2Png(string filepath, int pageIndex)
            {
                MemoryStream memStream = new MemoryStream();
                Aspose.Words.Document doc = new Aspose.Words.Document(filepath);
                PageInfo pageInfo = Document.GetPageInfo(pageIndex);
                float scale = 100 / 100.0f;
                const int Resolution = 96;
                Size imgSize = pageInfo.GetSizeInPixels(scale, Resolution);
                using (Bitmap img = new Bitmap(imgSize.Width, imgSize.Height))
                {
                    img.SetResolution(Resolution, Resolution);
                    using (Graphics gfx = Graphics.FromImage(img))
                    {
                        gfx.Clear(Color.White);
                        Document.RenderToScale(pageIndex, gfx, 0, 0, scale);
                        img.Save(memStream, ImageFormat.Png);
                        }
                    }
                }
                // Send the bitmap data to the output stream.
                Response.ContentType = "image/png";
                byte[] imageData = memStream.ToArray();
                Response.OutputStream.Write(imageData, 0, imageData.Length);
            }

    Aspose.Cells.dll转换Excel为Pdf

    将Excel转换为Pdf格式显示或保存。

    /// <summary>
            /// 将Word转换为Pdf 
            /// </summary>
            /// <param name="strFilePath">文件地址</param>
            /// <param name="savepath">保存地址</param>
            /// <returns></returns>
    public bool Excel2Pdf(string fileName, string savepath)
            {
                try
                {
                    Aspose.Cells.Workbook excel = new Aspose.Cells.Workbook(fileName);
                    //将ppt保存到指定路径下 savepath:保存路径
                    excel.Save(savepath, Aspose.Cells.SaveFormat.Pdf);
                    //将ppt保存至数据流中 再通过Response显示在页面中
                    MemoryStream memStream = new MemoryStream();
                    excel.Save(memStream, Aspose.Cells.SaveFormat.Pdf);
                    byte[] bt = memStream.ToArray();
                    Response.ContentType = "application/pdf";
                    Response.OutputStream.Write(bt, 0, bt.Length);
                    return true;
                }
                catch (Exception)
                {
                    return false;
                }
            }

    Aspose.Slides.dll 操作PPT

    首先说转换为PDF格式存储和显示:

    /// <summary>
            /// 转换ppt文件在线预览
            /// </summary>
            /// <param name="fileName">文件路径</param>
            /// <param name="savepath">保存路径</param>
            /// <returns></returns>
            public bool ppt2Pdf(string fileName, string savepath)
            {
                try
                {
                    Aspose.Slides.Presentation ppt = new Aspose.Slides.Presentation(fileName);
                    //将ppt保存到指定路径下 savepath:保存路径
                    ppt.Save(savepath, Aspose.Slides.Export.SaveFormat.Pdf);
                    //将ppt保存至数据流中 再通过Response显示在页面中
                    MemoryStream memStream = new MemoryStream();
                    ppt.Save(memStream, Aspose.Slides.Export.SaveFormat.Pdf);
                    byte[] bt = memStream.ToArray();
                    Response.ContentType = "application/pdf";
                    Response.OutputStream.Write(bt, 0, bt.Length);
                    return true;
                }
                catch (Exception)
                {
                    return false;
                }
            }

    官网地址:www.aspose.com.
    官方是要钱的,免费的大多数会有水印,不过神通广大的网友们还是有提供去除水印的dll,目前不知道是不是限时的。

    展开全文
  • 去除水印代码 public const string Key = "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" + "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc...

    1、去除水印代码

    public const string Key =
                "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" +
                "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc2UuY2" +
                "9tPC9FbWFpbFRvPg0KICAgIDxMaWNlbnNlVHlwZT5EZXZlbG9wZXIgT0VNPC9MaWNlbnNlV" +
                "HlwZT4NCiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1p" +
                "dGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+DQogICAgPE9yZGVySUQ+MTQ" +
                "wNDA4MDUyMzI0PC9PcmRlcklEPg0KICAgIDxVc2VySUQ+OTQyMzY8L1VzZXJJRD4NCiAgIC" +
                "A8T0VNPlRoaXMgaXMgYSByZWRpc3RyaWJ1dGFibGUgbGljZW5zZTwvT0VNPg0KICAgIDxQc" +
                "m9kdWN0cz4NCiAgICAgIDxQcm9kdWN0PkFzcG9zZS5Ub3RhbCBmb3IgLk5FVDwvUHJvZHVj" +
                "dD4NCiAgICA8L1Byb2R1Y3RzPg0KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl" +
                "0aW9uVHlwZT4NCiAgICA8U2VyaWFsTnVtYmVyPjlhNTk1NDdjLTQxZjAtNDI4Yi1iYTcyLT" +
                "djNDM2OGYxNTFkNzwvU2VyaWFsTnVtYmVyPg0KICAgIDxTdWJzY3JpcHRpb25FeHBpcnk+M" +
                "jAxNTEyMzE8L1N1YnNjcmlwdGlvbkV4cGlyeT4NCiAgICA8TGljZW5zZVZlcnNpb24+My4w" +
                "PC9MaWNlbnNlVmVyc2lvbj4NCiAgICA8TGljZW5zZUluc3RydWN0aW9ucz5odHRwOi8vd3d" +
                "3LmFzcG9zZS5jb20vY29ycG9yYXRlL3B1cmNoYXNlL2xpY2Vuc2UtaW5zdHJ1Y3Rpb25zLm" +
                "FzcHg8L0xpY2Vuc2VJbnN0cnVjdGlvbnM+DQogIDwvRGF0YT4NCiAgPFNpZ25hdHVyZT5GT" +
                "zNQSHNibGdEdDhGNTlzTVQxbDFhbXlpOXFrMlY2RThkUWtJUDdMZFRKU3hEaWJORUZ1MXpP" +
                "aW5RYnFGZkt2L3J1dHR2Y3hvUk9rYzF0VWUwRHRPNmNQMVpmNkowVmVtZ1NZOGkvTFpFQ1R" +
                "Hc3pScUpWUVJaME1vVm5CaHVQQUprNWVsaTdmaFZjRjhoV2QzRTRYUTNMemZtSkN1YWoyTk" +
                "V0ZVJpNUhyZmc9PC9TaWduYXR1cmU+DQo8L0xpY2Vuc2U+";
    			
    			
    			
    			
    			
    //使用下面代码前都加这个下面的		
    // new Aspose.Slides.License().SetLicense(new MemoryStream(Convert.FromBase64String(Key)));  //这个是sldes的,其他类似
    
    

    2、配套代码(c#)

    using Aspose.Cells;
    using Aspose.Words;
    using Aspose.Words.Fonts;
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Net.Http;
    using System.Web.Http;
    using BorderType = Aspose.Cells.BorderType;
    
    namespace manager.Controllers
    {
        public class topdfController : ApiController   //webapi
        {
            public const string Key =
                "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" +
                "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc2UuY2" +
                "9tPC9FbWFpbFRvPg0KICAgIDxMaWNlbnNlVHlwZT5EZXZlbG9wZXIgT0VNPC9MaWNlbnNlV" +
                "HlwZT4NCiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1p" +
                "dGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+DQogICAgPE9yZGVySUQ+MTQ" +
                "wNDA4MDUyMzI0PC9PcmRlcklEPg0KICAgIDxVc2VySUQ+OTQyMzY8L1VzZXJJRD4NCiAgIC" +
                "A8T0VNPlRoaXMgaXMgYSByZWRpc3RyaWJ1dGFibGUgbGljZW5zZTwvT0VNPg0KICAgIDxQc" +
                "m9kdWN0cz4NCiAgICAgIDxQcm9kdWN0PkFzcG9zZS5Ub3RhbCBmb3IgLk5FVDwvUHJvZHVj" +
                "dD4NCiAgICA8L1Byb2R1Y3RzPg0KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl" +
                "0aW9uVHlwZT4NCiAgICA8U2VyaWFsTnVtYmVyPjlhNTk1NDdjLTQxZjAtNDI4Yi1iYTcyLT" +
                "djNDM2OGYxNTFkNzwvU2VyaWFsTnVtYmVyPg0KICAgIDxTdWJzY3JpcHRpb25FeHBpcnk+M" +
                "jAxNTEyMzE8L1N1YnNjcmlwdGlvbkV4cGlyeT4NCiAgICA8TGljZW5zZVZlcnNpb24+My4w" +
                "PC9MaWNlbnNlVmVyc2lvbj4NCiAgICA8TGljZW5zZUluc3RydWN0aW9ucz5odHRwOi8vd3d" +
                "3LmFzcG9zZS5jb20vY29ycG9yYXRlL3B1cmNoYXNlL2xpY2Vuc2UtaW5zdHJ1Y3Rpb25zLm" +
                "FzcHg8L0xpY2Vuc2VJbnN0cnVjdGlvbnM+DQogIDwvRGF0YT4NCiAgPFNpZ25hdHVyZT5GT" +
                "zNQSHNibGdEdDhGNTlzTVQxbDFhbXlpOXFrMlY2RThkUWtJUDdMZFRKU3hEaWJORUZ1MXpP" +
                "aW5RYnFGZkt2L3J1dHR2Y3hvUk9rYzF0VWUwRHRPNmNQMVpmNkowVmVtZ1NZOGkvTFpFQ1R" +
                "Hc3pScUpWUVJaME1vVm5CaHVQQUprNWVsaTdmaFZjRjhoV2QzRTRYUTNMemZtSkN1YWoyTk" +
                "V0ZVJpNUhyZmc9PC9TaWduYXR1cmU+DQo8L0xpY2Vuc2U+";
            #region 把word转化成Pdf
            //转换成pdf
            // GET api/changepdf
            [HttpGet]
            public string changepdf(string ss)
            {
    
                string path = System.Web.Hosting.HostingEnvironment.MapPath(ss);   //ss是文件名  gg.docx这样
    
                //return path;
                try
                {
                    string inpdf = path;
                    string outpdf = @"/filedata/1111.pdf";             //输出文件
                    new Aspose.Words.License().SetLicense(new MemoryStream(Convert.FromBase64String(Key)));
    
    
    
    
                    string outtopdf = System.Web.Hosting.HostingEnvironment.MapPath(outpdf);   //计算出绝对路径
    
                    //ExcelConvert.ExcelConvertManage.StartConvert(inpdf, outpdf);
                    Document doc = new Document(inpdf);
    
                    doc.Save(outtopdf, Aspose.Words.SaveFormat.Pdf);
    
                    return outpdf;
                }
                catch (Exception ex)
                {
                    return ex.Message;
                }
    
            }
            #endregion
            #region ppt转换为pdf
            //[Route("topdf/ppttopdf")]
            [HttpGet]
            public string ppttopdf(string ss)
            {
    
                string path = System.Web.Hosting.HostingEnvironment.MapPath(ss);
    
                //return path;
                try
                {
                    string inpdf = path;
    
                    string outpdf = @"/filedata/1111.pdf";
    
                    new Aspose.Slides.License().SetLicense(new MemoryStream(Convert.FromBase64String(Key)));
    
                    string outtopdf = System.Web.Hosting.HostingEnvironment.MapPath(outpdf);
    
                    //AsposeLicenseHelper.SetSlidesLicense();
                    Aspose.Slides.Presentation doc = new Aspose.Slides.Presentation(inpdf);
                    doc.Save(outtopdf, Aspose.Slides.Export.SaveFormat.Pdf);
                    //doc.Save(outtopdf, Aspose.Words.SaveFormat.Pdf);
    
    
                    return outpdf;
                }
                catch (Exception ex)
                {
                    return ex.Message;
                }
    
            }
            #endregion
            #region excel转换成pdf
            //[Route("topdf/exceltopdf")]
            [HttpGet]
            public string exceltopdf(string ss)
            {
    
                string path = System.Web.Hosting.HostingEnvironment.MapPath(ss);
    
                //return path;
                try
                {
                    string inpdf = path;
    
                    string outpdf = @"/filedata/1111.pdf";
    
                    new Aspose.Cells.License().SetLicense(new MemoryStream(Convert.FromBase64String(Key)));
    
                    string outtopdf = System.Web.Hosting.HostingEnvironment.MapPath(outpdf);
    
    
                    Aspose.Cells.Workbook excel = new Workbook(inpdf);
    
    
    
                    excel.Save(outtopdf, Aspose.Cells.SaveFormat.Pdf);
    
    
                    return outpdf;
                }
                catch (Exception ex)
                {
                    return ex.Message;
                }
    
            }
            #endregion
        }
    }
    
    

    3、aspose操作代码(word,excel,ppt转pdf然后再转图片显示)(这是我转来收藏的代码)

    using Aspose.Cells;
    using Aspose.Words.Saving;
    using ESBasic;
    using OMCS.Engine.WhiteBoard;
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Drawing.Imaging;
    using System.IO;
    using System.Linq;
    using System.Threading;
    using System.Web;
    using System.Web.UI;
    using SMES.LocaleManagerWeb.DoucmentManager;
    using ImageSaveOptions = Aspose.Words.Saving.ImageSaveOptions;
    using SaveFormat = Aspose.Words.SaveFormat;
     
    namespace SMES.LocaleManagerWeb
    {
        public partial class Upload : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                //new Aspose.Words.License().SetLicense(AsposeLicenseHelper.LStream);
                //new Aspose.Cells.License().SetLicense(AsposeLicenseHelper.LStream);
                //new Aspose.Slides.License().SetLicense(AsposeLicenseHelper.LStream);
                //new Aspose.Pdf.License().SetLicense(AsposeLicenseHelper.LStream);
                string documentExts = "pdf|doc|docx|xlsx|xls|ppt|pptx";
                string imageExts = "jpeg|png|jpg|bmp";
                string otherExts = "pdf|xls|xlsx|ppt|pptx";
                HttpFileCollection files = Request.Files;//这里只能用<input type="file" />才能有效果,因为服务器控件是HttpInputFile类型
     
                FileUpModel model = new FileUpModel();
                if (files.Count == 0 || files[0].InputStream.Length == 0)
                {
                    model = new FileUpModel() { State = 0, Error = "没有找到文件" };
                    Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(model));
                    //Response.End();
                    return;
                }
     
                try
                {
                    HttpPostedFile file = files[0];
                    model.Extension = GetExtension(file.FileName);
                    if ((documentExts + "|" + imageExts + "|" + otherExts).IndexOf(model.Extension.ToLower()) == -1)
                    {
                        model = new FileUpModel() { State = 0, Error = "不允许上传" + model.Extension + "类型文件" };
                        Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(model));
                        //Response.End();
                        return;
                    }
     
                    model.Size = file.ContentLength / 1024;
                    DateTime nowtime = DateTime.Now;
                    string dic = "/UpLoadFile/" + nowtime.ToString("yy/MM/dd/");
                    string newFilename = "/UpLoadFile/" + nowtime.ToString("yy/MM/dd/") + Guid.NewGuid().ToString("N") + "." + model.Extension;
                    string filepath = Server.MapPath("~" + newFilename);
                    if (!System.IO.Directory.Exists(Server.MapPath(dic)))
                    {
                        System.IO.Directory.CreateDirectory(Server.MapPath(dic));
                    }
                    file.SaveAs(filepath);
                    //将文档装换为图图片
                    if (documentExts.IndexOf(model.Extension.ToLower()) != -1)
                    {
                        //图片目录
                        string imagedic = newFilename.Replace("." + model.Extension, "");
                        IImageConverterFactory f = new ImageConverterFactory();
                        IImageConverter imageConverter = f.CreateImageConverter("." + model.Extension);
                        string opath = Server.MapPath("~" + newFilename);
                        string imgpath = Server.MapPath("~" + imagedic + "/");
                        Thread thd = new Thread(new ThreadStart(() => { imageConverter.ConvertToImage(opath, imgpath); }));
                        thd.Start();
                        //DocumentToImage(newFilename, imagedic);
                        model.ImagePath = imagedic;
                    }
     
                    model.State = 1;
                    model.Path = newFilename;
     
                    Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(model));
     
                }
                catch (Exception ee)
                {
                    model = new FileUpModel() { State = 0, Error = ee.Message };
                    Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(model));
                    Response.End();
                }
            }
     
            private void DocumentToImage(string filename, string imagedic)
            {
                Thread thd = new Thread(new ThreadStart(() =>
                {
                    ConvertWordToImage(Server.MapPath("~" + filename), Server.MapPath("~" + imagedic + "/"), "A", 0, 0, ImageFormat.Png, 0);
                }));
                thd.Start();
     
            }
     
            private string GetExtension(string filename)
            {
                if (string.IsNullOrEmpty(filename))
                    return "";
     
                string[] strs = filename.Split('.');
     
                if (strs.Length > 0)
                {
                    return strs[strs.Length - 1];
                }
                else
                {
                    return "";
                }
            }
     
            public void ConvertWordToImage(string wordInputPath, string imageOutputPath,
                string imageName, int startPageNum, int endPageNum, ImageFormat imageFormat, float resolution)
            {
                try
                {
                    AsposeLicenseHelper.SetWordsLicense();
                    // open word file
                    Aspose.Words.Document doc = new Aspose.Words.Document(wordInputPath);
     
                    // validate parameter
                    if (doc == null) { throw new Exception("Word文件无效或者Word文件被加密!"); }
                    if (imageOutputPath.Trim().Length == 0) { imageOutputPath = Path.GetDirectoryName(wordInputPath); }
                    if (!Directory.Exists(imageOutputPath)) { Directory.CreateDirectory(imageOutputPath); }
                    if (imageName.Trim().Length == 0) { imageName = Path.GetFileNameWithoutExtension(wordInputPath); }
                    if (startPageNum <= 0) { startPageNum = 1; }
                    if (endPageNum > doc.PageCount || endPageNum <= 0) { endPageNum = doc.PageCount; }
                    if (startPageNum > endPageNum) { int tempPageNum = startPageNum; startPageNum = endPageNum; endPageNum = startPageNum; }
                    if (imageFormat == null) { imageFormat = ImageFormat.Png; }
                    if (resolution <= 0) { resolution = 128; }
     
                    var imageSaveOptions = new ImageSaveOptions(GetSaveFormat(imageFormat))
                    {
                        Resolution = resolution
                    };
     
                    // start to convert each page
                    for (int i = startPageNum; i <= endPageNum; i++)
                    {
                        imageSaveOptions.PageIndex = i - 1;
                        doc.Save(Path.Combine(imageOutputPath, imageName) + "_" + i.ToString() + "." + imageFormat.ToString(), imageSaveOptions);
                    }
                }
                catch (Exception ex)
                {
     
                }
            }
     
            private SaveFormat GetSaveFormat(ImageFormat imageFormat)
            {
                SaveFormat sf = SaveFormat.Unknown;
                if (imageFormat.Equals(ImageFormat.Png))
                    sf = SaveFormat.Png;
                else if (imageFormat.Equals(ImageFormat.Jpeg))
                    sf = SaveFormat.Jpeg;
                else if (imageFormat.Equals(ImageFormat.Tiff))
                    sf = SaveFormat.Tiff;
                else if (imageFormat.Equals(ImageFormat.Bmp))
                    sf = SaveFormat.Bmp;
                else
                    sf = SaveFormat.Unknown;
                return sf;
            }
     
     
        }
     
     
        public class FileUpModel
        {
            /// <summary>
            /// 状态  1成功  0失败
            /// </summary>
            public int State
            { get; set; }
     
            /// <summary>
            /// 错误信息
            /// </summary>
            public string Error
            { get; set; }
     
            /// <summary>
            /// 文件大小
            /// </summary>
            public decimal Size
            {
                get;
                set;
            }
     
            /// <summary>
            /// 服务端路径
            /// </summary>
            public string Path
            { get; set; }
     
            public string ImagePath
            { get; set; }
     
            public string Extension
            { get; set; }
     
        }
     
        #region 图片转换器工厂 -> 将被注入到OMCS的多媒体管理器IMultimediaManager的ImageConverterFactory属性
        /// <summary>
        /// 图片转换器工厂。
        /// </summary>
        public class ImageConverterFactory : IImageConverterFactory
        {
            public IImageConverter CreateImageConverter(string extendName)
            {
                if (extendName == ".doc" || extendName == ".docx")
                {
                    return new Word2ImageConverter();
                }
     
                if (extendName == ".pdf")
                {
                    return new Pdf2ImageConverter();
                }
     
                if (extendName == ".ppt" || extendName == ".pptx")
                {
                    return new Ppt2ImageConverter();
                }
                if (extendName == ".xls" || extendName == ".xlsx")
                {
                    return new Xls2ImageConverter();
                }
                return null;
            }
     
            public bool Support(string extendName)
            {
                return extendName == ".doc" || extendName == ".docx" || extendName == ".pdf" || extendName == ".ppt" || extendName == ".pptx" || extendName == ".rar";
            }
        }
        #endregion
     
        #region 将word文档转换为图片
        public class Word2ImageConverter : IImageConverter
        {
            private bool cancelled = false;
            public event CbGeneric<int, int> ProgressChanged;
            public event CbGeneric ConvertSucceed;
            public event CbGeneric<string> ConvertFailed;
     
            public void Cancel()
            {
                if (this.cancelled)
                {
                    return;
                }
     
                this.cancelled = true;
            }
     
            public void ConvertToImage(string originFilePath, string imageOutputDirPath)
            {
                this.cancelled = false;
                ConvertToImage(originFilePath, imageOutputDirPath, 0, 0, null, 200);
            }
     
            /// <summary>
            /// 将Word文档转换为图片的方法     
            /// </summary>
            /// <param name="wordInputPath">Word文件路径</param>
            /// <param name="imageOutputDirPath">图片输出路径,如果为空,默认值为Word所在路径</param>     
            /// <param name="startPageNum">从PDF文档的第几页开始转换,如果为0,默认值为1</param>
            /// <param name="endPageNum">从PDF文档的第几页开始停止转换,如果为0,默认值为Word总页数</param>
            /// <param name="imageFormat">设置所需图片格式,如果为null,默认格式为PNG</param>
            /// <param name="resolution">设置图片的像素,数字越大越清晰,如果为0,默认值为128,建议最大值不要超过1024</param>
            private void ConvertToImage(string wordInputPath, string imageOutputDirPath, int startPageNum, int endPageNum, ImageFormat imageFormat, int resolution)
            {
                try
                {
     
                    AsposeLicenseHelper.SetWordsLicense();
                    Aspose.Words.Document doc = new Aspose.Words.Document(wordInputPath);
     
                    if (doc == null)
                    {
                        throw new Exception("Word文件无效或者Word文件被加密!");
                    }
     
                    if (imageOutputDirPath.Trim().Length == 0)
                    {
                        imageOutputDirPath = Path.GetDirectoryName(wordInputPath);
                    }
     
                    if (!Directory.Exists(imageOutputDirPath))
                    {
                        Directory.CreateDirectory(imageOutputDirPath);
                    }
     
                    if (startPageNum <= 0)
                    {
                        startPageNum = 1;
                    }
     
                    if (endPageNum > doc.PageCount || endPageNum <= 0)
                    {
                        endPageNum = doc.PageCount;
                    }
     
                    if (startPageNum > endPageNum)
                    {
                        int tempPageNum = startPageNum; startPageNum = endPageNum; endPageNum = startPageNum;
                    }
     
                    if (imageFormat == null)
                    {
                        imageFormat = ImageFormat.Png;
                    }
     
                    if (resolution <= 0)
                    {
                        resolution = 128;
                    }
                    string imageName = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(wordInputPath));
                    //string imageName = Path.GetFileNameWithoutExtension(wordInputPath);
                    Aspose.Words.Saving.ImageSaveOptions imageSaveOptions = new Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Png);
                    imageSaveOptions.Resolution = resolution;
                    for (int i = startPageNum; i <= endPageNum; i++)
                    {
                        if (this.cancelled)
                        {
                            break;
                        }
     
                        MemoryStream stream = new MemoryStream();
                        imageSaveOptions.PageIndex = i - 1;
                        //string imgPath = Path.Combine(imageOutputDirPath, imageName) + "_" + i.ToString("000") + "." + imageFormat.ToString();
                        string imgPath = Path.Combine(imageOutputDirPath, "A") + "_" + i + ".Png";
                        doc.Save(stream, imageSaveOptions);
                        System.Drawing.Image img = System.Drawing.Image.FromStream(stream);
                        Bitmap bm = ESBasic.Helpers.ImageHelper.Zoom(img, 0.6f);
                        bm.Save(imgPath, imageFormat);
                        img.Dispose();
                        stream.Dispose();
                        bm.Dispose();
     
                        System.Threading.Thread.Sleep(200);
                        if (this.ProgressChanged != null)
                        {
                            this.ProgressChanged(i - 1, endPageNum);
                        }
                    }
     
                    if (this.cancelled)
                    {
                        return;
                    }
     
                    if (this.ConvertSucceed != null)
                    {
                        this.ConvertSucceed();
                    }
                }
                catch (Exception ex)
                {
                    if (this.ConvertFailed != null)
                    {
                        this.ConvertFailed(ex.Message);
                    }
                }
            }
        }
        #endregion
     
        #region 将pdf文档转换为图片
        public class Pdf2ImageConverter : IImageConverter
        {
            private bool cancelled = false;
            public event CbGeneric<int, int> ProgressChanged;
            public event CbGeneric ConvertSucceed;
            public event CbGeneric<string> ConvertFailed;
     
            public void Cancel()
            {
                if (this.cancelled)
                {
                    return;
                }
     
                this.cancelled = true;
            }
     
            public void ConvertToImage(string originFilePath, string imageOutputDirPath)
            {
                this.cancelled = false;
                ConvertToImage(originFilePath, imageOutputDirPath, 0, 0, 200);
            }
     
            /// <summary>
            /// 将pdf文档转换为图片的方法     
            /// </summary>
            /// <param name="originFilePath">pdf文件路径</param>
            /// <param name="imageOutputDirPath">图片输出路径,如果为空,默认值为pdf所在路径</param>      
            /// <param name="startPageNum">从PDF文档的第几页开始转换,如果为0,默认值为1</param>
            /// <param name="endPageNum">从PDF文档的第几页开始停止转换,如果为0,默认值为pdf总页数</param>      
            /// <param name="resolution">设置图片的像素,数字越大越清晰,如果为0,默认值为128,建议最大值不要超过1024</param>
            private void ConvertToImage(string originFilePath, string imageOutputDirPath, int startPageNum, int endPageNum, int resolution)
            {
                try
                {
                    AsposeLicenseHelper.SetPdfLicense();
                    Aspose.Pdf.Document doc = new Aspose.Pdf.Document(originFilePath);
     
                    if (doc == null)
                    {
                        throw new Exception("pdf文件无效或者pdf文件被加密!");
                    }
     
                    if (imageOutputDirPath.Trim().Length == 0)
                    {
                        imageOutputDirPath = Path.GetDirectoryName(originFilePath);
                    }
     
                    if (!Directory.Exists(imageOutputDirPath))
                    {
                        Directory.CreateDirectory(imageOutputDirPath);
                    }
     
                    if (startPageNum <= 0)
                    {
                        startPageNum = 1;
                    }
     
                    if (endPageNum > doc.Pages.Count || endPageNum <= 0)
                    {
                        endPageNum = doc.Pages.Count;
                    }
     
                    if (startPageNum > endPageNum)
                    {
                        int tempPageNum = startPageNum; startPageNum = endPageNum; endPageNum = startPageNum;
                    }
     
                    if (resolution <= 0)
                    {
                        resolution = 128;
                    }
     
                    string imageNamePrefix = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(originFilePath));
                    for (int i = startPageNum; i <= endPageNum; i++)
                    {
                        if (this.cancelled)
                        {
                            break;
                        }
     
                        MemoryStream stream = new MemoryStream();
                        //string imgPath = Path.Combine(imageOutputDirPath, imageNamePrefix) + "_" + i.ToString("000") + ".Png";
                        string imgPath = Path.Combine(imageOutputDirPath, "A") + "_" + i + ".Png";
                        Aspose.Pdf.Devices.Resolution reso = new Aspose.Pdf.Devices.Resolution(resolution);
                        Aspose.Pdf.Devices.JpegDevice jpegDevice = new Aspose.Pdf.Devices.JpegDevice(reso, 100);
                        jpegDevice.Process(doc.Pages[i], stream);
     
                        Image img = Image.FromStream(stream);
                        Bitmap bm = ESBasic.Helpers.ImageHelper.Zoom(img, 0.6f);
                        bm.Save(imgPath, ImageFormat.Jpeg);
                        img.Dispose();
                        stream.Dispose();
                        bm.Dispose();
     
                        System.Threading.Thread.Sleep(200);
                        if (this.ProgressChanged != null)
                        {
                            this.ProgressChanged(i - 1, endPageNum);
                        }
                    }
     
                    if (this.cancelled)
                    {
                        return;
                    }
     
                    if (this.ConvertSucceed != null)
                    {
                        this.ConvertSucceed();
                    }
                }
                catch (Exception ex)
                {
                    if (this.ConvertFailed != null)
                    {
                        this.ConvertFailed(ex.Message);
                    }
                }
            }
        }
        #endregion
     
        #region 将ppt文档转换为图片
        public class Ppt2ImageConverter : IImageConverter
        {
            private Pdf2ImageConverter pdf2ImageConverter;
            public event CbGeneric<int, int> ProgressChanged;
            public event CbGeneric ConvertSucceed;
            public event CbGeneric<string> ConvertFailed;
     
            public void Cancel()
            {
                if (this.pdf2ImageConverter != null)
                {
                    this.pdf2ImageConverter.Cancel();
                }
            }
     
            public void ConvertToImage(string originFilePath, string imageOutputDirPath)
            {
                ConvertToImage(originFilePath, imageOutputDirPath, 0, 0, 200);
            }
     
            /// <summary>
            /// 将pdf文档转换为图片的方法     
            /// </summary>
            /// <param name="originFilePath">ppt文件路径</param>
            /// <param name="imageOutputDirPath">图片输出路径,如果为空,默认值为pdf所在路径</param>      
            /// <param name="startPageNum">从PDF文档的第几页开始转换,如果为0,默认值为1</param>
            /// <param name="endPageNum">从PDF文档的第几页开始停止转换,如果为0,默认值为pdf总页数</param>      
            /// <param name="resolution">设置图片的像素,数字越大越清晰,如果为0,默认值为128,建议最大值不要超过1024</param>
            private void ConvertToImage(string originFilePath, string imageOutputDirPath, int startPageNum, int endPageNum, int resolution)
            {
                try
                {
                    AsposeLicenseHelper.SetSlidesLicense();
                    Aspose.Slides.Presentation doc = new Aspose.Slides.Presentation(originFilePath);
     
                    if (doc == null)
                    {
                        throw new Exception("ppt文件无效或者ppt文件被加密!");
                    }
     
                    if (imageOutputDirPath.Trim().Length == 0)
                    {
                        imageOutputDirPath = Path.GetDirectoryName(originFilePath);
                    }
     
                    if (!Directory.Exists(imageOutputDirPath))
                    {
                        Directory.CreateDirectory(imageOutputDirPath);
                    }
     
                    if (startPageNum <= 0)
                    {
                        startPageNum = 1;
                    }
     
                    if (endPageNum > doc.Slides.Count || endPageNum <= 0)
                    {
                        endPageNum = doc.Slides.Count;
                    }
     
                    if (startPageNum > endPageNum)
                    {
                        int tempPageNum = startPageNum; startPageNum = endPageNum; endPageNum = startPageNum;
                    }
     
                    if (resolution <= 0)
                    {
                        resolution = 128;
                    }
     
                    //先将ppt转换为pdf临时文件
                    string tmpPdfPath = originFilePath + ".pdf";
                    doc.Save(tmpPdfPath, Aspose.Slides.Export.SaveFormat.Pdf);
     
                    //再将pdf转换为图片
                    Pdf2ImageConverter converter = new Pdf2ImageConverter();
                    converter.ConvertFailed += new CbGeneric<string>(converter_ConvertFailed);
                    converter.ConvertSucceed += new CbGeneric(converter_ConvertSucceed);
                    converter.ProgressChanged += new CbGeneric<int, int>(converter_ProgressChanged);
                    converter.ConvertToImage(tmpPdfPath, imageOutputDirPath);
     
                    //删除pdf临时文件
                    File.Delete(tmpPdfPath);
     
                    if (this.ConvertSucceed != null)
                    {
                        this.ConvertSucceed();
                    }
                }
                catch (Exception ex)
                {
                    if (this.ConvertFailed != null)
                    {
                        this.ConvertFailed(ex.Message);
                    }
                }
     
                this.pdf2ImageConverter = null;
            }
     
            void converter_ProgressChanged(int done, int total)
            {
                if (this.ProgressChanged != null)
                {
                    this.ProgressChanged(done, total);
                }
            }
     
            void converter_ConvertSucceed()
            {
                if (this.ConvertSucceed != null)
                {
                    this.ConvertSucceed();
                }
            }
     
            void converter_ConvertFailed(string msg)
            {
                if (this.ConvertFailed != null)
                {
                    this.ConvertFailed(msg);
                }
            }
        }
        #endregion
     
        #region Excel
        public class Xls2ImageConverter : IImageConverter
        {
            private Xls2ImageConverter xls2ImageConverter;
            public event CbGeneric<int, int> ProgressChanged;
            public event CbGeneric ConvertSucceed;
            public event CbGeneric<string> ConvertFailed;
     
            public void Cancel()
            {
                if (this.xls2ImageConverter != null)
                {
                    this.xls2ImageConverter.Cancel();
                }
            }
     
            public void ConvertToImage(string originFilePath, string imageOutputDirPath)
            {
                ConvertToImage(originFilePath, imageOutputDirPath, 0, 0, 200);
            }
     
            private void ConvertToImage(string originFilePath, string imageOutputDirPath, int startPageNum, int endPageNum, int resolution)
            {
                try
                {
                    AsposeLicenseHelper.SetCellsLicense();
                    Aspose.Cells.Workbook excel = new Workbook(originFilePath);
     
                    if (excel == null)
                    {
                        throw new Exception("excel文件无效或者excel文件被加密!");
                    }
     
                    if (imageOutputDirPath.Trim().Length == 0)
                    {
                        imageOutputDirPath = Path.GetDirectoryName(originFilePath);
                    }
     
                    if (!Directory.Exists(imageOutputDirPath))
                    {
                        Directory.CreateDirectory(imageOutputDirPath);
                    }
     
                    if (startPageNum <= 0)
                    {
                        startPageNum = 1;
                    }
     
                    if (endPageNum > excel.Worksheets.Count || endPageNum <= 0)
                    {
                        endPageNum = excel.Worksheets.Count;
                    }
     
                    if (startPageNum > endPageNum)
                    {
                        int tempPageNum = startPageNum; startPageNum = endPageNum; endPageNum = startPageNum;
                    }
     
                    if (resolution <= 0)
                    {
                        resolution = 128;
                    }
     
                    //先将excel转换为pdf临时文件
                    string tmpPdfPath = originFilePath + ".pdf";
                    excel.Save(tmpPdfPath, Aspose.Cells.SaveFormat.Pdf);
     
                    //再将pdf转换为图片
                    Pdf2ImageConverter converter = new Pdf2ImageConverter();
                    converter.ConvertFailed += new CbGeneric<string>(converter_ConvertFailed);
                    converter.ConvertSucceed += new CbGeneric(converter_ConvertSucceed);
                    converter.ProgressChanged += new CbGeneric<int, int>(converter_ProgressChanged);
                    converter.ConvertToImage(tmpPdfPath, imageOutputDirPath);
     
                    //删除pdf临时文件
                    File.Delete(tmpPdfPath);
     
                    if (this.ConvertSucceed != null)
                    {
                        this.ConvertSucceed();
                    }
                }
                catch (Exception ex)
                {
                    if (this.ConvertFailed != null)
                    {
                        this.ConvertFailed(ex.Message);
                    }
                }
     
                this.xls2ImageConverter = null;
            }
     
            void converter_ProgressChanged(int done, int total)
            {
                if (this.ProgressChanged != null)
                {
                    this.ProgressChanged(done, total);
                }
            }
     
            void converter_ConvertSucceed()
            {
                if (this.ConvertSucceed != null)
                {
                    this.ConvertSucceed();
                }
            }
     
            void converter_ConvertFailed(string msg)
            {
                if (this.ConvertFailed != null)
                {
                    this.ConvertFailed(msg);
                }
            }
        }
        #endregion
    }
    

    配套aspose.dll
    链接:https://pan.baidu.com/s/1kOG4rK7jxDk5yUjYhNa3VQ
    提取码:g3iq

    展开全文
  • 使用 Spire.Pdf 生成书签但是有 Evaluation Warning : The document was created with Spire.PDF for .NET.字样 这里用到了两个插件 Spire.Pdf 与 iTextSharp 请在 NuGet 下载安装 由于使用 Spire.Pdf 生成的...
  • 本文是鉴于有些粉丝的工作需求,有时候需要遇到这些文件的处理。因此,我写了一个文章集合,供大家参考,整篇文章已经整理成册(如下图所示),如有需求,请私聊! 目录   章节一:python使用openpyxl操作excel ...
  • 相信很多小伙伴们在做导出pdf或者excel文件时会被要求在文件上加上水印,本篇博客就来讲讲如何为pdf和excel加水印。 导出pdf水印 其实在导出pdf时加上水印并不难,因为itext提供了添加水印的方法,而且能设置...
  • 不说话,直接上代码   /** * @CopyRright (c)2011: BrokenStone * @Project: WordWatermark * @File: RemoveWordWatermark.java * @JDK version used: JDK1.6 @&... * @Blog: ht...
  • codeproject

    万次阅读 2007-03-26 07:31:00
    ApplicationsCrafting a C# forms Editor From scratchhttp://www.codeproject.com/csharp/SharpFormEditorDemo.asp建立一个类似C#的环境, 实现控件拖拉,属性 Packet Capture and Analayzer网络封包截获...
  • Mac实用软件及功能吐血总结

    万次阅读 2018-03-26 11:13:39
    本人一年半来跟踪Mac志(http://www.isofts.org/category/software-for-mac-os-x/)、MacGG(http://www.macgg.com/archives/category/mac软件),潜心测试,用心总结出以下mac实用软件列表,尤其适合程序员……软件...
  •  java在线预览仿百度文库源代码:http://download.csdn.net/detail/u013456370/8912901 在线预览工具:... java实现文本文档转换成pdf,再转换成swf格式文档:http://download.csdn.net/detail/u0134
  • Mac实用软件及功能总结

    万次阅读 2014-09-17 09:36:55
    zh'zhuang 转载▼ 本人一年半来跟踪Mac志(http://www.isofts.org/category/software-for-mac-os-x/)、MacGG(http://www.macgg.com/archives/category/mac软件)... ...软件介绍多摘自以上两个网站,在此表示感谢。
  • Code Project精彩系列

    千次阅读 2011-06-15 23:29:00
    ApplicationsCrafting a C# forms Editor From scratchhttp://www.codeproject.com/csharp/SharpFormEditorDemo.asp建立一个类似C#的环境, 实现控件拖拉,属性Packet Capture and Analayzer网络封包截获...
  • WTF_Daily_Blog

    千次阅读 2017-10-25 18:57:09
    http://blog.topspeedsnail.com/page/1thefuck: 自动纠正前一个命令的拼写错误 徒步中的程序猿-重庆出发 TensorFlow练习27: 验证码生成器-从文本生成图像 从2D图片生成3D模型(3D-GAN) TensorFlow练习26: AI...
  • 源码的下载地址时http://yunpan.cn/cjwwij3FcBtZV 访问密码3579 本列表源码永久免费下载地址...卷 yunpan 的文件夹 PATH 列表 卷序列号为 0000-73EC E:. ...│ 例子大全说明.txt │ 本例子永久更新地址~.url │
  • Code Project

    千次阅读 2011-02-26 21:44:00
    Code Project
  • android安卓源码海量项目合集打包-1

    万次阅读 2019-06-11 16:16:24
    下载地址 最后更新共计113个分类5177套源码29.2 GB。 卷 新加卷 的文件夹 PATH 列表 卷序列号为 00000200 5E7A:7F30 F:. ├─前台界面 │ ├─3D标签云卡片热门 │ │ Android TagCloudView云标签的灵活运用.rar ...
  • down下来,以后容易找! Applications Crafting a C# forms Editor From scratch ... 建立一个类似C#的环境, 实现控件拖拉,属性 Packet Capture and Analayzer 网络封包截获 ht
  • Code Project精彩系列(转)

    千次阅读 2011-10-17 09:51:16
    Applications Crafting a C# forms Editor From scratch http://www.codeproject.com/csharp/SharpFormEditorDemo.asp 建立一个类似C#的环境, 实现控
1 2 3 4
收藏数 68
精华内容 27
关键字:

pageoffice pdf去掉水印