Hyperlink problem when you export to PDF using Javascript

From an INDD file, my script changes the texts of the product to the hyperlinks number.  I find them using findTextPreferences, then I add this url before the product numbers:

".. /Products.jsp/prodnum="+ ProductNumber;

Then I export it in PDF format.  When a mouse user on several products, they can click on it and go to the above page.

The problem is when I export to PDF, there are spaces before and after the number of the product.  example:

".. /Products.jsp/prodnum=%205674-897%20 ".

To check where the spaces are coming from, I've added alerts on my script, but there is no space on my alerts, only when it is exported spaces will appear on the product numbers.

You will need to find a way to remove the spaces from the product numbers.  I tried many things such as replace, I created a trim function, paintings, all concatenated product to 1 variable numbers then used substring.  The expected result is:

".. /Products.jsp/prodnum=5674-897 ".

Thanks in advance guys, I hope you can help.

Using ExtendScript Toolkit CS5 and Adobe InDesign CS5.

Maybe the game can help here:

"../products.jsp/prodnum=" + ProductNumber.match(/\d+\-\d+/);

--

tomaxxi

http://indisnip.WordPress.com/

Tags: InDesign

Similar Questions

  • When you export to PDF from Word, 5th level indent pdf as an image, and not as searchable text.  How can I fix it?

    Is it a setting in Adobe, in Word?  Result is the same as I print to PDF or save - as pdf.

    Thank you

    TM

    It seems to be a known issue with Adobe PDFMaker in Word 2007; more specifically there are problems when you export header 7, 8 and 9.

    It seems that the PDF file is published correctly when you use:

    File > export > "Create a PDF/XPS Document" with "ISO 19005-1 compliant (PDF/A)" radio button checked.

  • Can CS5 - I get the progress bar to show when you export to PDF?

    Hello

    Working on Mac OSX 10.5.8, CS5.

    I miss the progress bar when you export to PDF, it's annoying not knowing how long something has go when that's all you're waiting on that.

    No one knows how to get to show once again!

    See you soon!

    If you go to the title of the window > utilities > background tasks, you can check on the status of a PDF export.

  • Text in an image on Microsoft Word stretching when you export to PDF

    I'm having a problem when converting to a word to PDF document... There is a picture in my paper which seems to be a PNG; Is that a graph has this text as well as images. When I export to PDF, it runs from the police. No one knows why this happens? Is that because of embedding fonts? How can I stop it?

    Before & After.JPG

    If you select the Adobe PDF printer in the print WORD menu and then review the DOC file, how is it? It also seems that you not embed fonts (check the font embedding to ctrl-D).

  • Hypertext links look in inDesign, but do not work when you export to PDF

    I can not get hyperlinks to work in an exported PDF file. I deselected the shared hyperlink target field, but that did not help.

    You export to interactive PDF? Or as Print PDF? Not every ID version supports hyperlink Export print, and so it would be important to know your version.

    If you export a PDF file, you must enable to export hyperlinks.

    Not every PDF export allows hyperlinks. If you export all X or VT-standard, such as PDF/X-4 and others, export with interactivity is not possible.

  • pages creates bad hyperlink when you export to PDF

    I use a MacMini (2014) with OS X 10.11.5.

    I have a document pages with a line that contains 2 hyperlinks:

    aaaarund um Dagmar Müller und das Projekt "Schwimmen für alle Kinder" ins zusammengetan

    If the line does not break at the end, it works fine. If the gets line too long (the aaaa at the beginning) and I then export to PDF the first link point to the address of the second link in the pdf file.

    I assume you are using Pages 5.x, which has a number of problems with links, it is one.

    Report it as a bug to Apple and use something that works like the Pages ' 09 instead. Or wait for Apple to fix it. But Pages 5 is almost 3 years old now.

    Peter

  • remove hyperlinks in InDesign when you export to PDF

    I have an InDesign file with any of the hyperlinks set up that contains text that are URLS (for example, it includes the www.google.com text, but NOT a hyperlink to that URL). I need the file to set up in this way because I'm not allowed to publish PDF documents that contain active links. Whenever I export the InDesign file to PDF hyperlinks become active in the PDF file. This is the case whether or not the option "include...".  Hypertext links' is checked. The hyperlinks window is empty. Any advice on how to prevent that from happening or how to remove the links from the PDF?

    Thank you!
    Laura

    You can clear the check box of the hyperlinks on the output of the pdf dialogue box.

    In my view, though according to your preferences hyperlinks Acrobat become active anyway.

    In Acrobat preferences, in general it is usually defined to automatically detect URLS

  • EncodeForHTML & HTMLEditFormat: formatting is different when you export to PDF

    I use ColdFusion 11 and have just started using the EncodeForHTML instead of HTMLEditFormat function whenever I need to display text that the user entered, usually via a textarea component.  We need to save formatting so that the information the user entered remains comprehensible.  Users have the choice between display information on the screen or export to PDF.  We use EncodeForHTML to secure information and we use < pre > to maintain the required formatting.

    My problem is that when I need to export data to a pdf file, then EncodeForHTML acts differently than does HTMLEditFormat.  For some reason, I get extra lines inserted.

    Here is a code example.  Simply save to a cfm and launch:

    -------------------------------------------------------

    < cfsavecontent variable = "f" > my sample data.
    1 20% of the value
    2 30% of the value
    3 50% of the value

    Here is my summary of this data.
    < / cfsavecontent >

    < cfhtmltopdf saveasname = "MyTest.pdf" >
    < cfoutput > with EncodeForHTML: < pre > #encodeForHTML (f) # < / pre > < / cfoutput >
    < cfoutput > with HTMLEditFormat: < pre > #HTMLEditFormat (f) # < / pre > < / cfoutput >
    < / cfhtmltopdf >

    ----------------------------------------------------------

    The version of HTMLEditFormat appears correctly.  No idea how to get around this problem?

    If you comment out the tag cfhtmltopdf temporarily and you run the page, you will see the reason for the difference. The encodeForHTML function returns additional encodings, as
    ,
    and so on.

    One way to solve the problem is to use the canonicalize function, for example,

    With EncodeForHTML:

    #canonicalize(encodeForHTML(f),false,false)#

    With HTMLEditFormat:

    #HTMLEditFormat(f)#

  • InDesign CS4 works every time when you export to PDF

    I have CS4 for several years with absolutely no problem. I create the occasional newsletter - lengths ranging from 3 to 12 pages. I created one in September without problem. Last month, when exporting to PDF, I kept getting a message "Adobe InDesign CS4 has stopped working." and something about Windows 7 looking for a solution (which of course didn't). My only modification in Adobe between when it worked and where he didn't was 1) I upgraded to Adobe PS and LR CC.  (2) I also did an upgrade to Adobe Acrobat (I think she was using now... sort of a core component to acrobat.com saw a message indicating an update was available and did not know he would start using some cloud services).

    -temporarily work around the problem of the last month, I sent my InDesign document (small - page 3) and images to a friend who created the PDF file for me with no problems.

    Now, I'm working on another ballot (which does exactly the same way) so seriously try to correct the problem. I took my search suggestions and forum-based measures:

    -J' uninstalled and reinstalled InDesign

    -I got rid of the implementation level Acrobat and uninstalled and reinstalled Acrobat 9 of my suite CS4

    -J' deleted my preferences files so that they would be replaced by the default system (by a suggestion of the forum)

    -J' tried to export a page at a time to see if there is a problem with a specific element on a page - nothing exported successfully, not one page in my 12 page document

    -To meet my deadline of my last newsletter (12 page), I decided to package it for someone else to export to PDF. The package failed with the error message

    -J' read that there are sometimes mistakes with lack of enough temporary storage to create PDF files. The AdobeTemp file is located on a drive with several GB of free space. However, since the package have also failed, I wonder if the problem is in this area.

    Would appreciate any assistance to resolve it. I just don't know what else to try. Thank you

    It isn't a certainty with Windows error reports, but it seems to be of type text/partner, and a secondary-pair or damaged police could be the problem. Fonts free fonts sites are often below standards.

    I'll sign off the coast for today.

  • 6 inDesign crashes when you export a PDF file

    I get the same report of crash for days, every time I try to export a PDF in InDesign CS6. I don't know what is happening with this particular file, but can I export other files without problem. I have deleted all links .indd and .ai and does not use the new fonts that won't export in other files. I tried to export single pages and the whole document, in different resolutions, and it crashes every time. I stuck my last report of accident here: INDESIGN 6 CRASH REPORT - Pastebin.com

    Export the file to IDML and open that.

    Note also that you must patch InDesign (help > updates) and CS6 is not taken in charge at 10.11.

  • Gradient of disappearing from InDesign CS4 when you export to PDF

    My first question ever on this forum, so I'll try to follow the proper protocol.

    I use Indesign CS4 in a windows environment.  Have a simple file I am trying to export to PDF and have done so many times before without problem.

    But now I get the gradient of the image itself endangered since the exported PDF file.  I don't know what settings I would have changed to cause the problem and it never arose before.  Here's what I see in ID prior to shipping and the result exported.  Using the base for a 1.8 PDF export settings.  Original image is in CMYK mode and has a blue rectangle CMYK sitting on the bottom with a gradient of 90 degrees from the top base.

    gradient1.jpggradient2.jpg

    The strange part is that the original image has no gradient or a feather in it, just a solid color image.  So it exports the gradient of the blue rectangle to create a fade, there simply is not blue.

    So confused.

    Peter, thanks for the suggestions, while they do not resolve the problem, it leads me to THE problem.

    Export, it was never actually produce a problem with gradients or anything else besides.  The problem was inside MY acrobat.  I have on a previous project, has enabled the internal option to replace the colors in the document with the contrast color highand didn't realize that I didn't stop him.

    AY dios mio.

    Thanks to all that you guys, stellar community!  You are in the State of Washington to the Southwest, swing, Starbucks is on me. =)

  • Color separation when you export a PDF file

    She was driving me crazy, ADOBE seems to have forgotten to separate colors when using export to PDF method.  Even quark has this option.

    In any case, I expect to know if there is a way that I don't know.

    See you soon

    On behalf of Adobe...

    Adobe applications, including InDesign, Illustrator and Photoshop intentionally omitted the ability to initiate a previously separated PDF workflow. Even if we could hack together previously separated PDF format by producing PDF via PostScript distillation (another stream of work that strongly discourage us at Adobe), the concept behind modern PDF of publication workflows must leave content in its final form at the highest level of abstraction until it must be made, if this rendering is on the screen (a device intrinsically RGB) 4 dye Printing CMYK, or high-fidelity print using traditional CMYK dyes and other coloring such as bright green and orange or light cyan and light magenta as well.

    Once you separate the PDF, you can't really see the PDF for normal playback, you can not easily search or edit, and you cannot change the target printing condition. You can also not dynamic transparency in a previously separate PDF file! And modern native PDF RIPs do not work with these workflow! No ISO PDF / X standard supports these workflows either!

    You want or need to preview separations? Use the preview feature separation of Acrobat (or even the creation of applications).

    If you work with a Luddite printing service provider that requires this PDF files or creates internally, you really need to consider very seriously the other print service providers.

    -Dov

  • Subsampling selective when you export to PDF?

    Hello

    I have a booklet with a number of photos in there. When I export a work in PDF format to create a version ready to print normally, I would just put it to downsample images to 300 dpi, but in this case some of the photos are technical drawings with text and fine lines that I prefer to keep a more - even up to 1200 dpi if possible (the designs are large enough to offer this quality).

    So, is there a way of marking of images isolated in InDesign, such that they will be not sous-echantillonnees on export in PDF format?

    See you soon,.

    MP

    Has no way to tag individual images to not be downsampled when using PDF presets.

    Control sampling yourself doing it in Photoshop (you can use Actions or imaging). Then when export just choose not to downsample and create a custom PDF preset.

  • InDesign CS6 just started breaking when you export to PDF - help?

    I just got Indesign CS6 a few weeks ago and I use it on a new macbook pro. I had exported in pdf format a few times without any problem. Today, I tried the same thing and Indesign began to quit smoking without apparent reason. I tried to restart my computer. Any suggestions?

    It could be a damaged object (image, PDF, etc.) in the InDesign file. Try an old technique: export 1-6 out as PDF pages and see if it crashes. If it's OK, export pages 7-12, and it crashes. Now, you know, the problem is in pages 7-12. Export pages 7 to 9, then see if broken, etc. until you find the page where the problem is. On this page, begin to remove objects and see what object it is.

  • InDesign, merging the pages when you export to PDF

    Hello

    I'm sure I tried all the export options when exporting to PDF of my InDesign document, but for some reason, the pages keep merging (2 pages of singles coming out like one).

    Here is the screenshot of the result:

    SS.jpg

    And here's what I have in InDesign:

    SS2.jpg

    As you can see, they are certainly different pages. I tried simple, single page continuous... etc.

    Someone has an idea?

    Kind regards

    Mario

    You export to interactive PDF, aren't you?

    By default than exports is spreading, and there is nowhere in the dialog box change - must be performed by the script. Interactive PDF from InDesign CS5 has always Spreads on | InDesignSecrets

    If you do not need the interactivity in the PDF file, export to PDF (Print).

Maybe you are looking for

  • Duration of the impulse in labview FPGA

    Dear can help build a FPGA lv to measure the duration of the pulse My first lv VI is illustrated below for Spartan 3rd kit the but its fail to work Michel thei change operate? for the case of structure in case of false the old value is moved instead

  • should I use a registry cleaner or that I hear about registry cleaners do not to use a registry cleaner.

    I heard that registry cleaners are not the best thing to use.  If they are safe to use and what is the best cleaner to use approved microsoft registry

  • DVD playback, no sound

    Try to play a dvd (made in 2005) on Vista Windows Media Player.  I get a full navigation of the menus, the video playback is awesome, but I have no sound whatsoever.  The sounds of Windows are thin, speakers and headphones work fine, tested with musi

  • How can I replace the opened in the Mail application Menu item?

    Hi all - I want to provide my users through the queue of mail message. I receive a message formatted and I know I can add a customized via menu item repository.addMenuItem (MENUITEM_MESSAGE_LIST, MyCustomMenuItem);but it still requires the user selec

  • BlackBerry smartphones two question about Blackberry Tablet

    Hello, friends of the forum I want to know what system in the blackberry play book? Windows? or Android? or what? And how many languages supported? How about right to left languages? If it's windows system, can we install other languages, fonts? Than