Filesize Taglib Examples

The <dotj:filesize> tag can be used to display the size of a file on disk.
The value displayed can be either in bytes, kilobytes, or megabytes.


In this first set of examples, we just display the filesize of a file in each of the three units.

Filename: /home/dotj1/domains/dotjonline.com/public_html/doc/dotj.pdf

Example 1 - File size: 918909.0 Bytes.
Example 2 - File size: 897.3721 Kilobytes.
Example 3 - File size: 0.8763399 Megabytes.


In this second set of examples, we pretty up the results using the <dotj:number> tag.

Filename: /home/dotj1/domains/dotjonline.com/public_html/doc/dotj.pdf

Example 4 - File size: 918,909 Bytes.
Example 5 - File size: 897 KB.
Example 6 - File size: 0.9 MB.


In this third set of examples, we point the tags to files within our web application by using the page attribute.

Page: /doc/dotj.pdf

Example 7 - Page size: 918909.0 Bytes.
Example 8 - Page size: 897.3721 Kilobytes.
Example 9 - Page size: 0.8763399 Megabytes.


          Back to Samples page


home : products : pricing : company : contact us : samples : download : forums : customers

Copyright © 2000-2004 dotJ Software Inc. All rights reserved.