Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Active URLs for PDF and Ebook

Return to Member Forum

  • Author
    Posts
    • #91692

      This is about URLs being active for PDFs (that also will be used for an eBook). NOTE: I am NOT making the Ebook. In fact, all we do are the printed books and some other company (usually the publisher does in house) does the eBooks. I am only doing the print job. And apologies in advance for the length of this post).

      I will be getting the Word file (which I will tag and save as a .txt file and import. I will be using xTags. I have been told all URLs will be tagged with a character style within Word. That way, I can search and replace with the appropriate InDesign tags. So that won’t be a problem. And give it the hyperlinks character style in InDesign.

      NOTE: This will be done in CS6 (as this client for some reason keeps staying at that old version). I will try to at least get them to agree to CC2014 (no way I can get them to go 2015).

      The issue—I think is the spaces within URLs when I use things like discretionary line line breaks, soft returns, or a “no break”. Using those turns into spaces when you look at the URL (when you right click and edit).

      It seems to me that when I regularly export a PDF (with customer settings), when viewing the PDF file—all the URLs are active—unless they go to two lines. Then the URL ends (i.e., it is a URL until the line break).

      So I figure I have to apply the URL codes before hand.

      And now the problem: The URLs have to work, and be guaranteed to work.

      I know I can individually go each URL that breaks from one line to another and edit the URL and take out the spaces caused by the discretionary line breaks or soft returns. Which is a total pain in the butt to have to right click and edit them).

      Is there some way to automate it? I’m thinking not because the real URL is technically invisible. For example—I could right click the URL and make it a porno site—which I would never do—but that’s how phishing scams work). But the typed URL would look normal.

      So my questions are:

      1) Can I automate or speed things up by getting rid of those pesky spaces caused by discretionary line breaks/soft returns,”no break” character style? Or do I have to do each URL individually?

      2) Customer will want one PDF with no active links at all. NONE. But the other PDF has to be active. How do I make one PDF non-active, when it seems it’s automatically done (until a line breaks).

      3) I know I can control it via the PDF export dialogue box by checking the include hyperlinks, (which works when I use the hyperlink character style, but is useless for ones without the style applied if breaks from one line to another).

      4) I’m not sure what they want so far as what the URL should look like, but I guess it’s not a big deal since it’s a character style and I can modify? Or should I find out ahead of time? Suppose they want it boxed? I think that has to be done individually.

      5) #4 is concerning because they want one PDF without active links, and one with.

      I’d appreciate any advice from you wonderful people.

      Dwayne

    • #91724

      Dwayne, to much text! Who should read this …

      Anyway:
      1. A hyperlink is only a real hyperlink, if it shows up in the hyperlinkspanel! The fact, that a link is clickable in Acrobat, means not, that it is a hyperlink by default!

      2. Avoid those artistic breaks inside of hyperlinks! No break or discretionary line break should not be a problem. If so, remove those things in a epub-indesign-file.

      3. There are surely some possibilities to automate things and speed up the process, but this need a better understanding of your needs and examples and should not be part of a forums thread.

      Kai

      • #91746

        Thanks for your reply, Kai. And yes–it was a long post. I probably should have put a disclaimer at the beginning of the post that it was long.

      • #91748

        I never saved my post. Anyway:

        1) Breaking the URLs properly for print books is necessary and are not artistic breaks. There are rules in place for breaking URLs (see the Chicago Manual for example). For print books, all punctuation/dashes/underscores, etc., cannot end a line–they must start the next line. The exception is the double slashes. And the URL cannot automatically hyphenate. I have no choice but to use discretionary line breaks to make the URLs break properly for the print edition.

        2) The discretionary line breaks do cause a bad URL, which I’ve had to edit in the InDesign file by right clicking on the link and editing the URL (i.e., removing the extra spaces caused by the discretionary line breaks). I was wondering if there was an easier way than editing each URL by hand. If the experts feel it can’t be automated to edit URLs (i.e., removing spaces) and they must be done individually–then so be it. I don’t have a problem with that and we can charge the client accordingly. I’d just like to know so I don’t waste my tme trying to find way to automate it.

        3) For an example of what I’m talking about, one simply needs to look at a notes section of a book and see URLs line that are more than one line long.

        4) That is all I really want to do. Keep the URLs active when I use discretionary line breaks. InDesign puts a space into the actual URL link (which I have to edit and remove).

        5) I respectfully disagree that the information I need should not be part of a forum thread, as the needs and examples are not complicated.

        I also typed up a lengthy post because I wanted to answer any questions ahead of time. And to let folks know what I needed, how I was currently doing it, etc.

        Dwayne

    • #91752

      It is not clear to me, how you create your hyperlinks and I’ve no idea, what the Chicago manual is ;-)

      However: I can confirm the spaces in the hyperlinks panel. A little script can repair those blanks:

      var allHyperlinks = app.activeDocument.hyperlinks;
      var nHyperlinks = allHyperlinks.length;
      
      for (var i = 0; i < nHyperlinks; i++) {
        var curHyperlink = allHyperlinks[i];
        var curStr = curHyperlink.destination.destinationURL.replace(/\x20/g,"");
        curHyperlink.destination.destinationURL = curStr;
      }
      

      Kai

    • #91769

      Hi Dwayne

      This script would be useful for you: https://www.id-extras.com/products/hyperlinkpro

      Marie

    • #91792

      Thanks, Kai and Marie. I will try them.

      This is a new area for me (though I’m well-versed in InDesign). I’ve just never had to do these active URLs.

      And the books I do have hundreds of them.

      Thanks again–I will try the scripts this week and keep you posted.

      Thanks again.

Viewing 4 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads