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

html网站开发目标做慕斯蛋糕那个网站有视频

html网站开发目标,做慕斯蛋糕那个网站有视频,类似12306网站开发,wordpress文章视频NetCore 创建、编辑PDF插入表格、图片、文字 NetCore 创建、编辑PDF插入表格、图片、文字(二) NetCore 创建、编辑PDF插入表格、图片、文字(三) 直接上代码 nuget引入 itext7 using System; using System.IO;using iText.IO.Image; using iText.Kernel.Colors; // 导入颜色…NetCore 创建、编辑PDF插入表格、图片、文字 NetCore 创建、编辑PDF插入表格、图片、文字(二) NetCore 创建、编辑PDF插入表格、图片、文字(三) 直接上代码 nuget引入 itext7 using System; using System.IO;using iText.IO.Image; using iText.Kernel.Colors; // 导入颜色类库 using iText.Kernel.Geom; using iText.Kernel.Pdf; // 导入PDF操作类库 using iText.Layout; using iText.Layout.Borders; // 导入布局类库 using iText.Layout.Element; // 导入元素类库 using iText.Layout.Properties; using iText.Pdfa; using TextAlignment iText.Layout.Properties.TextAlignment; // 导入属性类库private void PDF(){string textsss ssssssssssssssssssssssdddddddddddddddddddddddddddddddddddddddffffffffffffffffffffffffffffffffffffffffffffffffffff;string filePath path/to/yourDocument.pdf;// 检查目录是否存在如果不存在则创建string directory System.IO.Path.GetDirectoryName(filePath);if (!Directory.Exists(directory)){Directory.CreateDirectory(directory);}// 创建PDF文档var writer new PdfWriter(filePath); // 创建PDF写入器指定文件路径var pdf new PdfDocument(writer); // 创建PDF文档var document new Document(pdf, PageSize.A4); // 创建文档对象// 设置分页尺寸//PageSize customPageSize new PageSize(500, 500); // 设置自定义的分页尺寸单位为点1英寸72点//pdf.SetDefaultPageSize(customPageSize);float x PageSize.A3.GetWidth() / 2;float y PageSize.A3.GetTop() - 20;#region 文本写入string ss Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1Text 1;// 文字自定义坐标var wb new Paragraph(ss).SetWidth(200).SetFontSize(12).SetFixedPosition(1, 50, 750, 800);document.Add(wb); // 第1页X50Y750document.Add(new Paragraph($Text 2{textsss}).SetFixedPosition(1, 50, 700, 800)); // 第1页X50Y700document.Add(new Paragraph($Text 3{textsss}).SetFixedPosition(1, 50, 650, 500)); // 第1页X50Y650//从上到下document.Add(new Paragraph($居左{textsss}).SetTextAlignment(TextAlignment.LEFT));document.Add(new Paragraph($居中{textsss}).SetTextAlignment(TextAlignment.CENTER));document.Add(new Paragraph($局右{textsss}).SetTextAlignment(TextAlignment.RIGHT));#endregion// 表格设置Table table new Table(5) // 创建表格5列.SetMarginTop(10) // 设置上边距.SetFixedPosition(1, 36, 600, 200) // 设置固定位置.SetBorder(Border.NO_BORDER); // 设置无边框// 单元格设置Cell cell1 new Cell(1, 5).Add(new Paragraph(Merged Row 1)) // 创建合并单元格跨5列.SetBackgroundColor(ColorConstants.LIGHT_GRAY) // 设置背景色为浅灰色.SetFontColor(ColorConstants.BLUE) // 设置字体颜色为蓝色.SetFontSize(10) // 设置字体大小为10.SetTextAlignment(TextAlignment.CENTER); // 设置文本居中对齐Cell cell2 new Cell(1, 2).Add(new Paragraph(Merged Row 2)) // 创建合并单元格跨2列.SetBackgroundColor(ColorConstants.YELLOW) // 设置背景色为黄色.SetFontColor(ColorConstants.GREEN) // 设置字体颜色为绿色.SetFontSize(10) // 设置字体大小为10.SetTextAlignment(TextAlignment.CENTER); // 设置文本居中对齐Cell cell3 new Cell(1, 3).Add(new Paragraph(Merged Row 3)) // 创建合并单元格跨3列.SetBackgroundColor(ColorConstants.ORANGE) // 设置背景色为橙色.SetFontColor(ColorConstants.MAGENTA) // 设置字体颜色为品红色.SetFontSize(10) // 设置字体大小为10.SetTextAlignment(TextAlignment.CENTER); // 设置文本居中对齐// 创建单元格并设置背景颜色for (int i 0; i 5; i) // 遍历5列{Cell cell new Cell().Add(new Paragraph($Cell {i 1})) // 创建单元格添加文本.SetFontSize(10) // 设置字体大小为10.SetTextAlignment(TextAlignment.CENTER); // 设置文本居中对齐// 设置不同的背景色switch (i){case 0:cell.SetBackgroundColor(ColorConstants.LIGHT_GRAY); // 第一列背景色为浅灰色break;case 1:cell.SetBackgroundColor(ColorConstants.YELLOW); // 第二列背景色为黄色break;case 2:cell.SetBackgroundColor(ColorConstants.ORANGE); // 第三列背景色为橙色break;case 3:cell.SetBackgroundColor(ColorConstants.CYAN); // 第四列背景色为青色break;case 4:cell.SetBackgroundColor(ColorConstants.PINK); // 第五列背景色为粉色break;}table.AddCell(cell); // 将单元格添加到表格}// 将合并单元格添加到表格table.AddCell(cell1);table.AddCell(cell2);table.AddCell(cell3);// 将表格添加到文档document.Add(table);ImageData imageData ImageDataFactory.Create(path/to/123222.jpg);Image image1 new Image(imageData).SetFixedPosition(2, 50, 300, 200) // 指定坐标 第2页X50Y300宽度200;Image image2 new Image(imageData);image2.SetHorizontalAlignment(iText.Layout.Properties.HorizontalAlignment.CENTER); //居中image2.SetWidth(200);;document.Add(image1);document.Add(image2);// 关闭文档document.Close();}
http://www.sczhlp.com/news/210527/

相关文章:

  • 漂亮的flash网站大数据学出来做什么工作
  • 网站的数据库怎么做河南龙王建设集团网站
  • 泸州网站建设价格新乡市做网站的公司
  • 给别人做网站被诉侵权怎么在微信里创建公众号
  • 云服务器安装网站百度关键字搜索排名
  • 怎么连接网站的虚拟主机带前台的WordPress模板
  • 滕州市做淘宝网站的购物网站建设价格一览表
  • 做网站备案与不备案的区别重庆网站设计制造厂家
  • 四川做网站公司怎样查看一个网站是用什么开源程序做的
  • 站长之家ppt模板英文网站模板
  • 装饰行业网站建设域名注册是什么意思
  • 云南红舰工贸有限公司的网站建设精品课程网站开发的开题报告
  • 深圳个性化建网站服务商wordpress手机管理
  • 做营销型网站需要注意哪些点腾讯云服务器备案
  • 思明建设局网站centos卸载wordpress
  • 广州网站优化快速获取排名wordpress 鼠标移动到标题会显示图片
  • 百度推广是否做网站国外做的好的医疗网站
  • 做网站排名的公司互联网公司运营
  • 7万字短篇小说哪家网站做的好某物流网站后台源码
  • 内外外贸购物网站建设网络营销推广的劣势
  • 2025年UV光源厂家推荐排行榜,UV面光源,UV LED点光源,UV LED面光源,UV LED固化机公司精选
  • 课上积极回答加分
  • 建立网站 优帮云北京好的做网站的公司哪家好
  • vs网站开发入门成都市建设质监站网站
  • 网站服务器无法访问免费的asp网站
  • 微信网站制作企业做坑网站需要
  • 湘潭新思维网站网站规划与网页设计
  • 织梦网站如何播放mp4知乎关键词排名优化
  • ppt超链接到网站怎么做学校文化建设聚奇网站
  • 北京网站建设加q.4791857002024北京又开始核酸了吗今天