Skip to main content
Inspiring
March 4, 2011
Answered

[js-CS4] how to know a PDF filesize

  • March 4, 2011
  • 1 reply
  • 718 views

Hi all !

I export a PDF document and I want to know the file size of the generated document.

How can I do?

thanks

Ivan

This topic has been closed for replies.
Correct answer Loic.Aigon

Well obviously I was wrong :

As Marijan just told me :

File.length  
Data Type: number
Core JavaScript Classes
The size of the file in bytes.
Can be set only for a file that is not open, in which case it truncates or pads the file with 0-bytes to the new length.

Loic

1 reply

Loic.Aigon
Legend
March 4, 2011

Unless I am wrong, there isn't size property for a File object in the ExtendScript DOM :S

You may call applescript/VB to the rescue maybe

Loic

Loic.Aigon
Loic.AigonCorrect answer
Legend
March 4, 2011

Well obviously I was wrong :

As Marijan just told me :

File.length  
Data Type: number
Core JavaScript Classes
The size of the file in bytes.
Can be set only for a file that is not open, in which case it truncates or pads the file with 0-bytes to the new length.

Loic

fivanAuthor
Inspiring
March 4, 2011

The answer was under my eyes.

Thank you Loic!