I have a msbuild script that includes creation of a few PDF's using PDF creator. It's the Convert2PDF.vbs that's being used, converting doc's to PDF's, and a while ago it stopped working and none seemed to take the time to fix it. So I looked into it and by debugging the script I found that it was in fact a document for which Word presented a dialog with information about contents being larger than the margins. This halted the entire thing since none could press this dialog during the auto-build.
So what I wonder is if there is a way to tell the PDF Creator script, via cmd line arguments or by altering the script, to suppress these kinds of warnings and just continue with conversion?
I solved this by creating a script in word that suppressed warnings if the given document resided within the build folder specified.
Related
I was working on a Vuejs project. So this morning when I opened the project it wasn't compiling anymore and it was reporting an error in one of the components. When opening the component, this message appeared in the VSCode editor "The file will not be displayed in the editor because it is either binary, very large or uses an unsupported text encoding." Clicking on open anyway appears a lot of code with strange symbols as shown in the image. When I try to open the file in another editor, the same problem also happens, but the symbols change. I would like to know what might have happened and if there is a way to recover my file?
Looks like your file is corrupt. Restore from a backup, or re-pull from git.
When attempting to run RMTrak (a requirements mapping software), Visual Basic runtime error 4248 would appear. This only happens on a single file in the set of files being used. Other errors occur when attempting to run RMTrak while the document is currently open.
Run-time error '4248':
This command is not available because no document is open.
- https://support.microsoft.com/en-us/kb/813983 (1/6/2017)
How RMTrak works: RMTrak will open a file, parse it for specific formats, and consolidate it to their viewer. It will use tags inputted into the documents to relate to other other requirements, input specs, etc to show a list of requirements, their mapping, and how it relates.
Open up the document in question and hit "Alt-F11". The VBA editor will appear. Either delete or comment out the VBA code. Save. Re-run.
When RMTrak is parsing the document, it is attempting to run the Visual Basic code that is embedded in the document. Since the document is not being opened by Word when RMTrak is parsing it, the "ActiveDocument" property is invalid.
I'm using WiX 3.7 I managed to get WiX Minimal UI to work properly following the instructions from http://wixtoolset.org/documentation/manual/v3/wixui/wixui_dialog_library.html
When I used Arabic Licence file is shown incorrectly (first lines are blank), unless user scrolls the text area in which case the text starts to look as expected.
I already tried the advice from the page http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html
Open your RTF file in WordPad and save it from there in order to remove the complex RTF content from the file. After saving it, rebuild your MSI.
My current approach is to write a Custom EULA Dialog, but I would prefer to stay with WiX UI Minimal builtin Dialog... Have you experienced this problem? Do you know how to overcome it?
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.
I am using code similar to the below to add some files to a zip folder:
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(CVar(strDest)).CopyHere CVar(strSource)
This works fine most of the time, but sometimes I get an error:
"(Compressed (zipped) Folders Error) Cannot create output file". This error is raised asynchronously outside of my VBA code and as such I cannot trap it to take remedial action.
If I enter break mode and step back to:
oApp.Namespace(CVar(strDest)).CopyHere CVar(strSource)
then the file is added correctly.
I am guessing that there is some kind of lock either on the compressed folder or the source file that is causing this problem, but I am unsure as to how to check this. I should note that the files are being added are pdf files created from Microsoft Access 2007 and we are using the fully qualified paths and the code runs as follows creating up to 10 pdfs per zip file:
Create Zip
Run this loop:
For Each ReportToRun
CreatePdf ' using DoCmd.OutputTo acOutputReport, "rptHame", acFormatPDF, strReportName
AddToZip
Next
Any idea how to either fix this or trap the Cannot create output file error?
Thanks
I've very successfully used the open souurce Info Zip DLLs. See Compression DLLs, OCXs, etc for links and sample VB code.
Two thoughts, neither likely to fix the issue:
Have you tried explicitly providing FALSE as the next argument, i.e., the AutoStart argument? The help file say it defaults to FALSE, but maybe it's opening the PDFs after generating them, so that they are still open?
add a SLEEP of a couple of seconds (see Make code go to Sleep for the code).
alternatively, loop through all your reports and generate all of them, then start a new loop to copy each one into the zip file, rather than generate/copy for each report. Having a couple of seconds sleep between the two loops might not hurt (assuming that the problem is that the asynchronous PDF generation process is not fully complete at the point the copy is initiated).