This content has been marked as final.
Show 5 replies
-
1. Re: Using PDPageStmGetToken - is it possible to get \r and space delimiters?
(Aandi_Inston) Sep 9, 2008 4:03 AM (in response to andrejusc)No, that's the point of a tokeniser, it only returns the actual tokens
and not the white space of no semantic value.
However, there should be no problem in reconstructing - you don't need
to put back the original white space, just be sure to follow the rules
of PDF (around inline images is the main time it will be exacting).
Aandi Inston -
2. Re: Using PDPageStmGetToken - is it possible to get \r and space delimiters?
andrejusc Sep 9, 2008 4:23 AM (in response to andrejusc)I see. Yes, I could probably put just Space (hex 20) in most cases as delimiter.
Now, when I have new stream constructed from original's modification and through in-memory buffer - how would I set it back/attach to my PDEContent, which was costructed via PDEContentToCosObj and container's content? What dictionary key should I use? -
3. Re: Using PDPageStmGetToken - is it possible to get \r and space delimiters?
(Aandi_Inston) Sep 9, 2008 7:59 AM (in response to andrejusc)Why would you be using PDEContent and PDPageStmGetToken at the same
time? They seem mutually incompatible (at least if you are going to be
editing).
Aandi Inston -
4. Re: Using PDPageStmGetToken - is it possible to get \r and space delimiters?
andrejusc Sep 9, 2008 10:59 AM (in response to andrejusc)Ok, if I do this (cStmObj is of type CosStream, initially obtained from page contents via CosDictGet):
CosDictPut(pageObj, ASAtomFromString("Contents"), cStmObj);
do I need then call this:
PDPageAddCosContents(newPdPage, pageObj);
to update that newly created page? While I could see that this returns me my modified stream content:
CosObj contentObj2 = CosDictGet(pageObj, ASAtomFromString("Contents"));
After saving whole document in Acrobat - I still see the old data in it. Am I doing anything wrong here? As you could see - this time I'm not messing between PDE and PD, but still can't get it working. -
5. Re: Using PDPageStmGetToken - is it possible to get \r and space delimiters?
(Aandi_Inston) Sep 9, 2008 10:59 AM (in response to andrejusc)I recommend you use only PDPageAddCosContents. It sometimes isn't
enough to change things in a PDF, sometimes you also have to tell
Acrobat that it has changed.
PDPageAddCosContents does that.
Aandi Inston
