提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|产品更新|编辑:龚雪|2014-10-27 09:36:13.000|阅读 400 次
概述:Aspose.Pdf 9.7发布,涵盖120多项更新
# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>
Aspose.Pdf 9.7主要更新内容:
好消息!慧都控件网年终大促即将拉开大幕。11月1日起本站产品将开展为期一个月的促销打折活动。其中Aspose.Pdf白金版,Aspose.Pdf黄金版更有八折优惠,敬请期待!
// Load PDF document Document doc = new Document("c:/pdftest/output_attach.pdf"); // Create attachment annoation FileAttachmentAnnotation fileAttachment = new FileAttachmentAnnotation(doc.Pages[1], new Aspose.Pdf.Rectangle(0, 0, 16, 16), doc.EmbeddedFiles[1]); // Add attachment to first page of PDF doc.Pages[1].Annotations.Add(fileAttachment); // Set title for attachment fileAttachment.Title = "Attached file"; // Save the PDF file doc.Save("c:/pdftest/Attachmentlink.pdf");
// Select desirable page size float newPageWidth = 400f; float newPageHeight = 400f; // Tune PdfPageEditor class Aspose.Pdf.Facades.PdfPageEditor pdfEditor = new Aspose.Pdf.Facades.PdfPageEditor(); // Bind source PDF file pdfEditor.BindPdf("c:/pdftest/TextReplaced.pdf"); // Set the page dimensions pdfEditor.PageSize = new Aspose.Pdf.PageSize(newPageWidth, newPageHeight); // Set vertical alignment for page as center aligned pdfEditor.VerticalAlignmentType = Aspose.Pdf.VerticalAlignment.Center; // Set Horizontal alignment for page as center aligned pdfEditor.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Center; // This scales page content to fit width, // comment it out or set Zoom to 1.0F if You don't want to scale // content and only want to change page's size(i.e. crop it) float zoom = Math.Min((float)newPageWidth / (float)pdfEditor.Document.Pages[1].Rect.Width, (float)newPageHeight / (float)pdfEditor.Document.Pages[1].Rect.Height); pdfEditor.Zoom = zoom;// (float)595; // Create stream object to hold file with updated dimensions MemoryStream output = new MemoryStream(); // Save file to stream object pdfEditor.Save(output); // Then reload scaled document and save it to HTML Document exportDoc = new Document(output); HtmlSaveOptions htmlOptions = new HtmlSaveOptions(); // This code shows page boreder in result - sometimes it comes in handy to see borders SaveOptions.BorderPartStyle borderStyle = new SaveOptions.BorderPartStyle(); borderStyle.LineType = SaveOptions.HtmlBorderLineType.Dotted; borderStyle.Color = System.Drawing.Color.Gray; htmlOptions.PageBorderIfAny = new SaveOptions.BorderInfo(borderStyle); // Conversion to HTML itself exportDoc.Save(@"C:\pdftest\37240_Test1.html", htmlOptions); // Close the stream object output.Close();
// Load PDF file Document doc = new Aspose.Pdf.Document("input.pdf"); // Set PDF/A compliance as PDF/A_1a doc.Convert(new MemoryStream(), PdfFormat.PDF_A_2A, ConvertErrorAction.Delete); // Save updated document doc.Save("compliant.pdf");
// Instantiate Document object Document doc = new Document(); // Create an image instance Aspose.Pdf.Image img = new Aspose.Pdf.Image(); // Set image type as SVG img.FileType = Aspose.Pdf.ImageFileType.Svg; // Path for source file img.File = "c:/pdftest/img_03.svg"; // Set width for image instance img.FixWidth = 50; // Set height for image instance img.FixHeight = 50; // Create table instance Aspose.Pdf.Table table = new Aspose.Pdf.Table(); // Set width for table cells table.ColumnWidths = "100 100"; // Create row object and add it to table instance Aspose.Pdf.Row row = table.Rows.Add(); // Create cell object and add it to row instance Aspose.Pdf.Cell cell = row.Cells.Add(); // Add textfragment to paragraphs collection of cell object cell.Paragraphs.Add(new TextFragment("First cell")); // Add another cell to row object cell = row.Cells.Add(); // Add SVG image to paragraphs collection of recently added cell instance cell.Paragraphs.Add(img); // Create page object and add it to pages collection of document instance Page page = doc.Pages.Add(); // Add table to paragraphs collection of page object page.Paragraphs.Add(table); // Save PDF file doc.Save("c:/pdftest/SVG_in_TableCell.pdf");
// Instantiate Document instance Document pdfDocument = new Document(); // Add page to PDF file pdfDocument.Pages.Add(); // Create TextBuild object with first page as argument TextBuilder tb = new TextBuilder(pdfDocument.Pages[1]); // Create TextFragment instance with sample text TextFragment fragment = new TextFragment("Test message"); // Set the font for TextFragment fragment.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont("Arial"); // Set font size fragment.TextState.FontSize = 10; // Set text formatting as underline fragment.TextState.Underline = true; // Specify position for TextFragment fragment.Position = new Position(10, 800); // Add TextFragment to Text Builder instance tb.AppendText(fragment); // Save the PDF file pdfDocument.Save("c:/pdftest/UnderLine_output.pdf");
Document doc = new Document("37348.pdf"); string[] fields = doc.Form.XFA.FieldNames; XmlNode node = doc.Form.XFA.GetFieldTemplate(fields[0]); XmlNode items = node.SelectSingleNode("tpl:items", doc.Form.XFA.NamespaceManager); XmlNode item = items.OwnerDocument.CreateNode(XmlNodeType.Element, "text", items.NamespaceURI); item.InnerText = "Choice # 4 ( New )"; items.AppendChild(item); doc.Save("37348-out.pdf");
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn
文章转载自:慧都控件网知名C/C++开发工具CLion全新发布v2024.3,新版本新语言引擎有显著改进等,欢迎下载新版体验!
强大的VS插件CodeRush已正式发布v24.2.3,新版本现在可以运行xUnit.Net v3测试等,欢迎下载最新版体验!
Spire.PDF 10.12.4 最新版本支持在进行多页打印时设置自动旋转方向。同时,一些已知问题也在本次更新中被成功修复,例如打印 PDF 文档时内容丢失的问题,欢迎下载体验~
日程安排控件dhtmlxScheduler v7.2全新发布,新版本增强并增加了编辑、修改等多个操作体验,欢迎下载最新版试用~
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@pclwef.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢