Convert Omniform to PDF in bulk/commandline - windows-server-2008

We have a large number of Omniform files (around 100,000). We're updating our main server OS from Windows Server 2003 to Windows Server 2008. Omniform isn't supported in Windows Server 2008 so we need to convert these files to pdf (or another viewable format).
What I've tried so far:
Using Print or PrintTo verb from inside a program using Process.StartInfo and using a PDF Writer printer.
Using Print directly from a command line using the Print verb with the PDF Writer set as the Default Printer:
C:\PROGRA~1\ScanSoft\OMNIFO~1.1\OmniForm.exe /p "Test.ofm"
Both of these Print successfully and a PDF appears. However it prints only the Form, not the Form with the entered in Data. Namely you'll get Last Name then a blank instead of showing the entered last name.
If I print to a normal printer and not a PDF Writer I get the same behavior. Form only with no entered in data appearing.
I've tried calling Nuance Tech Support and they suggested doing them manually 1 at a time. Given this would take someone about half a year of full time work to do, that's not a viable option for us.
So what I'm looking for is a solution to the command line print above

If an "image" of the filled-in form might work for you, Omniformat might help you out. It basically converts the file to pdf using a print-to-file method, but it might help you out, since it does batch conversion.

Related

docx4j word/googledocs compatibility

I'm creating a program which extracts a docx file, displays it in a Javafx graphic interface with buttons in place of flags put in the docx, and when one puts on it, it modifies the docx taken in input.
I'm using the docx4j API for extracting and modifying the document.
The problem is that the program fails if i take in entry a docx generated from Microsoft Word. I'm forced to use an artifice.
I'm taking my docx made on Word, then i load it in Google Docs and I use the "Download in .docx format" option. If i directly put the docx from Word in my program, it fails.
I noticed my Word file was two times lighter after being passed trough google doc. Same, if I tale a docx file downloaded from Google Docs, if i open it in Word and modify one letter and save it, he becomes two times heavier. For the record i use word 2008.
That's it, so I'd like to know if someone know what explains this difference.
Thanks

VBA: set txt to be printed in Portrait mode

this time I'm fighting against a .txt file which doesn't want to be (programmatically) set to be printed in Portrait-mode instead of Landscape-mode (which is the default apparently).
Thing is I know how to do that with application like Word or Excel, but sadly enough I'm working on a device that has no Office at all.
I'm not providing any code at all since my problem is pretty straightforward, and I think I need a simple command in order to solve it. What I basically (programmatically) do in my subroutine is:
Open the file as #1 (I know this appears so '80, but I don't want to modify an up-and-running system, potentially having errors show up)
Write text to the file
Close #1
Save the file
Call text editor shell to show the file to the user
How can I then automatically set the print format to Portrait?
P.s.= I do not have the possibility to insert a userform or an object to print the txt file in "special ways", the user has to print the file from txt editor itself (wordpad just in case)
First to state the obvious: there are no print settings stored in text files (or indeed anything else except for the text). Print settings would be controlled within whatever you are using to print - in this case Notepad or Wordpad.
There are only very limited command line switches for Notepad and Wordpad, which unfortunately don't include page setup. In theory you may be able to automate setting portrait using SendKeys (see here and here) but if it is possible at all it's likely to be difficult and unreliable (focus and timing are two issues).
I can't see a good way round this within the parameters of your question. Adding an object within your application would probably have been the best solution. You might try looking for an alternative text editor you could install that is easier to automate. The only other alternative might be to set defaults within the printer drivers and hope that those stick when the user opens Notepad.

Opening PDF from a DataGrid

I have a DataGrid that reads from a table in a DB the name and file name (full address) of certain files. What I want is when the user double clicks the file it opens the PDF reader and loads the file. How would I go about doing this?
EDIT: This is my current code:
Dim row2 As String = DataGridView1.Rows(e.RowIndex).Cells(3).Value
Process.Start("Acrobat.exe", row2)
VS throws the exception that file cannot be found. I checked the variable and its giving me the correct data. I also tried putting row2 between the quotation marks and no go either. It just doesn't find the file.
WORKING UPDATE: Alright it was a very simple mistake
Process.Start("AcroRd32.exe", row2)
Row2 grabs the data from a cell I have in the datagrid that has the file location.
Process.Start("filename") will open a file using the default application on that machine.
In most cases, the above approach is correct. It is not dependent on a particular application or particular version of the application being pre-installed on the target machine. The advantage is loose coupling between your application and the PDF viewer.
If you really need to, you can use Process.Start() to launch a particular program, many of which will accept a filename as a command line parameter, like so:
Process.Start("IExplore.exe", "C:\myPath\myFile.htm")
(This example taken from the linked MSDN documentation)
You can find a list of Adobe Reader's command line arguments here:
Adobe Reader Command Line Reference
Update: The above link is old (focuses on version 7). You can find version 8 documentation here:
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf
I cannot find a reference for version 9.

characters missing when printing

We have a WPF application which can perform either a report preview or a report print.
Both requests use the same code.
Call the report service which gets the report from Microsoft Report Services.
Convert the report into the desired format (in this case PDF).
Then return the report as a byte array.
The result is then written to a temporary file as a binary stream, and either popped into a window to preview or start a Process to print.
In both cases the temporary file is passed.
Print Preview works flawlessly! But Print Report will print with all occurances of 'ti' disappearing. I see there is a printer escape sequence of ESC t NUL/SOH and I assume that if, for some reason, an escape character gets into that stream that ti will result in an ignored print sequence. Thus the missing characters.
My first question is if anyone has ever experienced this with generated PDF reports?
My second question (obviously) is if anyone knows of a utility I can use to view the binary data in the file being printed, to see what is in the file just before every 'ti' sequence?
After a great deal of searching I came across a post on the Adobe forum that states that version 8 had a bug where it was not printing character combinations. Once I dug deeper it seems that it has returned and the suggested workaround fixed our issue.
Workaround: Do a print as image.
Adobe seems to be unable to do the most basic of what their software must do, print the exact content!
Answer for your second question:
First, do one of the following two things:
Set the Windows print spooler properties to not delete printed jobs.
Pause the target print queue.
Then, grab the spool file from the Windows printspool directory (which location that is you can find out by looking at the (right-click) 'Properties...' dialog of the 'Printers and Faxes' folder).
I realize this is an old post but I wanted to add some updated info from the above comment stating that it's a problem with Acrobat 8. We are using Acrobat 10.1.6 and still have the same problem. From what I've read, it's a problem with the adobe product itself. The only real fix I've seen (actually work around) is to print as an image. LAME
Surprisingly this bug is still there in 2021. Adobe cannot be relied upon printing documents properly. This takes away all the allure of features it had if it cannot do the most basic stuff it is required for.
Printing as image reduces the quality and blur the document.
Simply open the document with Safari or Chrome and print from there. E
I had a similar problem while printing directly from the firefox (acrobat reader within). I downloaded the file and then printed. The problem was solved.

Why does my PDF ask for a password after being retrieved from Visual SourceSafe?

PREFACE: Yes we're moving away from VSS in the next few months.
One of my web projects contains, as one of its files, a PDF. The PDF on our QA site is being pulled from VSS.
A QA tester recently told me he's being prompted for a password when he tries to open it. VSS says the file I have on disk is different than the one it has, so I updated it, but afterwards it's still being shown as different.
So basically VSS is mangling my PDF and the results are so wobbly that Adobe Acrobat Reader is confused and thinks it has a password.
I've tried adding it as Auto-Detect and as Binary. Same results.
Why does my PDF ask for a password after being retrieved from Visual SourceSafe and how can I prevent it?
Do you have the SourceSafe 2005 Update installed?
Handy list of known issues: http://blogs.msdn.com/richardb/archive/2007/06/06/list-of-bugs-fixed-in-sourcesafe-2005-gdr.aspx
The PDF bug was one of the most commonly requested hotfixes: http://support.microsoft.com/kb/925234
I've tried adding it as Auto-Detect and as Binary. Same results.
To be clear, are you adding a version of the file you know is not already corrupted? Even so, there are plenty of other bug fixes on the list above which can cause random file corruption -- try that first.
You can remove PDF password by this tool:
Advanced PDF Password Remover 5.0
Step 1: Import PDF files
Click the "Add File(s)" button, browse your computer to find the PDF files and load them.You can import as many as 200 PDF files into this program for every batch processing.The imported files are listed in the file list window as below.
Step 2: Set output folder
You can customize a folder to save the output files all together. The default folder is My Documents\Advanced PDF Password Removerr. Click "Brows" button to specify a folder on your computer, or you can make a new folder manually in the text box.
Step 3: Remove restrictions
Click "Start" button, and the files are processed one by one.
"SUCCEED" is displayed in the Result column after the removing process is finished.