Preview a PDF inside your AIR application inside transparent and custom window
I have a transparent windows开发者_Python百科 (skinnable). Inside, I'd like to preview some pdf file. BUT, in the only a black screen appear, can you help me?
Thanks
The only solution I found is to have a window with no tranparence option Thanks
Please provide more details. If you embed the respective component inside a standard window, does it show the PDF as expected?
Additionally, these links might be of interest:
- http://cookbooks.adobe.com/post_How_do_I_display_a_PDF_file_in_an_AIR_desktop_appl-19323.html
- http://cookbooks.adobe.com/post_Preview_a_PDF_inside_your_AIR_application-10183.html
Are you using an HTML component? If so, it's impossible to show PDF if your window is transparent. Here's the note from the Adobe documentation. I highlighted the interesting part. (source : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/html/HTMLLoader.html)
Note: When displayed in a transparent window, SWF content embedded in an HTML page must be embedded using either the transparent or opaque wmode. The default value for wmode is window, so if you do not specify a value, SWF content may not be displayed. On Windows and Linux, SWF content always appears on top of other content when wmode is set to window or opaque. PDF content cannot be displayed in a transparent window no matter which wmode setting is used.
You could show the PDF inside another window perhaps ? If you can't maybe you can find a way to open an invisible window, load the PDF there, draw it into a BitmapData oject then display the snapshot instead. Off course, this means no user interaction with the PDF whatsoever.
精彩评论