Perform an action after a document in viewed on desktop - javafx

I am viewing an excel on desktop from my application using
MainClass.getHostServicesUpg().showDocument("UploadData.xls");
I want to view another javafx stage once this file is open(or best when the file is closed by the user). Is there anyway I can monitor the file opening closing to view my next stage?

Looking at this Tutorial you can implement the WatchService to see if some sort of a look file was created. If that is the case you can open your stage. And if you notice the lock file was deleted you close your stage. This must be checked periodically since the WatchKey doesn't wait for events by the WatchService.
If you want i can try to create a small understandable example but that would take a while.

Related

JavaFX - How to run desktop app in the background using window close/minimize button and 'reopen or completely close' from hidden icons

I created a simple clipboard(desktop app) using JavaFX. Now I want to run the clipboard in the background when user minimizes or closes the app. For example, 'XAMPP' or 'μtorrent'. Of course, user can reopen or completely close the clipboard from hidden icons(in windows) or from the top panel(in ubuntu). From THIS question, i found
Platform.setImplicitExit(false);
which runs the clipboard in the background. But i want to show it in the hidden icons(in windows) so that i can reopen or completely close it from there.
I know how to get and modify the window OnCloseRequest. I just want to know what i should do to run the clipboard in the background.
I searched in the google and StackOverflow for any related tutorial or blog post but found nothing. Any suggestion will be highly appreciated.
I didn't share my code because my clipboard app has no problem. I just want to add the above-mentioned feature.

For offline application, Using Squish,How to check, whether a lin is broken or not?

Using Squish Automation Tool.
I have Windows QT application, It contains links for
1. Files
2. Folder
3. Other Apllication.
Is there any function or way to check whether these links are broken or not?
I don't want to click each any every link. What I need is that, I get a object of parent Window, and by using some function it should check whether all links present are active or broken.
I know there is a function in QTP, but don't have any idea for SQUISH.
Thanks in Advance.

Adobe Livecycle ES3 saving issue - file keeps getting larger

I have been working on a form in Adobe Livecycle ES3.
I started with a file that was approx. 1 MB in size.
I realized that every time I saved the file it got larger by approx. 1-2 MB.
This happens even if I just save the file as a new name without doing any editing.
I ended up with a 45 MB file size and I really did not change that much to the form design.
I am new to this program, and cannot find anything online to explain this behavior.
I am thinking that the program is saving some kind of history buffer?
Any help would be greatly appreciated.
Edit to Answer Questions asked below:
1) The form is stored locally
2) The only option is to save as a PDF. The form is based off of a PDF imported document.
3) Can I change to XDP when it is imported background artwork?
4) The XML does not appear to be doubling up info.
I found an article yesterday that talks about the file size growing each time you save it with Livecycle. The adobe guy seemed to say that it was life and that there was nothing you could do about it. Seems a little weird to me. I don't know if I have really given you anything new here. I am very frustrated with it.
Thanks
SUB
To start off, I need to ask you if your form is stored locally on your machine or are you editing a copy of the form saved on the LiveCycle server itself ?
If your form resides on the server, download a copy of the form on your machine and try your tests on it to see if the file size increases every time you save it on your machine. Do let me know how your tests go in this scenario.
If you are working on a form design on your machine, are you saving your form as a PDF or an XDP ?
If you are saving your form as a PDF, save it as an XDP.
If you are saving your form as an XDP, open it up in either the XML editor in LiveCycle designer or just use a text editor to view its contents.
I have seen issues in the past where (and its a bug btw) LiveCycle Designer repeats the same design time XML tags mulin the form. If this is the case in your form, you can simply do a find and replace to remove them.
Hope this helps. Please let me know how your tests go and if you have any more questions about LiveCycle.
Thanks,
Armaghan.
I have seen this issue quite often, in fact today I had a file which jumped from 1.5mb to 188mb.
Having gone through the Adobe site it appears that there is no definite reason for it, but it appears to happen more when you embed fragments into the form or are using a lot of tables.
Anyway the quickest fix is to go into the XML view and search for 'aped' This will usually find a line with something like:
Simply do a find/replace on the full line (leave the replace with blank).
Do this for:
Once complete go back into design view and save it. You should see the file size decrease.
I experienced the same issue. I found a way around it, but you need to have a copy of the original file.
1. From the bloated file, copy the XML from the XML Source window in LiveCycle Designer.
2. Open the original PDF in LiveCycle Designer.
3. Replace the XML in the XML Source window with the XML on the clipboard.
4. Save.

XCode: The document: "<document name>" could not be saved. The file has been changed by another application"

Since starting to use XCode 4.2 I've more-or-less routinely had the error:
with various substitutions for the filename. This is normally when Xcode is doing an autosave, so it happens seemingly at random. I generally click "Save Anyway" and my recent edits are then preserved, although there is a significant probability that Xcode will then hang. I don't typically lose much when it hangs, other than a minute to shoot it and get it to restart, but still...
I don't open any of these files in any application except XCode. I have not been able to figure out the pattern, although it may have to do with popping back and forth between files. The last time I noticed it, I also noticed that the previous round of edits to that file hadn't taken. So some other editor had not saved the file.
Enough preamble: here's the question:
Are others running into this? Has anyone narrowed down what causes it? Is there a setting I can change to prevent it? Is there something I can change in my behaviour?
You will get this happening when
1) There are locally unsaved modifications (the navigator icon will be shaded)
2) AND something else has changed the file outside of Xcode. For me this occurs when I do an external update from svn on the command line or via Versions
What do you have that is modifying and saving the file outside of Xcode? Anything?
Check your source control (if any) and figure out if something you are doing is causing the conditions to be met.
Well I had the same problem when I was trying to Localize my files. Then I noticed that every time the message was popping up was because the icon of the selected file in the Project Navigator was grey, which means that was not saved. So what I did was to save the file (Cmd+S) before doing the action that made the "changed by another application" message to appear, in my case the Localize button.

PDF Viewer Showing Last Page

I have a asp.net app that writes a pdf to file. Then, later that file is opened into a window (standard acrobat reader) for viewing. No problems there.
The weird part...
The entire document loads as it should, but the Reader initially shows the last page in the document on the screen. The user must then scroll up to the first page. It doesn't happen all the time (about 50%) and occurs across several test computers.
Is there a switch in the code I'm suppose to use in creating the file or displaying the file to tell the reader to "start displaying the document on the first page?"
Environment particulars:
asp.net 3.5 vb,
websupergoo's abcpdf.net pro 7 (assembly that creates the pdf file),
Windows 2008 Server,
IIS7
Thanks
Just FYI, I had this same issue and started using #page=1. However, be aware that this causes a bug in IE where after a user opens and closes 50-60 documents, Adobe Reader will stop responding. I had to take out the #page=1 bookmark parameter, and am now searching for another solution...
I had a similar problem and the #view=FitH parameter is what caused it. Removing that parameter fixed it for me. I still have no idea why.
May be helpful (client setting in reader):
http://korayem.net/post/2007/12/Adobe-Reader-Tip-Open-a-PDFs-Last-Viewed-Page.aspx
I found the answer... at least a work around.
Since I'm using a response.redirect to call the pdf in a browser window, I programmatically added "#Page=1" to the end of the filename string. It opens to the first page every time. The "#Page=n" (where "n" is the number of the page, of course) opens to the page of choice.
Learn something everyday...
Check if you can remove the 'OpenAction' name and related array value from the PDF using the above mentioned pdf library. Looks like 'OpenAction' is pointing to the last page.
PDF 32000-1:2008 - Page 74:
OpenAction - array or dictionary
(Optional; PDF 1.1) A value specifying
a destination that shall be displayed
or an action that shall be performed
when the document is opened. The value
shall be either an array defining a
destination (see 12.3.2,
"Destinations") or an action
dictionary representing an action
(12.6, "Actions"). If this entry is
absent, the document shall be opened
to the top of the first page at the
default magnification factor.

Resources