http://www.xyplorer.com/xyfc/viewtopic. ... 14#p106014


Code: Select all
00000000: 54 69 74 6C 65 3A 20 20 20 20 20 20 20 20 20 20 Title:
00000010: 52 65 76 69 65 77 4F 66 4D 61 70 6C 65 31 38 2E ReviewOfMaple18.
00000020: 6E 62 0D 0A 43 72 65 61 74 6F 72 3A 20 20 20 20 nb..Creator:
00000030: 20 20 20 20 4D 61 74 68 65 6D 61 74 69 63 61 0D Mathematica.
00000040: 0A 50 72 6F 64 75 63 65 72 3A 20 20 20 20 20 20 .Producer:
00000050: 20 4D 61 74 68 65 6D 61 74 69 63 61 20 50 44 46 Mathematica PDF
00000060: 20 45 78 70 6F 72 74 0D 0A 43 72 65 61 74 69 6F Export..Creatio
00000070: 6E 44 61 74 65 3A 20 20 20 30 33 2F 32 36 2F 31 nDate: 03/26/1
00000080: 34 20 31 32 3A 31 30 3A 31 37 0D 0A 4D 6F 64 44 4 12:10:17..ModD
00000090: 61 74 65 3A 20 20 20 20 20 20 20 20 30 33 2F 32 ate: 03/2
000000a0: 36 2F 31 34 20 31 32 3A 31 30 3A 31 37 0D 0A 54 6/14 12:10:17..T
000000b0: 61 67 67 65 64 3A 20 20 20 20 20 20 20 20 20 6E agged: n
000000c0: 6F 0D 0A 46 6F 72 6D 3A 20 20 20 20 20 20 20 20 o..Form:
000000d0: 20 20 20 6E 6F 6E 65 0D 0A 50 61 67 65 73 3A 20 none..Pages:
000000e0: 20 20 20 20 20 20 20 20 20 34 0D 0A 45 6E 63 72 4..Encr
000000f0: 79 70 74 65 64 3A 20 20 20 20 20 20 6E 6F 0D 0A ypted: no..
00000100: 50 61 67 65 20 73 69 7A 65 3A 20 20 20 20 20 20 Page size:
00000110: 36 31 32 20 78 20 37 39 32 20 70 74 73 20 28 6C 612 x 792 pts (l
00000120: 65 74 74 65 72 29 20 28 72 6F 74 61 74 65 64 20 etter) (rotated
00000130: 30 20 64 65 67 72 65 65 73 29 0D 0A 46 69 6C 65 0 degrees)..File
00000140: 20 73 69 7A 65 3A 20 20 20 20 20 20 31 35 37 31 size: 1571
00000150: 38 31 36 20 62 79 74 65 73 0D 0A 4F 70 74 69 6D 816 bytes..Optim
00000160: 69 7A 65 64 3A 20 20 20 20 20 20 6E 6F 0D 0A 50 ized: no..P
00000170: 44 46 20 76 65 72 73 69 6F 6E 3A 20 20 20 20 31 DF version: 1
00000180: 2E 34 0D 0A .4..
Code: Select all
$output = runret("cmd /c D:\Xpdf\pdfinfo.exe ""<cc_item>""");
$a = strpos($output, "Pages:");
$b = strpos($output, "Encrypted:");
$len = $b - $a - 2; // get rid of trailing crlf
$pages = substr($output, $a, $len);
$count = gettoken($pages, 2, ":", t);
return $count;
You should hexdump the contents of that $count variable then.Huidong wrote:EDIT
The hexdump shown above is the entire output of pdfinfo.exe. But the return value of my CC script is just a single number. No formatting chars I believe.
Code: Select all
00000000: 34 4
