当前位置: 首页 > 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.jsqmd.com/news/13727/

相关文章:

  • vtk学习——Pipeline
  • 长沙四大名校x东方project
  • Rust 的英文数字验证码识别系统设计与实现
  • IOS开发 - UIViewController 界面控制基类解析
  • SpringBoot运维实用篇(YW-1.SpringBoot程序的打包与运行,YW-2.配置高级,YW-3.多环境开发,YW-4.日志) - a
  • CSP-S模拟31
  • matlab 2025b + adalm-pluto 链接测试
  • Fortran 实现英文数字验证码识别系统
  • 10.14 NOIP 模拟赛 T1. HappyLovelyEveryday!
  • P3111 [USACO14DEC] Cow Jog S 题解 - 符星珞
  • Patch_SCN for Linux 功能完善---惜分飞
  • SQL在智能自动化业务场景中的应用 - Irving11
  • 20251014 杂题
  • 完整教程:Android Framework默认给应用添加dangerous级别权限
  • 20251013 模拟赛 总结
  • 高级语言作业第一次随笔
  • .net Core资料
  • 吾の歌单
  • 什么是反应式编程 - 详解
  • SDL3和其附属的编译记录
  • Qwen多模态系列模型笔记—Qwen2-VL
  • k8s Service Nodeport 用于集群外部访问
  • WPF 调用 ChangeWindowMessageFilterEx 修改指定窗口 (UIPI) 消息筛选器的用户界面特权隔离
  • 机器学习比赛
  • 牙科诊所借力AI营销4个月创收13万
  • 10月14日日记
  • P4653 [CEOI 2017] Sure Bet
  • 20251014
  • 歌词本。 - Slayer
  • 2025.10.14 正睿二十连测