Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Cropping from C#

    Hi

    I'm trying to remove the white margins around all pages on my document via the Acrobat 8.1 SDK and am struggling to workout exactly how to go about it (basically the same functionality if you do Document>Crop Pages>Remove White Margins).

    My code works fine up to the point of cropping, but the document is created via a scanner and I don't know what the cropping rectangle would be. I'm guessing this can be found programmatically using the Media Box, but I have no clue how to do so.

    Any help would be greatly appreciated!
    Tom_Allen@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. Where is the cropping tool?
      Simple, stupid question: Does Acrobat 7 Standard have a cropping tool? Acrobat 4 did. Acrobat 5 did. Do I have to upgrade to Professional just to...
    2. Cropping
      Gary, please review additional comments too. I'm not sure if my thinking is 100% here. If you are downloading images from the web, who knows what...
    3. Cropping!!!!
      Okay, What tool do I use to crop the picture, so that I can get what I want. I have looked everywhere, and what are the procedures for making the...
    4. cropping problems
      Sometimes when cropping an image, the dotted lines fail to keep up with the mouse, but lag behind so that the required rectangle cannot be achieved....
    5. Precise Cropping
      Use Image/Canvas Size and type your requirements numerically
  3. #2

    Default Re: Cropping from C#

    There is no "box" in a PDF that represents the white margins. On a non-scanned PDF it can be figured out by finding the bounds of each actual object and then using some math. On a scan, it's MUCH MORE complex involving some interesting pixel logic.

    You will need to do those things yourself and then set he CropBox via IAC. However IAC doesn't give you access to the objects of the page :(.
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: Cropping from C#

    D'oh, I thought that might be the case.

    I'm going to resist the temptation to send keystrokes to Acrobat just to use the built in function and might look to see if I can find a .Net library to do something for me...

    Thanks for the help :)
    Tom_Allen@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139