Professional Web Applications Themes

Converting a PDF to pure black and white - Adobe Acrobat SDK

I'm currently attempting to convert a PDF of any colorspace (RGB, CMYK, Grayscale etc) to black and white. Currently I'm walking the PDF using Adobe PDFLibrary, separating the contained PDEElements and identifying them (Image, text, etc). Does anyone have any advice on how to proceed from here? I figure the actual conversion operation will have to be written from scratch, as Adobe doesn't seem to support this. However, I'm having a hard time determining the colors of each object. I suppose I could rasterize everything and convert pixel by pixel, but I'd like to avoid that and preserve vector images ...

  1. #1

    Default Converting a PDF to pure black and white

    I'm currently attempting to convert a PDF of any colorspace (RGB, CMYK, Grayscale etc) to black and white.

    Currently I'm walking the PDF using Adobe PDFLibrary, separating the contained PDEElements and identifying them (Image, text, etc).

    Does anyone have any advice on how to proceed from here? I figure the actual conversion operation will have to be written from scratch, as Adobe doesn't seem to support this. However, I'm having a hard time determining the colors of each object. I suppose I could rasterize everything and convert pixel by pixel, but I'd like to avoid that and preserve vector images and such if at all possible.

    Thanks in advance for any help!
    someone01@adobeforums.com Guest

  2. #2

    Default Re: Converting a PDF to pure black and white

    How do plan to describe "black" and "white" in the PDF? There is no "monochrome" colorspace - so are you planning on using DeviceGray, Separation Black or something else?

    Once we understand what your final colorspace goal is, then we can point you at solutions.
    Leonard_Rosenthol@adobeforums.com Guest

  3. #3

    Default Re: Converting a PDF to pure black and white

    Yes, I'm aware that there is no monochrome colorspace. However, wouldn't it be possible (likely at a very low level) to fetch and modify the colors of elements manually?

    I suspect the initial thing to do is convert images to the DeviceGray colorspace and work from there, since black and white are easily defined there, if I understand correctly.
    someone01@adobeforums.com Guest

  4. #4

    Default Re: Converting a PDF to pure black and white

    There are a set of APIs that you can access from the PDFLibrary (and plugins) for color conversion of objects. Look at the AC APIs and then various PDDoc, PDPage, PDElement, etc. depending on what you are working with.
    Leonard_Rosenthol@adobeforums.com Guest

  5. #5

    Default Re: Converting a PDF to pure black and white

    You could also define your own DeviceN colorspace with only two color values - white and black. Then using the methods Leonard suggested, convert your doent to this colorspace.
    PDL@adobeforums.com Guest

  6. #6

    Default Re: Converting a PDF to pure black and white

    Thanks guys, appreciate the assistance
    someone01@adobeforums.com Guest

Similar Threads

  1. Black text in PDF converting to CMYK black in InDesign
    By DavidT in forum Adobe Indesign Macintosh
    Replies: 0
    Last Post: September 19th, 02:10 PM
  2. Converting color photos to black and white
    By davidkchan in forum Adobe Photoshop Elements
    Replies: 3
    Last Post: July 24th, 07:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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