Quantcast
Channel: Adobe Community : All Content - Acrobat SDK
Viewing all articles
Browse latest Browse all 2571

PDF traversal

$
0
0

as mention in pdf 32000

pdf structure is like below image

pdf stucture.jpg

what is the best solution for traversal this structure?

something like this or not

CosDoc cdoc;

cdoc = PDDocGetCosDoc(myPDDoc2);

 

CosObj cosOBJ=CosDocGetRoot(cdoc);

CosType t = CosObjGetType(cosOBJ);

 

  CosObj obj2= CosDictGet(cosOBJ,ASAtomFromString("Pages"));

  CosObj obj3= CosDictGet(obj2,ASAtomFromString("Kids"));

  CosObj kid1 = CosArrayGet(obj3,0);

  CosObj cosst = CosDictGet(kid1,ASAtomFromString("Contents"));

  CosObj resou = CosDictGet(kid1,ASAtomFromString("Resources"));

  PDEContent pddd=PDEContentCreateFromCosObj(&cosst,&resou);

 

 

  int jjj=PDEContentGetNumElems(pddd);

  for(int i=0;i<jjj;i++)

  {

  PDEElement ele=PDEContentGetElem(pddd,i);

}

 

this elemnt is base of pdf structure or not

is there any function for determine the cos object type (Pages , dictionarys, Kids ,....)?

 

i want to traversal  the pdf structure for create a same pdf file (dont want use copy or any thing like that i want traversal to details then make another copy of pdf ( and maybe do some little changes in contents not structure ))

 

is there any way you can show me ?


Viewing all articles
Browse latest Browse all 2571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>