File Does Not Begin With '%PDF-' - delphi

I had a peculiar problem yesterday. A customer put one of my Delphi apps on some Toshiba laptops, and all was fine until it was time to generate some Acrobat files as a Rave 7 report, which produced the subject error.
The laptops had Acrobat 7 Standard installed with XP SP3 and IE8. I uninstalled Acrobat 7 Standard, put in Acrobat 5 Reader which they had lying around, and the problem went away. However, the customer doesn't see backtracking Acrobat as a solution, because the usual environment this Delphi app runs in of XP SP3, IE 7, and Acrobat 7 Standard doesn't show this problem.
A Google search didn't reveal any recent causes or effects. The Microsoft and Adobe KBs deny that any problem exists.
Any clues as to what specific area needs a workaround? Today I'm going to uninstall IE8 and reinstall IE7.

I came a cross the same problem, in IE with the Adobe ActiveX plug-in. It was some time ago, but if I remember correctly the problem was the ActiveX in some versions of Acrobat 7, maybe combined with specific versions of the PDF itself. Installing the latest Adobe Reader solved the problem.

If reinstalling Firefox (or your browser) and reinstalling Adobe Acrobat Reader does not work is because it is inheriting settings from past versions. What worked for me is doing a manual uninstall of all stored application data. In Win 7 Go to C:/users/your name/AppData/Roaming/Mozilla or Microsoft/ and the try to delete all of the content related to your browser including extensions and plugins. If you don't have permission to delete folders then open it and delete file by file.
Note that you have to be able to view hidden files to access AppData folder. Then do the same for the AppData under Adobe folder. Then reinstall Firefox and acrobat reader. Done!

PDF files are suppose to start with the sequence "%PDF-X.Y"; however, some programs, email programs are notorious, will add a header, such as Mac Binary. Acrobat looks in the first 1024 bytes for the %PDF sequence. Other applications only support %PDF at the beginning of the file.

We were experiencing this and found that it was a matter of adding the site to the "allowed popups" list.

Related

Delphi not opening projects

I have been using Delphi 2010 for some time with no issues but recently every time I try to open a project I get a dialog box asking me to open the project
with a folder that doesn't exist. How do I change the path Delphi opens projects.
Assuming you are using Windows...(up to 10 anyway)
Right click on the project's DPR and choose Properties.
What does the Opens with: line say? Mine says bdsLauncher.exe
If it says anything else, then you somehow had the system change it directly or indirectly. Virus, installation of some other text editor, whatever...not a big deal in any case. Do the same check for files with extensions DPROJ, GROUPPROJ, ...
If you need to change it, the file should be in a path similar to my C:\Program Files (x86)\Embarcadero\Studio\21.0\bin except that your version isn't 21.0
I did have issues once upon a time with XE7 where I had to set DPR to open with bds.exe, and DPROJ opened fine with bdsLauncher, but it was probably due to IT's setup of my laptop for someone else, and something with the Win 10 software reset (instead of a format or restore from clone) when they gave it to me. Installing an XE7 update fixed the problem, and it hasn't been an issue since we moved to 10.4

Delphi Rio after patching not starting

I just did a complete system rebuild (format C drive and go from there)... Win 10 Pro 64 bit. I reinstalled Delphi Rio, the INITIAL release (6.7GB).... Delphi started up fine. I had previously downloaded Delphi Rio Patch 2, (7.3GB), so I unzipped it, and ran setup. It automatically chose the middle option (Modify), so I left it at that... and installed. It appeared to run fine. After completion, I noticed that it had removed the Delphi icon I created on my desktop, and that the links in my start menu for Delphi no longer work... I did not investigate a whole lot, as I had a patch 3 (7.9GB) to install as well. I unzipped, ran setup, and again Modify was the default option, so I ran with that... no errors. When completed, I tried to run Delphi. I have what I think is the appropriate directory structure (C:\Program Files (x86)\Embarcadero\Studio\20.0\bin) with 298 files in the bin directory, however bds.exe is NOT one of the files. Any idea what is going on?
The only possibility I can think of is that I have let my subscription expire.... and I am not entitled to the patches, yet the Embarcadero support system let me download them. Could this be the explanation?
Updating a certain Delphi version is usually done like this:
Download new ISO file or web installer
Uninstall the Delphi version you want to update and keep the registry settings (you are asked about this during the process)
Run setup from downloaded ISO or web installer
Your approach of installing the newer version on top of the older one is clearly the wrong way.
This is also explained in the install instructions (readme file) that comes with every ISO or web installer.

wrdDoc.SaveAs(SaveToFile); not working in windows 8

I have developed an app for computers a while back, that generates a word document and saves it automatically under a name provided by the software.
The application has worked perfectly in windows xp and windows 7. But now it needed to be moved to a windows 8.1 computer and since the generating works perfectly. But the save command wrdDoc.SaveAs(SaveToFile); does not work.
Basically what happens, is on that command's execution a save dialog appears and you can save the document yourself. After you click save. You get an error command failed with no further details.
Is there anything that has changed since windows 7 that prevents this code from executing properly?
The old computer used the following:
windows 7
office 2007/2010/2013(all were used at some point in time)
New computer:
windows 8.1
office 2010
UPDATE:
it is also worth noting, the dialog does not show any of the word documents in the folder if i browse there... Can this be a hint to the problem?
Resolved
I managed to find the problem. It's a brand new laptop, and Acer had a bunch of crap installed that sync's with office and explore. Once i uninstalled that the software returned to working normally...
Thank you guys anyway so much :)
It depends on your word version. Only 2007 has a "Saveas" method for the document object (https://msdn.microsoft.com/en-us/library/bb221597%28v=office.12%29.aspx). The later versions (2010 and 2013) only have a "Saveas2" Method (https://msdn.microsoft.com/en-us/library/ff836084.aspx)

Delphi/Paradox Database desktop DBD32.exe settings for Windows 7

Does anyone have any suggestions on the compatibility setting on Windows 7 for the Delphi/Paradox Database desktop program so that it displays properly in Windows 7 (x64)?
We've tried quite a few combinations of selections on the Compatibility tab on the .exe's Properties screen. But, none of them have eliminated fixed our problem:
It runs fine, but the buttons on the structuring screens are missing their text and are not clickable. The work-around is to use the keyboard shortcuts for these buttons, but obviously, although workable, that's not ideal.
Pre-emptive prose: Yes, we know we're on risky ground and need to migrate away from Paradox, which in some future version of Windows will not be supported. (But, we've got a million+ lines of code and migration won't be easy...)
I can confirm that disabling UAC and moving Database Desktop out out C:\Program Files makes buttons work again.
Before:
After:
A few points:
Try running it with UAC disabled.
Make sure you have all the BWCC-dlls and stuff in the right places too.
On Windows XP, check which fonts is uses, make sure those fonts are installed too.
Nothing worked for me with Delphi 5 Database Desktop on Windows 8, until I realized that I had also installed it through the Delphi 4 setup - and that version of DBD opens fine for me. Hope this helps!
so easy answer :
don't use delphi menu to open desktop database but just navigate to this directory
"C:\Program Files\Common Files\Borland Shared\Database Desktop"
and run DBD32.EXE
you can also create a shortcut to it on desktop or quick launch on taskbar
i use delphi 7

Where does CodeGear Delphi 2009 store settings

I'm running windows 7 ultimate (32bit) and have a very anoying problem with my installation of delphi.
The problem is with the feature "Code Insight" and with "Code template completion", it is very anoying when it every time i write something and it wants to complete some piece of code for me (for example i hate it when he completes the for condition). The problem is that i can't shut it down since i think it has a bug when installed on windows 7 that when i turn those features off it works once and then it turns on again, like it couldn't write in the settings file.
Does anybody know where Codegear Delphi 2009 stores it's setting/configuration file? Or how can i turn off.
I tried running it as administrator in compatibility mode (vista and xp) tried searching for the file but with no luck.
In the registry under: HKEY_CURRENT_USER\Software\CodeGear\BDS\6.0
Also in HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\6.0 but there seems to be no data there of interest.
Also under C:\Users*USERNAME*\AppData\Roaming\CodeGear\BDS\6.0 are some settings stored.

Resources