# ist replaced by %23 in URLs ==> Error 404

Community Beginner ,
Feb 05, 2014 Feb 05, 2014

Copy link to clipboard

Copied

URLs (Links) do not work in my PDFs (from Word Documents), because # ist replaced by %23, which results to an Error 404 in Browsers. Is there a workaround for this bug in Adobe Acrobat XI Standard?

TOPICS
Create PDFs, Windows

Views

23.1K

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Explorer , Jan 22, 2015 Jan 22, 2015
Hi, I've come across a simple workaround which is ideal for me — double high five. I Simply bitlyed (https://bitly.com) the link and that ugly error message vanished. Boom.

Likes

translate

Translate

Translate
Adobe Community Professional ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

Is this happening in your macOS even if you've updated to version 2020.009.20067 of Acrobat?

 

The issue was addressed in this update. But if you have updated to the latest version and you still experience the issue on mac computers, the bug seems to be only related to using the weblink plug-in tool. 

 

At the time that this bytly answer was posted it seems that no one took the time to look deeper before giving in to third-party commercial solution.

 

So bytly.com is not the correct answer when in fact the issue was not a bug that render useless the entire Acrobat software.  Just the weblink creation tool in Acrobat was broken. Moreover, not all versions of Acrobat were manifesting this issue.

 

However if you look at the release notes It looks like the fix only resolves the issue in Windows.:

 https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/continuous/dccontinuousmay2020qfe2...

 

If you missed reading this entire thread, below is what I posted earlier to address what actually works in Acrobat.

 

+++++THIS IS MY OLD REPLY

 

When you used this weblink tool it generates simple URLs out of the text string that you input but it fails to treat this field as an annotation.  That is why you can't work around it.

 

If it was treated as an annotation you would be able to manually edit its tag propperties and even its container attributes.

 

To work around this, don't use the weblink plug-in to generate URI actions. Instead, follow the recommendations I  posted for another user here:

 

 

  • Links work perfectly fine if you decide to use a javascript action to createlinks or to open URLS

 

  • Links also work perfectly if you just go to  EDIT -->>> PREFERENCES---->>> GENERAL --->>> check the tickbox "Create Links from URLs" and then just right-click on the document and select from the context menu "Edit Text & Images" (OR , opening the "Edit PDF Tool") ---> select "Add Text" and type in the desired URL with its opening parameters in just plain text.

 

  • NOTE 1 : You can also use copy and paste the URL text string from a file text editor such as Notepad and paste it in the text box. (DO NOT copy from MS Word or Wordpad , they both will convert the text string to a hyperlink automatically; this is what we're trying to avoid). This method won't work when you copy a hyperlinks that are already encoded as Text/HTML and paste it in the text box in Acrobat; it will create the same issue because it trigger to use the problematic weblink creation tool in Acrobat.

 

  • NOTE 2: When you're done adding your URLs to your document, SAVE and close it . Reopening your document in Acrobat will apply the conversion to hyperlinks automatically and most importantly, if your URI action includes a speacial character that is used as a PDF opening parameter it will open successfully in your web browser without the incorrect %23 encoding (or similar).

 

  • NOTE 3: Using an mouse up javacsript action  in a button or through  the Action Wizard also works. Below is the script that will (and I quote) "Scans the specified pages looking for instances of text with an http: scheme and converts them into links with URL actions."   from page 141 of  the  Acrobat JavaScript Scripting Reference - Doc Methods, addWeblinks
var numWeblinks = this.addWeblinks();
console.println("There were " + numWeblinks +
" instances of text that looked like a web address,"
+" and converted as such.");

 

 

 

Using the methods that I described in the bullets and notes above work, and more importantly, you will be able to see those hyperlinks treated as annotations in Acrobat too.

 

Last thoughts,   Bytly.com is not the appropriate workaround nor the solution to this problem. Hyperlinks that are created in Adobe Acrobat Pro from a text string work perfectly fine and the encoding and decoding from text string to UTF-8 also works perfectly.

 

Just make sure not to continue to use  the Weblink plug-in and let Adobe look into this and fix it.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 11, 2020 Jun 11, 2020

Copy link to clipboard

Copied

The only thing that works for me is the bitly. I have the latest version and even copy/pasted in a text editor first, but it still doesn't work. I am adding the url as a link box over embedded text and an image on the pdf. It worked perfectly fine on Acrobat 9 until I updated to this DC version.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 12, 2020 Jun 12, 2020

Copy link to clipboard

Copied

Are you saying that you tried every suggestion in the bullets that I posted above?

 

When you say bitly is the only thing that works, did you actually took the time to read through the long verbage  that I posted and try each one of the methods?

 

I just said in my old thread that the method that you're using won't work.

 

You may need to be more specific about everything you're not saying here that you already tried.

 

I did a lot of research and testing on this and I'm not going to give up so easily just because an Apple user says that bitly is the solution.

 

 I am used to not getting some of my factual answers marked as correct solutions  anyway.

 

I think I've wasted my time here with another stubborn (or real dumb) Apple user, who is gonna fight till the end saying that bitly is the solution.

 

In the end you'll going to even say that you were able to figure it out on your own, with no help, and mark your own answer as correct solution.

 

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 12, 2020 Jun 12, 2020

Copy link to clipboard

Copied

I did follow steps you offered above, but I don't have time to be a software developer for an action I can simply do with adding a bitly link. The url I add in DC works and doesn't work using a # in the middle of the address. I've added links for years using Acrobat without an issue using a # and now there is. Thank you for your time on this. Much appreciated.

 

Oh, I found a step-by-step workaround as I know the bitly was a temporary fix and not ideal.

 

  • Open the problem Acrobat file
  • Click on "Edit PDF" in the toolbar at right
  • Click on "Link" at the top toolbar and select "Add/edit web or document link"
  • Double-click on the existing problem link
  • In the "Link Properties" dialog box, switch to the "Actions" pane
  • Click on the "Open a web link" action in the "Actions" section and delete it so the Actions box is blank
  • Under "Add an action," select "Run a JavaScript" from the dropdown box. This will launch a new dialog box.
  • In the new box, type:

 

app.launchURL("https://www.yourdomainWith#.com", true);

 

  • with the sample URL replaced with your URL with special characters
  • Click "OK"
  • In the Link Properties dialog box, you should now have a JavaScript action
  • Click "OK" again

The URL should now launch correctly.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

In addition to the update Adobe sent, this works properly if you have an older version of Acrobat (I'm using Acrobat X Pro, and it works there)

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

My case:

I created an e-book in Pages, Mac, and exported it to PDF. A signup link in the e-book: www.domain.com/page-title/#signup however unfortunately in the exporting process converted to www.domain.com/page-title/%23signup in the PDF, causing a 404 page. Since the e-book already had been distributed, I had to solve the 404 error the link caused.

After trying many code lines, found on different websites, the final solution to my problem was editing the .htaccess file on my server like this:

 

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
</IfModule>

# END WordPress

 

 

Adding:

 

RewriteRule ^([\w-]+)/#(\w+)$ $1/#$2 [R,L,NE,NC]

 

after

 

RewriteBase /

 

So the .htaccess file reads:

 

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([\w-]+)/#(\w+)$ $1/#$2  [R,L,NE,NC]
</IfModule>

# END WordPress

 

(and some other lines for other purposes in my case.)

 

Regarding the creation of the PDF: The next time that I will publish a PDF e-book, I will edit the PDF – which I created from the Pages files – in Adobe Acrobat XI regarding the links whose hashtags "#" have been converted to "%23". Links edited in Acrobat containing a hashtag will work. And then distribute it. 🙂

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

Thank you for sharing that feedback... Interesting!

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

I'm getting this problem in Mac OS Catalina 10.15.7 on InDesign 2021 (16.1) when exporting an interactive PDF.

Trying to include a hyperlink with anchor https://domain.com/page#name and I'm getting https://domain.com/page%23name.

The weird bit is that it worked today, then stopped working and just kept changing # to %23. If I open the PDF in Acrobat DC it links correctly with the # symbol. If I open the same PDF in Preview, the link shows %23 even if I have edited and re-saved it using Acrobat DC. All of my Adobe software is up to date and my mac is on the latest version of Catalina - intentionally not upgrading to BigSur just yet.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

I think I read before in these forumms not to use Preview, it will mess up the PDF... but I may be wrong and completely uninformed about why some users report issues with Preview.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines