-
1. Re: About the validity of CosObj after PDDoc save
lrosenth Jun 18, 2009 2:05 PM (in response to ChromeUser)CosObjs should NOT be used across ANY save...
-
2. Re: About the validity of CosObj after PDDoc save
ChromeUser Jun 18, 2009 7:00 PM (in response to lrosenth)OK.
If there is a CosObj in an CosArray and i reomved it from array then save PDDoc with increment.
This removed CosObj may be have a big size(more than 20MB).
After save i want to add this CosObj to the same CosArray,so is there any method to avoid create a new CosObj to add to this CosArray?
For create a new CosObj will increase the file size and i have to save the doc with increment.
I think i can remember the removed CosObj ID and use ASFileWrite method to write the ID back to array and then call PDDoc open PDF file.
Message was edited by: ChromeUser
-
3. Re: About the validity of CosObj after PDDoc save
lrosenth Jun 18, 2009 10:00 PM (in response to ChromeUser)You are removing the CosObj from an Array and then saving the changes incrementally. That means that the object is still in the PDF but "unattached" to anything (I am assuming) so it is now marked as free in the xref.
BUT then you want to reattach it back to the same array? Are you going to save again? Don't understand the workflow involved....
-
4. Re: About the validity of CosObj after PDDoc save
ChromeUser Jun 18, 2009 10:33 PM (in response to lrosenth)lrosenth wrote:
You are removing the CosObj from an Array and then saving the changes incrementally. That means that the object is still in the PDF but "unattached" to anything (I am assuming) so it is now marked as free in the xref.
BUT then you want to reattach it back to the same array? Are you going to save again? Don't understand the workflow involved....
Yes, you are right. I want to reattach it back to the same array.Only one precondition:not want to create a new CosObj.
After that, save again.
-
5. Re: About the validity of CosObj after PDDoc save
lrosenth Jun 18, 2009 11:16 PM (in response to ChromeUser)What is the point of detaching, saving, then reattaching? What are you trying to accomplish this way?
-
6. Re: About the validity of CosObj after PDDoc save
ChromeUser Jun 18, 2009 11:48 PM (in response to lrosenth)detaching : just the user may be do that,not decided by me.
saving : after saving i can make a sig for the whole file.
reattaching : if there is an exception during signaturing, i want to recover the file.
In short, user may be want to delete some contents and sig the file(before the sig the file is saved) and if signature is wrong then recover to the original file.
-
7. Re: About the validity of CosObj after PDDoc save
lrosenth Jun 19, 2009 2:33 AM (in response to ChromeUser)How will you know what object(s) are being deleted? I think you'd be better off doing something like copying the PDF in its entirety on open and then be able to restore it on the failed signature. Much cleaner.
-
8. Re: About the validity of CosObj after PDDoc save
ChromeUser Jun 19, 2009 2:57 AM (in response to lrosenth)I have the same idea at first and implment it.
But may be I used the wrong method caused opening backup file error.
I using ASFileWrite to write the backup file to the current document.but it seems that need reopen AVDoc to refresh document.
So i close avdoc and reopen avdoc,
If there is only one document opened it's OK, but if opened more than one document it will cause an exception.
what do you think about reopen AVDoc?
-
9. Re: About the validity of CosObj after PDDoc save
lrosenth Jun 19, 2009 9:06 AM (in response to ChromeUser)I think you need to do some research on general implementations of file swapping - as there are techniques for doing this that I think you are missing (and have nothing to do with Acrobat).
Also, at this level, perhaps you should consider submitting a support request?


