Flex Alive PDF - 添加高分辨率图像
我正在使用 AlivePDF 来打印 Flex 中的组件。组件有文本和图像,是动态创建的。在这里,我们有高分辨率图像和带有嵌入字体样式的文本。 AlivePDF的输出文本和图像质量不佳。文本看起来很模糊,图像质量也不像我们在原始图像中看到的那么清晰。
我尝试将页面添加为图像流,但输出质量仍然相同。
我粘贴了下面的代码以供参考:
var image:ImageSnapshot = ImageSnapshot.captureImage(
templGroup.getChildAt(i),300,new mx.graphics.codec.JPEGEncoder());
printPDF.addImageStream(image.data,"",null,0,0);
让我知道,是否有任何方法可以提高live pdf的pdf输出图像质量。
提前致谢,
问候
斯里尼
Iam using AlivePDF for printing the components in flex. Components have text and images, are dynamically created. In this we have high resolution image and the text with embedded font style. AlivePDF's output text and image quality is not good. Text looks blur and the image quality is not that much clear as we see in the original image.
I tried with adding the page as imagestream, but still the output quality is the same.
I have pasted the code below for reference:
var image:ImageSnapshot = ImageSnapshot.captureImage(
templGroup.getChildAt(i),300,new mx.graphics.codec.JPEGEncoder());
printPDF.addImageStream(image.data,"",null,0,0);
Let me know, whether is there any way to improve the pdf output image quality from alive pdf.
Thanks in Advance,
Regards
Srini
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
JPEGEncoder 有一个质量参数:JPEGEncoder(quality = 50),将其更改为 90,结果会好得多,即 new JPEGEncoder(90);
JPEGEncoder has an argument of quality: JPEGEncoder(quality = 50), change it to 90 and results will be much better, i.e. new JPEGEncoder(90);
尝试使用此代码以更高分辨率进行捕获:
您可以像这样使用它:
Try this code for capturing in higher resolution:
You could use it like this: