原文标题:Adding images and layout to your Docx4j-generated word documents, part 1 原文链接:http://blog.iprofs.nl/2012/10/22/adding-images-and-layout-to-your-docx4j-generated-word-documents-part-1/ 原文作者:lvdpal 发表日期:2012年10月22日 注:由于我对docx4j也不是很熟悉,所以很多专业名词不会翻译,
最近在忙的项目中,需要处理富文本的相关内容,产品需求并不复杂,所以想着用TextKit处理,顺便学习一下,没想到直接掉坑.在此记录一下(都是血泪史),顺便为有需要的小伙伴提供参考. // Add the image as an attachment. let textAttachment = NSTextAttachment() textAttachment.image = image textAttachment.bounds = CGRect(origin: CGPoint.zero, si