I use TeXnicCenter for LaTeX and would like to have the DDE controls working to easily view the pdf versions. Acrobat X seems to have changed the servername and this is breaking things.
I tried "AcroViewR10" or "acroviewR10" and other combination, but still it does not work.
As a work around, using command line argument "%bm.pdf" works, but I manually need to close the pdf everytime before recompiling. So, it takes an extra click or so.
Can anyone give some insight to solve the problem either by fixing DDE or how to close the pdf automatically when it is recompiled?
Actually, the answers from Martyn and Adam Nellis solved this problem. Thanks a lot, folks. I am just putting it step by step, so someone else can use it.
Step1: Adobe ReaderX
In Adobe Reader X, go to Edit>Preferences>General and uncheck "Enable Protected Mode at startup".
Step2: TeXnicCenter
Go to Build->Define Output Profiles-> choose "Latex to PDF" -> Viewer tab
2.1. For "View Project's Output" & "Forward Search"
Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: AcroViewR10 Topic: control
2.2. For "Close Document"
Command: [DocClose("%bm.pdf")]
Server: AcroViewR10 Topic: control
(use this option even if you use Adobe Reader 11)
For those using Acrobat X pro, the server should be AcroviewA10 and the excecutable should be Acrobat.exe
For the newer version of Adobe [DocClose] doesn't work anymore. So you have to make updates. In texnicCenter hit Alt+F7, go to Viewer TAB and follow the example accordingly (works on Win7 with Adobe11):
in Executable path you have to have something like "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"
View Project's Output >>> Choose "command line argument" and enter
"%bm.pdf" in command
Forward Search >>> Choose "command line argument" and enter
"%bm.pdf" in command
And finally *THE MOST IMPORTANT OPTION*
Close Document Before Running (La)Tex >>> Choose "DDE" and enter
"[AppExit]" in command
"AcroViewR11" in Server
"control" in Topic
I realise this question is a little old, but I have just been struggling with this problem (not used TeXnicCenter for a wile, so hadn't noticed the problems when upgrading Adobe) and this thread is the only one that solved the problem for me. I had to use a combination of the above answers, though, so I thought I would document what worked for me.
I am using Windows Vista Business edition, TeXnicCenter 1.0, and Adobe Reader 10.0
Go to Build->Define Output Profiles-> choose "Latex => PDF"
1) In the viewer tab, change the executable location to point to
C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe
2) View project's output: Select DDE command and enter
[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10 Topic: Control
3) Forward search: Select DDE command and enter
[DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: arcroviewR10 Topic: Control
4) Close document before running (La)TeX: Select DDE command and enter
[AppExit]
Server: arcroviewR10 Topic: Control
In particular, it was point 4 that I needed to do, and despite searching a while, this is the only place I have found advice to switch the DDE command to [AppExit] and it worked a treat. Thanks Claudia!
I have not needed to change the Adobe Reader settings at all (i.e. it is still in Protected Mode at Startup).
My settings are:
Path of Executable: C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe
For "View Project's Output" & "Forward Search"
Command: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]
Server: AcroViewR10
Topic: control
For "Close document"
Command: [DocClose("%bm.pdf")]
Server: AcroViewR10
Topic: control
That works for me except for two things:
When Acrobat Reader is closed and I press F5 it will open Acrobat Reader but will not open the document and will bring up an error message. If I close the error message and press F5 a second time (with Acrobat Reader now open) then it will open the document.
When I press F5, and the document opens, Acrobat Reader does not become the top window (the focus stays with TexnicCenter).
So not major problems but just small annoyances.
Edit:
Not sure if it makes a difference but in the windows registry the keys:
HKEY_CLASSES_ROOT\acrobat\shell\open\ddeexec\application
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\acrobat\shell\open\ddeexec\application
Both have values set to "AcroviewR10" (no quotes).
I use Acrobat Pro XI and have the following settings:
Path of Executable:
C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe (for 32bit version) and
C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe (for 64bit version)
View Project's Output & Forward Search
"command line argument" and "%bm.pdf"
Close document
"DDE" and enter "[AppExit]" in command "AcroviewA11" in Server "Control" in Topic
Related
I am opening a .txt file with my PyCharm IDE that contains multiple links among several other lines of text (actually these are logs from a continuously running script).
Like so:
----------------------- session start, Tuesday 12.10.2021, 12:48:53
>> some logs... -- 12:49:34
link: https://www.example.com/p/CU5Hn-RsSB9
>> more logs... -- 12:49:34
Now for convenience I would like to be able to click on that link rather than copy/pasting it to my browser - it seems like this should be a possible setting somewhere in PyCharm: But I cannot seem to find it and also not find any information on it on the web.
Anybody knows how to make links clickable in .txt files opened in PyCharm?
The ideal solution you are asking for would be configuring clickable URL links in the editor window but that is not currently supported by PyCharm.
That kind of configuration is hardcoded in the PyCharm IDE. For example, URLs are clickable if they're inside a Python comment or a Markdown file, but they can't be turned on/off; only the colors highlights can be configured (and thus the corresponding dialogues in the settings are an integral part of PyCharm that can't be changed.) Neither is there any way to create new file types with those configurations. You can see one such example by going to File > Settings > Editor > Color Scheme > Markdown and checking the Auto Link item in the list.
In these cases the alternative to your specification would be installing a plugin that implements the functionality. I searched the JetBrains Marketplace but I think no plugin is currently available that implements what you want. (A few are close, like TxtReader or Awesome Console but these still rely on sending the file/output to the console, they don't make the links clickable in the editor window.)
Having said that, the closest native alternative using vanilla PyCharm (without installing plugins) would be running the Terminal as an External tool to read the .txt file. This has the desirable advantage of opening the file inside the IDE and since PyCharm supports several terminals you get the flexibility of using the terminal specific settings you prefer.
Here's an example of configuring PyCharm's External Tool to open the .txt using Window's CMD. (Using the command line arguments /c more is terminal specific. Also notice the use of the $FilePath$ and $ProjectFileDir$ PyCharm specific macros.)
After your External Tool is configured you can use it by right clicking on the open file in the editor window or in the Project files view. In the terminal you can see the .txt file having the clickable URL.
Another alternative could be configuring the IDE's External Tool to launch a 3rd party text editor to open the .txt file; but the main drawback of that approach is it would open the file outside PyCharm.
For me, it looks like you can display a clickable link to a file, provided :
the file exists,
the file is a python file (ends with '.py'),
the file is in the project (the file owns to a directory inside the project)
for example, your file is "main.py" and your project root is "/Users/puiseux/GitHub/myproject" then the two lines
>>> filename = "/Users/puiseux/GitHub/myproject/main.py"
>>> print('File "%s", line %d' % (filename, 12))
will display a clickable link to the line 12 of file "main.py"
File "/Users/puiseux/GitHub/crypto/main.py", line 12
If you do not fulfill one of three conditions, it does not work
I am invoking the following from a windows service under Windows 10 or Windows Server 2012 (C# program that shells out to execute the command), but nothing is being printed. I can copy and paste the command being sent into a command prompt, but it pops up a print dialog and I have to click ok for the file to print (which it does). What switch do I need to add such that the dialog won't come up and the file will be printed directly without user intervention since the intention is for this to work unattended as a windows service? This is ghostscript 9.50, which is the latest as of today. In an earlier version of ghostscript this worked if the device was set to ljet4 but this was causing an error with 9.50. Also, the output file did not have the %printer% prefix on the outputfile and previously it was prefixed with \\spool\. I have tried all of these combinations. Is it the mswinpr2 that is causing the unwanted dialog? I'm guessing this is what is preventing the printing to occur.
gswin64c -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies#1 -sDEVICE#mswinpr2 -sOutputFile#"%%printer%%HP LaserJet Professional P1109w" "\\2-DYQJKC2\c$\Webs\myfolder\Public\Reports\HIPAACert\189\H01519447A2191016103332.pdf"
The mswinpr2 device needs to be able to select the Windows printer, yes. If it cannot for any reason (mistyping the printer name is a classic reason for example) then it will pop up the printer selection dialog. It has to otherwise it doesn't know where to send the output. I'd have to guess this is your problem (nothing to do with adding extra switches)
You should be using %printer% from the command line, you only need to double the % in a batch file, because batch file processing tries to interpret the % so you have to escape it. So if you are doubling the % in the command line then yes, it will indeed pop up a dialog box, because %printer% is not the same as %%printer%% so Ghostscript won't recognise this as a printer.
I'd suggest that you keep on working from the command line until you get a result, so don't double up the %.
Other than that, its difficult to comment. Do you get anything on the back channel (you'll want to drop the -q while debugging too) ? Obviously I'm not sitting in front of your system, so I can't see what the printer is called.....
FWIW I tried it here with the "Adobe PDF" printer and it works, but using the "Microsoft XPS Document Writer" does not, and in fact even selecting that from the dialog fails "Unable to open the initial device".
[edit]
A little debugging later....
The function DocumentProperties() fails with the Microsoft XPS Document Writer. I suspect this is because the printing system on Windows was significantly reworked for Vista and above, and Windows 10 does away with much of the legacy code. I suspect this old Win32 API call simply doesn't work with newer devices.
If your printer works when you select it from the print dialog, however, this is not the same problem. For me this printer fails even when selected from the print dialog. Seems its just not compatible with the old Win32 API.
NB this also displays the error "Printer StartDoc failed (error 00000006)".
So I still suspect that you have some problem with the printer name. Maybe a quick test would be to set the name to something really simple like '"Printer1' and try that.
I can't think of anything which has changed in the ljet4 device which would cause a problem, you don;t say what the error is, or even where it occurs, on the printer or reported by Ghostscript, so there's really nothing I can offer on that front.
I recently ran into the same issue. I added a -dQueryUser=3 argument. The documentation on the use of -dQueryUser=N can be found at:
https://www.ghostscript.com/doc/9.25/Devices.htm#Win
in the
10.2 Supported options (device properties)
section.
The code that illustrates this, in a batch file on Windows 10, is:
SET MY_EXECUTABLE_PATH=C:\Program Files\gs\gs9.53.3\bin
for %%i in (*.pdf) do "%MY_EXECUTABLE_PATH%"\gswin64c.exe -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -dPDFFitPage -dQueryUser=3 -sOutputFile="%printer%Printer_Name" "%%i"
I have installed Java 8 JDK and JRE, and when I type javac into cmd, everything seems fine. However, when I download a .jar, for example Optifine, I have no option to open with Java. The icon of the .jar is Internet Explorer. When I double-click on the Optifine .jar, I am brought to a "View and track your downloads" window, where I then get stuck in a "Save" and "Open" loop. What can I do to actually see Java as an option to open with? Sidenote: if anyone does reply, please use simpler coding language, as my knowledge only comes from hours of research on how to fix this problem.
I don't know which version of Windows you are using so I can provide detailed step by step guide. .jar files can be opened with Java and compression/decompression utilities. In general, you can change the default programs in control panel and associate .jar file with a specific program you want.
Note: As an irrelevant point in order to use Optifine.jar for Minecraft modding you do not need to open it.
I'm new to Wireshark & Lua and I have a question that I can't seem to find the answer to by reading around online
Is there a way to open the Wireshark Lua console window on start up? Or even automatically open dialogs created by listeners on start up? I was hoping there were some commands or capability that would allow me to open (not just create) dialogs from within a script.
I've read about the exploit for the console in versions 1.6 and earlier, but I'm running 1.6.8 and I'd rather not use something that could potentially cause Wireshark to be unstable.
Modify the bottom of C:\Program Files\Wireshark\console.lua. Before the final "end", add:
run_console()
You can find an advanced option in the preferences dialog:
Open Preferences from the Edit menu
Navigate to Advanced
Filter for console
Change the value for gui.console_open to ALWAYS
recently, My company need me to do something on application cache, and I read this article: http://www.codemag.com/Article/1112051, I followed his steps,but it cannot work by using vs2013, it will show you the right page, but when you press f12 in chrome, it will show some error:Application Cache Error event: "Failed to parse manifest localhost:xxxxx/Home/manifest", and actually app cache didn't work. but when I use vs2010 it works just fine! since vs2013 has a lot more files in the mvc project, I cannot figure out what's wrong. Now I need some vs2013 tools which are not included in vs2010, so I really need the vs2013 version of this app cache program. It's quite in a hurry, can anyone help me? thanks a lot!
Please follow these steps to see if it helps.
Step 1: Run Windows System File Checker("sfc /scannow")
It allows you to scan for file corruption and restore Windows system files such as DebuggerProxy.dll. If System File Checker finds a problem with DebuggerProxy.dll or other critical system file, it will attempt to replace the problematic files from DLL Cache (%WinDir%\System32\Dllcache). If the DebuggerProxy.dll file is not in the DLL Cache, or the DLL Cache is corrupted, you will be prompted to insert the Windows installation disc to recover the original files.
To run System File Checker:
1.Click the Start button.
2.Type "cmd" in the search box... DO NOT hit ENTER yet!
3.While holding CTRL-Shift on your keyboard, hit ENTER.
4.You will be prompted with a permission dialog box.
5.Click Yes.
6.A black box will open with a blinking cursor.
7.Type "sfc /scannow" and hit ENTER.
8.System File Checker will begin scanning for DebuggerProxy.dll and other system file problems (be patient - the system scan may take a while).
9.Follow the on-screen commands.
Step 2:Make sure your ISO installation file is correct.
You can download the ISO file from the website below.
http://www.microsoft.com/en-hk/download/details.aspx?id=40787]
Before you install it, I suggest you use this tool http://support.microsoft.com/kb/841290 to verify hash of the ISO. Any discrepancy would indicate that the file was corrupted. Here is a blog about how to use the tool.
The sha1 value of ISO is "E61419E51F42254EE07DECF628B85C9861286250".
Then try reinstall it.