将 HTML 内容添加到 Alive pdf 不起作用
如何通过“writeFlashHTML”功能将HTML内容添加到Alive pdf页面?
var markup:String = "<s:span>Z</s:span>
<s:span baselineShift="subscript">R</s:span>
<s:span> [kN]</s:span>";
rt1.textFlow = TextFlowUtil.importFromString(markup);
<s:RichText id="rt1" width="200"/>
在代码视图中,
myPDF.setXY(160, 10);
myPDF.textStyle( new RGBColor(0), 1 );
myPDF.writeFlashHtmlText(10,rt1.textFlow.text);
我需要将此 html
显示到 alive pdf
中。使用 writeFlashHTML
函数。目前它不起作用。
How to add HTML content to Alive pdf page through 'writeFlashHTML' function?
var markup:String = "<s:span>Z</s:span>
<s:span baselineShift="subscript">R</s:span>
<s:span> [kN]</s:span>";
rt1.textFlow = TextFlowUtil.importFromString(markup);
<s:RichText id="rt1" width="200"/>
in the code view
myPDF.setXY(160, 10);
myPDF.textStyle( new RGBColor(0), 1 );
myPDF.writeFlashHtmlText(10,rt1.textFlow.text);
I need to display this html
in to alive pdf
.using writeFlashHTML
function.Currently it is not working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有 UnicodePDF 作为 PDF 类的替代品。虽然它不支持HTML的编写。
我发现alivepdf的html内容受到限制,或者我只是不太了解alivePDF。因此,我的解决方法是使用支持我想要的格式选项的 Flash 组件,然后将其缓存为位图并将其添加到 PDF 中。它不像直接编写文本那么优雅,不能很好地缩放或打印,并且不可选择。但完成工作。最终,我认为对于此类事情,最好将信息发送到另一个服务器端脚本或桌面服务。 AlivePDF 很强大,但也有局限性。
There is UnicodePDF as a replacement to the PDF Class. Although it doesn't support writing of HTML.
I found the html stuff limited with alivepdf, or I just don't understand alivePDF well enough. So my work around was to use a flash component that supported the formatting options I was after, then cache that as a Bitmap and add that to the PDF. It's not as elegant as directly writing the text, doesn't scale or print as nicely, and is not selectable. But gets the job done. Ultimately I think it's best to send the info to another server side script, or desktop service, for this type of thing. AlivePDF rocks, but has limitations.