|
-
Nov 20th, 2007, 04:23 PM
#1
Thread Starter
Fanatic Member
VB6 - Count pages in a multipage .tif file or .pdf (no dependencies).
Just a quick and dirty routine I wrote for my current project instead of paying for someone else's .dll. This is so easy to do it should be a crime to charge for it, so I thought I would post it here. Technically, there are some changes that should be made (but in practice I haven't run into a problem). There is a flag in the header that determines whether the data is big or little-endian, I haven't found a tif yet that isn't little-endian. If you need to read the flags, there is a link to the tif specification in the comments. It obviously needs error handling and input validation as well. Finally, I'm sure there is a more elegant way to build longs and ints from an array of bytes, but LSet works fine for me.
Enjoy.
Last edited by Comintern; Nov 25th, 2007 at 04:03 PM.
Reason: Change attachment
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|