How could I get a rectangle of a certain size drawn on the program start to crop it later.
What object is it? A crop box?
A rectangle to crop
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 167
- Joined: Wed Jan 18, 2012 11:10 am
A rectangle to crop
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 19883
- Joined: Mon Jan 12, 2009 8:07 am
Re: A rectangle to crop
Hello relapse,
The shot you have attached appears like a regular rectangle that you can add with the respective tool.
If you want to actually crop a page's content and make only portion of it visible - then please check the Document -> Crop Pages options in our Viewer.
Best,
Stefan
The shot you have attached appears like a regular rectangle that you can add with the respective tool.
If you want to actually crop a page's content and make only portion of it visible - then please check the Document -> Crop Pages options in our Viewer.
Best,
Stefan
-
- User
- Posts: 167
- Joined: Wed Jan 18, 2012 11:10 am
Re: A rectangle to crop
OK, I've found the following code in the program which sets some of the rect properties:
But how can I set the size of that rect?
Code: Select all
ctrl.SetProperty("Commenting.Rect.Styles[0].FColor", 0);
ctrl.SetProperty("Commenting.Rect.Styles[0].Opacity", 0.4);
ctrl.SetProperty("Tools.Rect.KeepSelected", false.ToString());
ctrl.SetProperty("Tools.Active", "Rect");
-
- Site Admin
- Posts: 19883
- Joined: Mon Jan 12, 2009 8:07 am
Re: A rectangle to crop
Hello relapse,
I believe it will be much easier if you create the rectangle using JS.
E.g.
For samples how to execute JS in our Viewer AX please refer to the samples provided with the AX.
Best,
Stefan
I believe it will be much easier if you create the rectangle using JS.
E.g.
Code: Select all
var annot = this.addAnnot({
page: 0,
type: "Square",
author: "Your Name",
name: "myStamp",
rect: [200, 200, 350, 350]})
Best,
Stefan