Create hyperlinks with script, without increase of large size and treatment of the BP reqs resulting?

Quick Summary: I have a script as part of a process involving a lengthy document of data merge base that creates hyperlinks by using doc.hyperlinkURLDestinations.add (). The script is simply extracted from text into clickable hyperlinks.

The problem is, the final PDF files that emerge from this process are 300% the size of a PDF file without the running script and are very slow to deal with. Most of that extra weight from an increase of 740 000% crazy (!) in the amount of data used for "info-Structure" (and that's after you run the version with hyperlinks through the Acrobat PDF Optimizer).

The amount of the data structure in the PDF files with hyperlinks ends up being more than twice the size of the entire file PDF files without hyperlinks added. There is also a substantial increase in the size of the "the cross reference Table.

This sharp increase in weight becomes a quick and simple process which takes a few minutes in a slow winding which takes hours, to the creation of files with a very slow pace inflated in a process that is prone to crashing and not.

I hope for another way to create hyperlinks that adds all this weight.

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

Details: Here is my current process. It works fine except step 2 causes the final size of the PDF file and the time required for the execution of other processes to increase massively. I know there are different ways to implement hyperlinks in a PDF document - I hope that there is a different approach, that I can use to step 2 which avoids this massive expansion.

The goal is to create 600 2 PDF pages from an indesign template using the fusion of data, with each PDF with a file name that reflects reviews and live hyperlinks which vary from one record to the next. Here is my current process (for analysis comparative, the machine is a Mac Pro, Lion, CS6, with RAM 6gbs, and all files are on a disk HARD space, no transfer of data on all networks):

  1. Implement an INDD 2 pages with placeholders for merging data and spreadsheet.
  2. Create merged INDD, import hypertext links and other content as text, then run this script in InDesign that makes hyperlinks using live doc.hyperlinkURLDestinations.add ()
  3. Export a PDF to 1 200 PDF page - file > export if step 2 was made, or the merger of data tool if it wasn't.
    • Without step 2: the PDF file is about 110mbs and takes a few minutes to create.
    • Step 2: the PDF file is about 170mbs and takes over an hour and a half to create - I do not know exactly how long I ended up leaving running from one day to the next, but he had already run 1: 20 p.m. when I left and doesn't look close to finishing.
  4. Run this script in Acrobat to chop the PDF into segments of 2 pages with names based on worksheet data.
    • Without step 2: the process takes about quarter of an hour, slightly faster than a secondcreation of PDF files, and PDF files are 700kbs.
    • Step 2: the process crashes after about 10 PDF files and takes minutes to produce each one. Even if it did not freeze, it should be about 25 hours to do all of them.
    • In step 2 and then reducing the PDF to 45mbs through optimizer PDF Acrobat and 'save in reduced format' to cut, backward, compatibility, the process takes about 4 hours, producing a PDF every 20-30 seconds, and PDF files are around 3 MB each. Through to watch the process, almost all of the extra time taken comes from step "backup PDF... "for each of them.

Each PDF 2 pages has 14 or 15 of the hyperlinks. I do not understand how the 14 and 15 of the hyperlinks can translate into an additional 2mbs of "" and something like the processing time of more than 3500% to create each PDF file.

Can someone suggest modifications to the script in step three, which could avoid all this overhead? Here's the complete script for convenience:

app.findGrepPreferences = app.changeGrepPreferences = null;

var doc = app.activeDocument;

app.findGrepPreferences.findWhat = '(http://.*$|https://.*$)';

var objs = doc.findGrep();

 

for (var i = 0; i < objs.length; i++) {

    var currTarget  = objs[i];

    var lnkDest = doc.hyperlinkURLDestinations.add(currTarget.texts[0].contents);

    var lnkSrc = doc.hyperlinkTextSources.add(currTarget);

    var lnk = doc.hyperlinks.add(lnkSrc, lnkDest);

}

alert('Processed '+objs.length+' hyperlinks');

Edit - Here is a side-by-side comparison of the "Use of space Audit" tool optimizer based on CSSTidy Acrobat PDF, showing where the hyperlinks add volume. I scored two sharp increases in red...

acrobat-audit.png

.. .so there is a massive increase going crazy in the size of the info "Structure", a tiny mbs 0.000238 to 1.76 MB - two and a half times the size of the original file, just on 'info Structure. It's a 740 000% increase...

There is also a strong increase in fat in the cross reference table, 0,0046 mbs to 0.427 mbs - table of cross-references in the PDF with hyperlinks is more than half the size of the original file.

The only differences between two files PDF's, we have 14 clickable hyperlinks attached to existing excerpts of the text (the "hyperlinks" are from a PDF file that comes with living aggressive optimization PDF and images are so much smaller).

So it turns out the source of the problem was the document tags.

Make sure that the PDF file is not created as a PDF by InDesign Tagged, and it behaves. I don't know what is it about hyperlinks and marking that makes it swell massively, but it does.

Tags: InDesign

Similar Questions

Maybe you are looking for

  • Burning a CD of songs to convert, but not actually burn to CD.

    I've tried about 7 different times burn a CD and whenever it says to check the CD for damage or change of manufactures of the blank CD I've done both and none of them does not seem to work. I also tried to change the speed of writing to see if it wor

  • w540 does not detect DVD drive

    W540 does not detect the CD / DVD drive and because it takes a long time to start. I know that I can put the hard drive to boot first, but now I want to install windows 7 and it does not start.I have already installed the latest version of the BIOS b

  • HP Pavillion G6 - no boot device - can anyone help?

    Hello Can anyone help? Computer, kept the gel that I did and F11 factory restore, but now when I turn on my laptop I have a black and a gray screen saying: File: \Windows\system32\config\system Situation: 0xc0000225 And whey I try to enter the F11 re

  • PowerEdge 2950 [MS]

    Buongiorno, avrei di preventivo need by: n. 01HARD DRIVE, 300G, SERIAL ATTACHED SCSI, 3, 10K, 3.5 " Server provider of it disco deve essere sostituito nella: Server: DELL PowerEdge 2950 Service etiquette: JH7FH2J Grazie Giovanni

  • where can I get drivers updated for Pavilion dv6000 laptop?

    Pavilion dv6000 notebook PC 3 or 4 years.  Windows XP 5.1 with Explorer 7. HP site said they have no drivers for my laptop product # RG38OUA