Hi, I found that
DoVerb("Documents[#id]","InsertPages",NULL,NULL,PXCVA_NoUI);
returns always S_OK, even if the source file (set via "Operations.InsertPages.File") is invalid or does not exists.
Could you please check this?
InsertPages operation
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: InsertPages operation
Hi anovy,
This problem will be fixed in next build. Thanks for info.
This problem will be fixed in next build. Thanks for info.
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: InsertPages operation
For your information more my findings:
- If the source (inserted) file has not 'page extract permission', then InsertPages also incorrectly returns S_OK (although correctly no page is inserted).
- If the target document has not 'change permission', then InsertPages returns correct value (corresponding error string "No permission for current action").
- If the source (inserted) file has not 'page extract permission', then InsertPages also incorrectly returns S_OK (although correctly no page is inserted).
- If the target document has not 'change permission', then InsertPages returns correct value (corresponding error string "No permission for current action").
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: InsertPages operation
And one more question:
What permisson must have the source PDF file for InsertPages? I thought that this must be 'page extraction', but now I see that probably 'content copying'?
What permisson must have the source PDF file for InsertPages? I thought that this must be 'page extraction', but now I see that probably 'content copying'?
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: InsertPages operation
On checking - there is a bug here - you should only require allow 'Document Assembly' to insert pages but currently we require full editing, we will correct this in build 53 (too late for 52 I am afraid).
Though note to delete pages - full editing rights are always required.
Though note to delete pages - full editing rights are always required.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: InsertPages operation
Thanks, but I asked for the permissons of the source file. So what permissions must have the source PDF file from which the pages are taken.
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: InsertPages operation
Hi anovy.
Also you may check destination PDF for pages inserting by:
Sorry, but the "IsOperationGranted" operation is still undocumented in the latest release - see the updated help file in the attachment, [Reference/NamedItems/Documents/Item/Menthods/IsOperationGranted] section.
Best
Regards.
You are right and you may check it by:What permission must have the source PDF file for InsertPages? I thought that this must be 'page extraction', but now I see that probably 'content copying'?
Code: Select all
DoDocumentVerb(srcDocID, NULL, "IsOperationGranted", dataIn(2,5), dataOut, 0);
canExtractPages = (dataOut != 0);
Code: Select all
DoDocumentVerb(srcDocID, NULL, "IsOperationGranted", dataIn(2,16), dataOut, 0);
canInsertPages = (dataOut != 0);
Best
Regards.
You do not have the required permissions to view the files attached to this post.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: InsertPages operation
Thanks Vasyl, but the source file is not opened in viewer, so this check (via docid) is not useful.
However it will be enough for me if the InsertPages operation will return a correct handle with corresponding error string from GetTextFromResult.
However it will be enough for me if the InsertPages operation will return a correct handle with corresponding error string from GetTextFromResult.
-
- User
- Posts: 164
- Joined: Mon Feb 08, 2010 8:48 am
Re: InsertPages operation
One more question:
It is VARIANT with SAFEARRAY?dataIn(2,5),
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: InsertPages operation
Yes. You may use our IPDFXCargs interface to read/write the SAFEARRAY structure.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.