从 Flex 或 jquery 以 300 dpi 打印

发布于 2024-12-23 03:15:18 字数 205 浏览 1 评论 0原文

我们需要使用 Flex 应用程序或 jquery 自定义一些图像(向图像添加一些文本)来打印它。定制完成后,必须以 300 dpi 保存输出图像,以确保高质量的打印。

我们被困在这里,不知道如何以 300 dpi 保存此图像。我们可以确保上传用于自定义的源图像的分辨率为 300 dpi。但定制后,我们还必须以 300 dpi 保存图像。

关于如何做有什么建议吗?

We have a requirement of customizing some images (adding some text to images) using a flex app or jquery for printing this. Once the customization is done, it has to save the output image in 300 dpi for ensuring high quality for printing.

We are stuck here and not sure how to save this image in 300 dpi. We can make sure that the source image uploaded for customization is in 300 dpi. But after the customization, we have to save the image in 300 dpi also.

Any suggestions about how to do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寂寞美少年 2024-12-30 03:15:18

客户端打印中的 Flex 打印不支持质量打印,Flex 自动映射到 72 ppi。检查此处给出的注释,但是服务器侧面打印支持高 dpi 打印。一款第三方工具Alive Pdf支持图像打印检查教程。但您需要将图像缩放到 300 dpi,有关详细信息,请检查 这里

选择哪一个对你好

The Flex printing in the client side Printing wont supports the quality printing, the Flex automatically maps to 72 ppi. check the note given here, but the server side printing supports with high dpi printing. one third party tool Alive Pdf supports the image print check the tutorial. but you need to scale image to 300 dpi, for more information check here.

Choose which one is good to you

陌伤ぢ 2024-12-30 03:15:18

我确信您可以使用 imagemagick (服务器端)来实现这一点。检查此网址:

http://www.imagemagick.org/script/command-line -options.php

查找“密度”和“重新采样”选项。

如果您使用 PHP: http://www.php.net/manual/ en/function.imagick-resampleimage.php

要在图像中插入文本,我将使用 gd 来完成: http://php.net/manual/en/ref.image.php

也许这可以给您一些如何解决问题的提示。

抱歉,我没有使用 Flex 的经验,所以我无法在这方面为您提供帮助。

I'm sure you can achieve that using imagemagick (server-side). Check this url:

http://www.imagemagick.org/script/command-line-options.php

An look for "density" and "resample" options.

If you use PHP: http://www.php.net/manual/en/function.imagick-resampleimage.php

To insert text in the image I will do it with gd: http://php.net/manual/en/ref.image.php

Maybe this can give you some hint of how to solve your problem.

Sorry I have no experience with Flex, so I can not help you on that.

情愿 2024-12-30 03:15:18

您希望获得良好的打印质量,而不是较低的屏幕质量 (75 dpi)。然而,图像是由像素组成的,它们决定了分辨率。因此,拥有多个宽度和高度的图像就足够了。

在 HTML/jQuery 中,通常使用 < 定义较小的较大图像就足够了。 img src=... width=FRACTION height=FRACTION > 或使用 CSS media:print。

事后想到:不将文本嵌入到像素图像中,而是作为叠加层可能会更好。


多一点解释:

如果您通过标准 Windows 查看器在屏幕上查看高清图像并选择 100% 显示(无缩放),那么您会看到它更大。这是因为它有更多的像素:比如 4000 x 3000。

在 HTML 中,您可以通过以下方式将其显示得更小:

<img src="bigimage.png" width="400" height="300">

这是最简单的。在 CSS 中,人们使用的背景图像通常根本不打印。

如果您的页面有“打印视图”,您可以使用更小、更快的图像进行正常显示,并在打印视图上使用大图像。

HTML 中的文本叠加也是可能的,但如果字体不是标准的,则必须获得许可。一个浮动的 div 就足够了。

关于弹性:必须由其他人来回答;自从我做弯曲运动以来已经很长时间了。

You want to have a good print quality as opposed to the lesser screen quality (75 dpi). Images however are made up of pixels, and they determine the resolution. So having images with a multiple width and height suffices.

In HTML/jQuery it normally suffices to have the larger image defined smaller with < img src=... width=FRACTION height=FRACTION > or use CSS media:print.

As an afterthought: it might be much nicer to not embed the text into the pixel image, but as overlay.


A bit more explanation:

If you view your high definition image on the screen by the standard windows viewer and elect 100% display (no zooming), then you will see that it is larger. That is because it has more pixels: say 4000 x 3000.

In HTML you could display it smaller by:

<img src="bigimage.png" width="400" height="300">

This is easiest. In CSS one uses a background-image which often is not printed at all.

If your page has a "print view" you could have use a smaller, faster image for the normal display, and on print view the large image.

Text overlay in HTML is possible too, but the font must be licensed if it is non-standard. A floating div suffices.

Concerning flex: someone else has to answer that; a long time since I did flex.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文