No output from DOMPDF - command-line

I am trying to run DOMPDF from a windows command line. I am using the documentation from the domPDF website as a reference. DOMPDF usage
C:\>php -f C:\dompdf\dompdf.php -- C:\example.html
When I run this command I get nothing. No pdf, no errors, noting. I have tried using the -v and the -d flags to turn the verbosity up. I still get no output, neither to the screen or the command line.
When I run,
C:\>php -f C:\dompdf\dompdf.php -- -l
I actually get a listing of the paper sizes, so PHP is installed and I am correctly calling the dompdf php file.
Does anyone have any ideas on why this would not actually produce output?
The html file is on the C: and has information in it.
Does anyone have any example of running DOMPDF from the command line, or see what I am doing wrong?
Thanks for the help.

Related

Cannot redirect EXE output to file

I have an exe program I'm running on Windows 10 using PowerShell. When I run it, I get the following output.
> .\Program.exe
Unlocked level 7/10
When trying to redirect all output or just stdout to a file, the program stops giving output. For example
PS > .\Program.exe > .\out.txt
PS > cat .\out.txt
PS >
I did not write the program but what I know is that it was written in C++.
Is there any trick to get the output into a file? I tried running in python and writing output to a file, running in python without fetching the output and redirecting, running from another powershell, and lots of other combinations but they don't seem to be working. Also, when running from Git Bash, I get no output at all.
I was thinking about some checks on the descriptors but I'm not sure since I don't have the source code, only the asm code
It looks like Program.exe is actually generating an error, and not output, first commenter is trying to get you to see that, but not really explaining that part...
(NOTE: You aren't actually using any powershell besides an implied "Invoke-Expression")I think you might be dealing with STDERR vs. STDOUT, when I invoke reg.exe in that fashion from powershell I get no output to the text file. This is because the text I was seeing was an error message ( Contents of STDERR ) from reg.exe, not the output ( contents of STDOUT ) from the command. When I passed proper parameters to it ( reg query HKLM\Software\Microsoft > C:\Users\foo\Documents\foo.txt) it wrote the Contents of STDOUT to the text file instead of the screen.
Here is an article that explains it better than I just did:
https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-from-command-prompt-stderr-stdout

second line on my system or python terminal now saying: “ -bash: zzzzz#: command not found“

I have been trying to pip install psycopg2 for some time now
I have just updated to python 3.7.4, before this problem started.
To set my path to a specific python version I used the code below.
nano .bash_profile
I thought that it would now be easy for my system to identify the path of the newly installed python, as to enable it to install psycopg2. Then the below started happening.
The second line of system terminal or python terminal is now always showing:
-bash: zzzzz#: command not found on my terminal
No matter what I type on my terminal, I am always getting command not found
This would mean you literally have "zzzzz" somewhere in the bash_profile. Bash is seeing "zzzzz" as just another command to run at startup like the rest of the profile script. As there is nothing in your PATH matching that string, bash reports the issue back to you.
Either remove the extra line from your .bash_profile. OR use a terribly wasteful work-around!
ln -s /bin/true /bin/zzzzz
This will create a symbolic link to the "true" binary (all it ever does is return true) from zzzzz. Now bash can find zzzzz and run it during start up, which does nothing. No more error and an absurd work around. You should fix the file.

headless soffice fails silently

I can't get headless soffice to tell me why conversion does not work and I cannot seem to figure out what flags I could pass to get some error output.
Version 1:
/usr/bin/soffice --headless --convert-to pdf test.key --outdir .
Version with all my silly attempts:
HOME=/tmp && /usr/bin/soffice --nologo --nofirststartwizard --headless --convert-to pdf test.key --outdir . > logfile.txt 2>&1
When I run the above I get a silent failure: I execute the command and then there's not console output.
Thoughts?
FYI:
- I'm running this on a Debian server.
- This works perfectly well for PowerPoint conversion.
Make sure that not only are you not running an instance of libreoffice on your pc but also that you have not got the libreoffice Quickstarter module running either, both will result in a silent failure, when trying to do this sort of thing.
Closing other instances of LibreOffice may solve it. It seems to be a bug in LibreOffice.org versions <5.3. You can find an explanation and solutions in
this answer.

Protractor Cucumber : how can I capture web driverjs errors in cucumber html report

I was about to use cucumber-html-report plugin to generate the html reports for my framework but I noticed that the report doesn't print the errors which I see on the Command line- for example -"an element not found for locator..".Rather it prints the time out errors. How can I capture the actual errors that I see on the Command line.
Any advice??
Cheers
you can use the tee command to save the Command line - output to a file while also seeing it on command line
cucumber (+options) | tee -a logFile.txt
It's not as pretty as an html report, but it probably gives you the additional information you want for debugging in an extra file.

TexStudio and TexCount User Command

Im trying to incorporate TexCount into Tex Studio.
Ive gotten the perl script working in the command line, but I would like it done in TexStudio automatically.
I have adapted a bat file, but it doesnt work:
#echo off
C:\texlive\2015\texmf-dist\scripts\texcount\texcount.pl -html -inc "?ame" > "%".html
"%".html
However I tinker with the syntax it doesnt seem to work and at the very most I can get it to produce a blank html file "_count.html"
Can anybody get this .bat file working please?
I've managed to get it working using the TexStudio User Commands.
In the Menus,
Options > Configure TeXStudio
Then,
Build > User Commands
I created my own user command with the name "texcount".
texcount %.tex -inc -total
This runs the texcount script;
on the current file (that's what the % is for),
it includes the files that use \input{},
it provides a total.
I can now run this command from:
Tools > User > (Number of user command: name of user command) e.g. 1:
texcount
Then the results are output in the messages tab.
Hope that helps.
EDIT: To more specifically produce a html file. I imagine you could use the html commands to produce your html file as shown in Thomas' answer.
You could then pipe the output to something like wkhtmltopdf to produce a pdf from the html file and show it using the default TeXstudio pdf viewer.
I could get this to work on my mac, you may need some adjustments for other OSs and/or other directory structures.
I created a script that calls texcount, as follows:
#!/bin/bash
perl /CorrectPath/texcount.pl -v0 -sum -html "$1*" >tempdoc.html
open tempdoc.html
In TexStudio, my user command looks like this:
"/CorrectPath/count_pdf_words.sh" ?ame"