Skip to main content
heresha93876846
Inspiring
October 28, 2016
Question

My javascript doesnt work on big files

  • October 28, 2016
  • 7 replies
  • 1035 views

I have a very basic javascript that asks for a pagenumber and a name. Then it extracts that pagenumber from the document and names it. It works fine on small documents but when I use it on big document (12mb) it doesnt work.

var page = app.response("which page do u want to extract?")

var name = "../" + app.response("what do u want to name it to?") + ".pdf"

this.extractPages(page-1,page-1,name)

This topic has been closed for replies.

7 replies

heresha93876846
Inspiring
October 28, 2016

Like this:

I get some files from my client (invoices 1-10000) and they are split in 10 files.

I combine the files in acrobat dc 2015 Release Continous version 2015.020.20039.

If I run the javascript now, it works (but I cant print it becoz of font errors).

I save it as pdf x4 standard. Now the javasceript doesnt work if I run it.

try67
Community Expert
Community Expert
October 28, 2016

It sounds like the file is corrupt.

Also, I don't know what you mean by " pdf x4 standard"...

On Oct 28, 2016 12:21 PM, "heresha93876846" <forums_noreply@adobe.com>

Legend
October 28, 2016

PDF/X-4 files are not protected against extraction. However, JavaScript is forbidden inside PDF/X files. There may be a connection; but I'm assuming you are running it from outside. Is there any message in the console?

heresha93876846
Inspiring
October 28, 2016

It works before I save it as PDF X4

try67
Community Expert
Community Expert
October 28, 2016

Is the file secured? Digitally signed? Also, from where are you running this code, and what application (including exact version) are you using?

try67
Community Expert
Community Expert
October 28, 2016

What does "doesn't work" mean, exactly? What happens when you run it on a large file?

heresha93876846
Inspiring
October 28, 2016

It just doesnt do anything. No file is created.