Forum rules DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
I am using the croppage tool to crop a page and my code below. This code works, but since upgrading to 354 it crops the area, but does not remove every element on the page outside of the cropbox region (see images below, showing this in the FullDemo project). Any help would really appreciated, even a work around if it's an issue in the build?
Dim nID As Integer = Me.docPreview.Inst.Str2ID("op.document.cropPages", False)
Dim Op As PDFXEdit.IOperation = Me.docPreview.Inst.CreateOp(nID)
Dim input As PDFXEdit.ICabNode = Op.Params.Root("Input")
input.v = Me.docPreview.Doc.CoreDoc
Dim options As PDFXEdit.ICabNode = Op.Params.Root("Options")
options("Flags").v = 514
options("IsOffset").v = False
options("CropBox.top").v = top
options("CropBox.left").v = left
options("CropBox.right").v = right
options("CropBox.bottom").v = bottom
Op.Do()
As you can see below it crops the area OK and looks like it has done it properly.
However if you resize the paper size you can see there are lots of elements from the original document that have not been removed.
Just tried your code - everything worked correctly on the latest version (showing you a Crop Pages dialog to see the results):
Also, here's the same result with comments on the page:
Probably the behavior that you are experiencing is due to that we have added some new flags (and the things that you see on the page are the comments) - updated the Wiki Page: https://sdkhelp.pdf-xchange.com/vi ... ions_Table
Thanks for the file - found the problem.
The items that you are seeing overlap with the crop area rectangle, thus they are left - that is OK. But what is wrong here is that the clip rectangle is not being applied correctly - thus you can see those leftovers. I will forward this to the responsible developer.
Glad that you can reproduce the error as that is normally half the battle when developing products, as we all know.
This is quite urgent from my side as the crop tool is used a lot in my product, so if your developer has some code as a work around until incorporated into your next release then I would be happy with that. As you can see from my supplied code I already have the cropbox region info.
Thanks for the update Alex, however I would imagine it will be weeks for an update, which is understandable.
As I said previously is there a way using current API features that I could remove elements outside the crop region as a temporary fix. Even if it means looping through pdf elements and comparing if the position is within the crop box bounds?