Skip to main content
Inspiring
May 15, 2012
Question

Zero KB PDFs

  • May 15, 2012
  • 1 reply
  • 1273 views

I have a script that batch exports PDF's from the different layers in an Indesign file.

I can export the same file 5 times in a row and out of those 5 times, 2 times will result in a handfull of the the PDF's being Zero KB.

There doesn't seem to be any pattern to it. Not the same PDF's are zero KB and not even the same quanity are Zero kb.

Anyone else run into this. I saw a post previously on a different site about someone else's script doing the same thing but with no answer.

Thank you in advance!

This topic has been closed for replies.

1 reply

Inspiring
May 16, 2012

I've run into a couple of problems with pdf export scripts. One is that placed pdf or ai files drop off (on the current export and all subsequent exports during the same script session) if you click on any palettes or the control bar while the script is running. It looks from a quick test like this bug has survived into CS6. I will file it again.

All of my pdf export scripts include a one second delay after each export, and I think I started using that initially to address the problem you're seeing. You might try that. For some reason which is now lost to me, I don't use $.sleep(), but rather a function that looks like this:

function delay(ms) {

  var date = new Date(),

        curDate;

  do {

    curDate = new Date();

  } while (curDate - date < ms);

}

I don't know whether I use that because it worked and $.sleep() didn't, or because I plucked that off the web before I knew $.sleep() existed.

Jeff

pkrkAuthor
Inspiring
May 16, 2012

Thanks.

I tried but no luck.

If I leave the mouse alone it gives me good PDF's so you were correct there. The script is being passed on to others so I will still try to find a solution since the script takes about 5 minutes to run and I'm sure someone will not be able to leave their mouse alone while the script runs.

Inspiring
May 16, 2012

If you find a solution please report back. I tried asynchronous and idleEvent-triggered exports, with no luck. See this thread. There was at least one other post on here from someone with the same problem, though I can't seem to put my hands on it now. If you can reduce the problem to a repeatable scenario, could you also please file the bug with Adobe? I'd love to see this one fixed.