当前位置: 首页 > news >正文

CSharp: Aspose.CAD 25.10 Convert DWG and DXF to PDF

 

 /// <summary>///  geovindu, Geovin Du,塗聚文,涂聚文/// </summary>/// <param name="sender"></param>/// <param name="e"></param>protected void Page_Load(object sender, EventArgs e){if(!IsPostBack){string cadPath = Server.MapPath("~/RDJ18.dwg");string outputPath = Server.MapPath("~/RDJ18.pdf");// Load a CAD drawing in an instance of CadImageusing (CadImage cadImage = (CadImage)Aspose.CAD.Image.Load(cadPath)){// Create an instance of PdfOptionsPdfOptions pdfOptions = new PdfOptions();// Create an instance of CadRasterizationOptions and set its various propertiesCadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions();cadRasterizationOptions.PageWidth = 1600;cadRasterizationOptions.PageHeight = 1600;// cadRasterizationOptions.CenterDrawing = true;//cadRasterizationOptions.ScaleMethod = ScaleType.Center;// Set the VectorRasterizationOptions propertypdfOptions.VectorRasterizationOptions = cadRasterizationOptions;// Export the CAD drawing to PDF formatcadImage.Save(outputPath, pdfOptions);}Response.Redirect("RDJ18.pdf");//Response.Write("CAD to PDF conversion completed. Check the output file at: " + outputPath);//Response.Close();}}

  

 

http://www.zskr.cn/news/21161.html

相关文章:

  • matlab 2025b + adalm-pluto 链接测试
  • Fortran 实现英文数字验证码识别系统
  • P3111 [USACO14DEC] Cow Jog S 题解 - 符星珞
  • Patch_SCN for Linux 功能完善---惜分飞
  • CSP-J 2025 入门级模拟赛 Day6 复盘 B. 罐の水表
  • 完整教程:Android Framework默认给应用添加dangerous级别权限
  • 高级语言作业第一次随笔
  • k8s Service Nodeport 用于集群外部访问
  • 10月14日日记
  • PHP虚拟主机测试页面
  • 20251014周二日记
  • 财务怎样做到业财融合 - 智慧园区
  • Gradle使用
  • Spring Boot项目中集成Spring Security OAuth2和Apache Shiro
  • 完整教程:S7-200 SMART 开放式用户通信(OUC)深度指南:TCP/ISO-on-TCP(上)
  • 2025 年浙江专升本培训学校推荐榜:浙江/台州/萧山/温州专升本机构,聚焦学历提升需求,杭州泓涵培训学校为学子护航
  • 25noip20d2t2 马戏表演 - Slayer
  • 完整教程:port trunk pvid vlan vlan-id 概念及题目
  • CF1784E
  • nSwitch 存档自动备份系统模块 - autoSAVE
  • 2025 年筛网厂家推荐榜:聚焦场景适配与高效需求,锰钢筛网/聚氨酯筛网/合金焊接筛网/自清洁筛网/防堵筛网厂家滨州沃森网业成优选
  • 先辈题解
  • 双指针的初步了解
  • 倍增并查集学习笔记
  • ZR 2025 NOIP 二十连测 #1
  • work1
  • 分布式秒杀系统设计方案 - 实践
  • 完整教程:面向.NET开发者:Prosys OPC UA .NET SDK 全面解析
  • 安装devc++过程的分享以及问题的记录
  • zlog1