BBox

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

BBox

Post by relapse »

Is it possible to recalculate the values of the BBox for the dialog "CropBox" automatically? Is there any function for that purpose in your SDK? Often the coordinates offered for BBox in that dialog in order to eliminate white space are too "expensive" - they let too much white space around a colored object.


Thanx
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: BBox

Post by Stefan - PDF-XChange »

Hello relapse,

Vasyl has explained here how you can call the remove white margins method:
https://forum.pdf-xchange.com/ ... 36&t=10522
But there aren't any fine tuning tools inside the Viewer SDK - you will need to use the Tools SDK if you want to further force any page dimensions.

Best,
Stefan
Tracker
relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

Re: BBox

Post by relapse »

OK, I think I'll use the command

Code: Select all

            object dummy;
            pdfViewer.DoVerb("", "ExecuteCommand", "RemoveWhiteSpaces", out dummy, 0); // will remove white margins from all pages
If the result won't match the expectations, then - ReDo (which isn't working yet in my program). 8)

Thanx for your link. Actually I looked for that short command, because originally I used the variant with your native crop dialog

Code: Select all

            object data;
            pdfViewer.DoVerb(null, "ExecuteCommand", "CropPages", out data);
It's a nice one but there are too many details (after my fancy). 8)
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: BBox

Post by Stefan - PDF-XChange »

:)