Thursday, July 14, 2005

PDF Pagecount Logic

Well its been long time and i put my developer hats ON. Small code atleast worked for me to solve my current problem. It works and its too fast and VFP again gets 100% credit.

Lparameter tcPdfFileName
lcPdf = Filetostr(tcPdfFileName)
Do Case
Case Left(lcPdf,8) = "%PDF-1.2"
lnPos = At("/Count", lcPdf)
lPageCount=Substr(lcPdf,lnPos+6,10)
lPageCount=Val(lPageCount)
Case Left(lcPdf,8) = "%PDF-1.4" Or Left(lcPdf,8) = "%PDF-1.5"
lPageCount=Occurs('/Page/',lcPdf)
Otherwise
lPageCount=0
Endcase
Return lPageCount

Thursday, July 07, 2005

.Net Return on Complexity (ROC)

A thought rightly conveyed.

http://craigbailey.blogspot.com/2005/07/net-return-on-complexity-roc.html