如何打印到PDF只有X Y坐标 [英] How to Print a Page to PDF Only with X Y Coordinates

查看:1335
本文介绍了如何打印到PDF只有X Y坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇特的问题。我是业务分析师对基于Java Applet破折号登机的产品工作。我没有接触到Java小程序它就像一个黑盒子的任何元素。

I got a peculiar problem. I am business analyst working on a dash-boarding product based on java applet. I don't have access to any elements in the java applet it's like a black box.

我期待打印页面的一个部分,而无需使用HTML元素(因为我没有获得code)。理想的情况下,将使用类似window.print(),它开始(X,Y)和结束(X,Y)在对话框中的坐标。然后我可以选择PDF995选项,打印成PDF。

I am looking to print a section of page without using html elements (since I don't have access to code). Ideal case would be using something like window.print() that takes Start (X,Y) and End (X,Y) coordinates .Then in the dialog I can select pdf995 option to print as pdf.

有关如(23,45)至(93,100)的像素应该打印在该范围内的区域。相反像素,比例应该是一样好。

For e.g. (23,45) to (93,100) pixels should print the area within that range. Instead of pixels, percentage should be good as well.

任何帮助是极大AP preciated。谢谢你们。

Any help is greatly appreciated. Thanks guys.

推荐答案

您可以使用java.awt.Robot中; java.awt.Image中采取的截图,写一个图像文件(BMP或JPEG格式,或者你喜欢什么);接下来,你可以使用曾钰成报告创建PDF,并查看文件报告。碧玉的一个强大的库来创建报告,网站这里

You can use java.awt.Robot ; java.awt.Image to take the ScreenShot and write a Image File (bmp or jpeg, or what you like); next, you can use Jasper Report to create a PDF and view the file report. Jasper its a powerfull library to create reports, website here

您可以找到一些细节,怎么这里采取截屏 。它也有可能采取截屏与cordinates。你可以看到一些例子这里

You can find some details to how take screen shots here. Its also possible to take screen shots with cordinates. You can see some examples here

这篇关于如何打印到PDF只有X Y坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆