Avatar of claghorn
claghorn
 asked on

Browser cannot find pdf document.

<a href="file_test.txt">
<img src="adobe.jpg" width="18" height="18">&nbsp;Report</a><BR>

You see file_test.txt? It works. My browser opens it no problem.
I have a pdf by the same name. When I change the code to file_test.pdf my browser says it cannot find it.

I don't get it. Can you help?
My browser opens pdf's no problem. ie: I can goto File-Open and navigate to a pdf and it opens. So why not open in code?

The error itself actually shows the path to the file but still it says it cannot find it.
See Attached.
Web BrowsersHTML

Avatar of undefined
Last Comment
claghorn

8/22/2022 - Mon
Adrian Crabtree

I would double check the path and name. Files are case sensitive.
claghorn

ASKER
I triple checked. The path and name are the same. I only switch out the .txt for .pdf in the code. All my browsers say they cannot find the pdf file.
ASKER CERTIFIED SOLUTION
Adrian Crabtree

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
COBOLdinosaur

It might help if you post a link to the page with the problem so we can try to diagnose what is happening.

Cd&
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
claghorn

ASKER
But it opened another PDF just fine. Not sure of the origin of this PDF. ie: What is was converted to PDF from. I know that my problematic PDF was created from a Microsoft Word 2010 document. I converted it to PDF using Word's built in features and I also created a PDF using Adobe Acrobat 9. Both of them bomb.

I guess the question is how do I convert my word docs to PDF that will be rendered in my browser from standard HTML code?

Thanks
Adrian Crabtree

Adrian Crabtree

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Adrian Crabtree

Also, if other PDFs are working, then I believe that the one you are having trouble with may be corrupt. Maybe it was a bad save, or instead of creating a pdf, the file extension was changed to .pdf.
claghorn

ASKER
None of the Word Docs that I convert to PDF are working. They open as PDF in everything else but never from HTML code. They can't all be bad saves.
I used Adobe 9 to convert to PDF they bomb. I used Adobe 9 Distiller. It said the conversion did not work:
%%[ Error: undefined; OffendingCommand: PK ]%%
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%

It looks like something wrong with the Word program documents that cannot be converted to PDF that work with HTML code.
Adrian Crabtree

Try a convertor. I used Adobe Acrobat, and they always seem to work for me.

http://www.freepdfconvert.com/
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Adrian Crabtree

Try using a free trail of Adobe Acrobat to convert the documents.

http://www.adobe.com/products/acrobat.html
Member_2_276102

The question says "See Attached." But I don't see any attachment.

Tom
claghorn

ASKER
It should be attached now. btw, I converted an older word 97-2003 document to PDF and it worked.
This is definately a Word 2010 issue. I tried the free PFD converter mentioned above. No luck either. I tried to save the docx as older doc format and still no luck.
I wonder acrab, did you convert a Word 2010 docx to PDF and it opened up from your HTML code?
Capture.PNG
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Adrian Crabtree

Hey Claghorn, no I didn't convert a Word document. I just created a text document and then converted it to PDF with Adobe Acrobat. You are probably right. Word documents do not play nice with HTML files. It has to be the converter in Word 2010.
claghorn

ASKER
I re-installed / repaired the installation of Word 2010. The corruption suggestion turned out to be true.