Product: PDFNet SDK (C++)
Product Version: 9.2.0
(also relevant to the 9.3.0 / July 5th Windows release)
Please give a brief summary of your issue:
(Think of this as an email subject)
RasterizeSeparations / synthetic channels “All” and “Alpha”
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
I’m using PDFRasterizer::RasterizeSeparations (to accommodate a memory-constrained use case), and notice that the returned collection often include separations named “Alpha” and “All” despite those channels not existing in the PDF (i.e., they are not exposed by Acrobat DC’s ink manager, nor are they present in the set of channels returned from our previous rasterizer library). While the mere presence of those channels isn’t problematic, they seem to appear in indeterminate order. Alpha seems to appear immediately after the CMYK channels, but ‘All’ sometimes appears after ‘Alpha’, and sometimes at the end of the separations collection. Since I can’t guarantee that an actual ink isn’t named ‘Alpha’ or ‘All’, is there a way to 1) exclude those channels during rasterization, or 2) deterministically identify those channels by inspection, or 3) understand the rules for when and where those channels will be included in the returned separations collection so that I can heuristically exclude them?
Please provide a link to a minimal sample where the issue is reproducible:
I’ve encountered this with a number of documents using code equivalent to the following (apart from applying a scale factor to shrink the image for thumbnailing). I can provide a sample PDF upon request, but am unable to attach either PDF or ZIP files to this post.
pdftron::PDFNet::Initialize(key.c_str()); PDFDoc separation_doc(filename); PDFRasterizer pdftronRasterizer; pdftronRasterizer.SetImageSmoothing(false, false); pdftronRasterizer.SetOverprint(PDFRasterizer::e_op_on); pdftronRasterizer.SetAntiAliasing(false); pdftronRasterizer.SetDrawAnnotations(false); pdftronRasterizer.SetPathHinting(false); pdftronRasterizer.SetPrintMode(true); pdftronRasterizer.SetThinLineAdjustment(false, true); pdftronRasterizer.SetCaching(false); Page pg = separation_doc.GetPage(1); const auto kDefaultPageBox = Page::e_crop; Common::Matrix2D mtx = pg.GetDefaultMatrix(true, kDefaultPageBox); auto dummySeps = pdftronRasterizer.RasterizeSeparations(pg, (int) page_w, (int) page_h, mtx, nullptr /* clip */, nullptr /* pbCancel */);