My application is based on WPF, and it can create plot then print. The issue is: sometimes the printed result is not matched with what it looks in the application (see below image for the bar legend).
Note:
- The problem only occurs when the driver of the printer is not XPS driver. If I print it using a XPS driver on the same printer, then everything works fine.
Can anybody shed some light on this please?
After some investigation, this should be an issue for Microsoft, there is problem when printing the XPS file
Related
Working under Raspian, i have 2 Setups where i am generating 6 gnuplots in a C-program (with pipes). I have gnuplot 4.6, patchlevel 0 installed on both.
Setup A: Everything works as expected.
Setup B: The plots are not generated. I started to investigate some time, downloaded the examples for the C-Interface. It compiled and executed the examples without error, but no images showed up. when i entered the commands via shell manually (for example sine.png)
gnuplot
gnuplot> set terminal png
gnuplot> set output sine.png
gnuplot> plot sin(x)
the output is generated as expected.
Conclusion: I suppose I am missing some librarys on system B. but since nothing is actively complaining, I don't know where to start searching?
By hazard I figured out what the problem was - speed. I found out that placing a
sleep(x.y);
in between my code is solving the problem. Since I'm not working on a time critical application and the code doesn't have to be optimized, the problem for me is solved.
Apparently on windows this issue is well known, see here. Still unclear to me why this would happen on the newer hardware only.
I am using wpf printdialog()
I want to print direct but there is showing save dialog to save in pdf first then print.
Here is my code.
PrintDialog pd = new PrintDialog();
pd.PrintVisual(grid1, lblgr.Content.ToString() + "_" + lblreceiptno.Content);
I get exact solution for your problem.
PDFCreator Installed
You are getting above problem because PDFCreator is installed on your development Machine and it is set as Default Printer in your Machine. That's why it's asking for save before printing of the document. So please go to Control Panel->View Devices and Printers and in that set your required Printer or network Printer as Default Printer and it will directly print your document and will not ask for saving it.
PDFCreator not Installed
If you have still have this issue and PDFCreator not installed on your machine then please set your required printer as Default printer and it will solves the issue.
I am trying White for the first time. I tried to run a sample test to get a window of notepad, it doesnt seem to work. Here is what I did:
//Launch the app
Application app = Application.Launch("notepad.exe");
//Get the main window after launching the app
Window win = app.GetWindow("Untitled - Notepad");
This last line throws an error as type initializer exception. When I go into the source code for White, it fails at finding the window.
When I used GetWindows() and try to get first window, it works fine.
But the same error is thrown for the child objects as well.
I have Win7, 32 bit. By build configuration is Debug|x86. I also tried the same code on Win XP, 32 bit and it worked well.
Can anyone please tell me how do I go about this.
I think I found the solution. When I tried running same code on a Win 7, 64 bit machine, it seemed to work perfectly alright.
I tried using the dependency walker and found that there is some issue with the dlls on my machine. Though I dont think I can get my system fixed just for that, I guess it might help others if they are facing this issue.
We have a link in a silverlight application:
http://xx.xxx.xxx.xxx:xxxx/ord?station:|slot:/Drivers/xxxxxxxxxx/xxxxxxxxxx
When our client tries running the applicaiton it is supposed to access the link directly, however, it appears to be truncating the url to:
http://xx.xxx.xxx.xxx:xxxx/
We are unable to reproduce the issue on our systems, but the person says he gets the same result on his work computer and his home computer. Any Ideas?
Sounds like a possible EBKAC problem (Error Between Keyboard And Chair) :)
You need to see exactly what this user is doing (cut & paste from multi-line links in emails can cause this sort of problem).
I've got a strange problem I haven't seen before. I can open an OpenFileDialog in Windows 7 without any problems. However, when I try my app on Windows XP, calling OpenFileDialog.ShowDialog() immediately crashes the application. It just vanishes! When running from the debugger, I don't get any unhandled exceptions. If I wrap the code in a try/catch block, nothing gets caught. I have also checked all thrown exceptions in Debug -> Exceptions, but nothing pops up. I'll try some of the other suggestions in the answers below and will report back.
Does anyone know how to resolve this problem? I found a post about something similar, but it was the opposite problem. I'll try tweaking the desktop settings to see if it's related to that, but I am dubious.
EDIT -- as a sanity check, I wrote a test WPF application that displays an OpenFileDialog directly via the main window as well as another Window that can be displayed by the main window. It totally works fine under Windows XP. So now I'm really confused. I have verified that I'm not doing something stupid like trying to display the dialog from a worker thread. The OpenFileDialog displays briefly, then disappears along with the application.
EDIT -- I'm going to try to reproduce this problem on another XP computer. For now, I'll try Windows XP mode and we'll see what happens.
I got a similar error when a DLL crashes when I open a OpenFileDialog. It turned out that OpenFileDialog changed the working directory so my dll tried to write to a relative file that did not exist.
Do you see any "First Chance" exceptions in the Output? Any entries in the event log? Does the default path you're using exist on the XP machine?
Try adding a handler to the App Domain's UnhandledException
Does the same happen when you use a brand new, stock FileOpenDialog without any tweaks? What about from a brand new app which does nothing but show a file open dialog?
See Galet's post
I cannot tell you what exactly the problem is, but here's what you could do to get a clue what's really happening. I assume you're using VS2008 or 2005.
1.Switch to release mode
2.Go to Debug\Exceptions, and mark all "Thrown" exceptions, like illustrated here: http://vvcap.net/db/JbWS_tzy2IpBoI7R7amm.htp
3.Run executable in debugger, ignore the warnings from VS that there's no debug info
It does seem that there's a win32 exception thrown some time during execution, but this way or another, you will get one or more messages from debugger explaining what kind of exception happened and where. In most cases those messages make it pretty clear what exactly went wrong
EDIT: One thing I forgot to mention is that unmanaged debugging must also be turned on, such like here (when you start program directly from IDE) or here (when you attach to running process)
link|edit|flag edited Apr 12 '09 at 22:32
answered Apr 10 '09 at 19:01
galets
1,2201924