Display CHM file in JavaFX app - javafx

Is there a way to display Compiled Help manual CHM in a javaFX app, without using java.awt.Desktop from AWT ?
Calling A CHM reader using Runtime.getRuntime().exec(help.chm) is an option, but to make it cross platform, this would require every user in mac, win and linux to have a CHM reader installed.
What's the best option for a cross platform solution ? should I extract it to HTML and display it in javafx.scene.web.WebView ?

Given your wish to be platform independent, I'd advise to go to the HTML route as you yourself suggested. I don't know your reason for converting CHM to HTML if you also control the source, in that case I'd either use HTML directly or markdown to HTML.

You should try this. It's works for me!

Related

Need help on showing the test output in html format containing screen capture link

I have a framework with Webdriver+testng.
I want the result of all the methods i have run, in html format with their status and screen capture link.
please let me know whts the way of doing this.
Thanks in advance.
You can make use of this, But this only for BDD styled stories. If you are looking for a plain web driver scripts, try this selenium loggers.
TestNG creates a report in HTML format in 'test-output' folder (or, if you're using testNG plugin in Eclipse, you can specify the path in Window-Preferences-testNG). The folder is created and rewritten after each run. Look for index.html there.
You can add custom information there using Reporter.log (from org.testng.Reporter), the information can be found after 'Reporter output' link in the report. So basically all you need is an #AfterMethod which will take the screenshot and embed it into the log. This discussion may help.

Print a file from Watir

I'm looking at Watir-Webdriver to manipulate a browser. In particular, I'd like to open a local file and print it to a PDF file.
Yes, wkhtmltopdf would be a good thing, but it's not working for me on debian squeeze, for reasons that are difficult to ascertain. The page contains Javascript, which rules out many html-to-pdf options. wkhtmltopdf works on OS X, same version (0.9.9), so I know it's not a problem with how I'm using it (PDFKit and Ruby). I'd just like to sidestep these issues and try a different way. Opening up chromium on debian shows a perfectly rendered page.
How does one "print" from Watir?
Edit: After more reading, I think there is no way to do this.
You could take a png sreenshot, then use the prawn gem to convert the png screenshot to a pdf:
require 'prawn'
require 'watir-webdriver'
b = Watir::Browser.start 'watirwebdriver.com'
b.driver.save_screenshot 'screenshot.png'
Prawn::Document.generate 'screenshot.pdf' do
image 'screenshot.png', :scale => 0.5
end
b.close
You'll need to use something that lets you do automation at the OS level. such as Autoit or maybe RAutomation. not sure what exists to do this on *nix operating systems.
Watir only drives the browser in terms of what is inside the browser window, it has very limited capability to work the menus of the browser itself.

NSAttributedString with embedded images

Does anybody know of any code out there that would allow me to read RTF with images in NSAttributedString?
Yes I know that there is RTFD format and initWithRTF methods... But implementation of initWithRTF skips \pict tags so when I transfers RTF from Windows (MS Office) to osx and try to open it with NSTextView I don't see embedded images. Also I tryed it with librtf and I have some sussesfull results but in my opnion its ugly solution
Neither QuickLook nor TextEdit can deal with inline attachments, so I'm pretty sure Cocoa doesn't support them. librtf is your best bet.

A "shortcut" method for exporting an ASP.Net Page to pdf/xls

I want to export a few Pages to pdf/xls. By Pages I mean as the eye sees it - a screenshot of the Page's contents. I know how to build pdf/xls documents using 3rd party tools but is there any way to quickly export the rendered contents of say a Panel?
edit: maybe a tool that can render the page's output as a browser would, and save it as an image file?
There is an open source console program named wkhtmltopdf which you could call from asp.net to convert the page. It can convert to PDF or an image with wkhtmltoimage (JPG, PNG, etc.) using the webkit rendering engine.
Check my answer to this question to see an example of how to convert from a html to a pdf using C#:
Easiest way of porting html table data to readable document
I can recommend http://www.screengrab.org/ for firefox.

Bitmap image are visible in Qt Designer but I can't see them after compiling in QDevelop IDE

In qt-designer I loaded bitmap images and in preview I am able to view the images. But after compiling in qdevelop IDE, I could not see the images at all.
Is there any procedure to load the bitmaps in to qdevelop.
Thanks in advance
I think you'll be wanting to add the bitmaps to a resource file, using Qt's resource system, if you want to be able to use them in Designer and also have them work in your compiled application correctly. I've not used it, but the examples look fairly straightforward, and it appears QDevelop supports the resource system to some extent.
Have you configured Qt to use required images plugins?
[-no-gif] [-qt-gif] [-no-libtiff] [-system-libtiff] [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng] [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg]

Resources