简体   繁体   English

打印内容 <rich:modalPanel /> ?

[英]Printing the contents of a <rich:modalPanel />?

Attempting to print the contents of a <rich:modalPanel /> in my application results in a complete mess on the printed page. 尝试在应用程序中打印<rich:modalPanel />的内容会导致打印页面完全混乱。

The complete HTML underlying the <rich:modalPanel /> appears on the printed page, but completely faded out (as it sort of appears on screen). <rich:modalPanel /> 基础的完整HTML出现在打印的页面上,但完全淡出(因为它出现在屏幕上)。 And somewhere on that page, is the <rich:modalPanel /> content itself - what the user actually wanted to print. 该页面上某处<rich:modalPanel />内容本身-用户实际想要打印的内容。

The expected behavior is to just print the <rich:modalPanel /> content, occupying the entire printed page. 预期的行为是打印<rich:modalPanel />内容,占据整个打印页面。 How would I configure this behavior, or what alternative media ( media="print" ) styles do I need to include? 我将如何配置此行为,或者我需要包括哪些替代媒体( media="print" )样式?

I had the same problem and based on the HTML Code this will not be possible out of the box. 我有同样的问题,根据HTML代码,这将是不可能的。 I solved the problem by using http://plugins.jquery.com/project/printElement which is jQuery based function that allows to print single HTML Code Elements. 我使用http://plugins.jquery.com/project/printElement解决了这个问题,它是基于jQuery的功能,可以打印单个HTML代码元素。

Maybe this will help you too. 也许这也会对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM