1
Tips and Tricks / Document size on disk i AFP format
« on: January 25, 2022, 06:24:14 AM »
Hello,
I am having problems with calculating the average size of the documents stored in OnDemand folders and application groups. I have been manually trying to match different sizes in the tables to match it to the actual size of the AFP file when written to disk outside of OnDemand.
We are working to convert our documents from AFP to PDF-A/2b and want an accurate way to estimate the time needed to do this. We are fetching the documents from OnDemand and writing them to disk in the AFP format, then we convert them using the AFP2PDF converter and finaly store them in a new storage.
I have been looking at the DOC_LEN in the tables named from the application group name (ARSAG, AGID_NAME) and combining that with the DECOMP_SIZE of the correlating resource from ARSRES table... for the most part it seems to give me the correct size of the file but when the resource DECOMP_SIZE is null the numbers are off. Examples below.
If i have a file with DOC_LEN of 2000 and that has a RESOURCE with a DECOMP_SIZE of 4000 the document size on disk will be 6000b
But if I have a file with DOC_LEN of 2000 and a RESOURCE with a DECOMP_SIZE of '-' the document size is not the expected 2000 but often much bigger even tho there is no DECOMP_SIZE.
Am i way off in what i try to do? Is there a better way to calculate the expected number of bytes a document will have once it is written to disk?
Kind regards
Johan Dahlgren
I am having problems with calculating the average size of the documents stored in OnDemand folders and application groups. I have been manually trying to match different sizes in the tables to match it to the actual size of the AFP file when written to disk outside of OnDemand.
We are working to convert our documents from AFP to PDF-A/2b and want an accurate way to estimate the time needed to do this. We are fetching the documents from OnDemand and writing them to disk in the AFP format, then we convert them using the AFP2PDF converter and finaly store them in a new storage.
I have been looking at the DOC_LEN in the tables named from the application group name (ARSAG, AGID_NAME) and combining that with the DECOMP_SIZE of the correlating resource from ARSRES table... for the most part it seems to give me the correct size of the file but when the resource DECOMP_SIZE is null the numbers are off. Examples below.
If i have a file with DOC_LEN of 2000 and that has a RESOURCE with a DECOMP_SIZE of 4000 the document size on disk will be 6000b
But if I have a file with DOC_LEN of 2000 and a RESOURCE with a DECOMP_SIZE of '-' the document size is not the expected 2000 but often much bigger even tho there is no DECOMP_SIZE.
Am i way off in what i try to do? Is there a better way to calculate the expected number of bytes a document will have once it is written to disk?
Kind regards
Johan Dahlgren