Q: We’re trying to use PDFNet (http://www.pdftron.com/pdfnet) to
implement the following functionality:
- we have a rip that rips raster pdfs (as the four attached in this
mail. These are 1200 dpi raster pdfs). - then we want to create a low-res pdf that has the following
specifications: - the pdf will be a low-res preseparated pdf (so if I open the pdf
with the preview output I can really see the actual separations of the
pdf) - the separations internally must remain the number of the ripped
page (for example, if the original pdf is CMYK + PANTONE, internally
I’ll have 5 images that belong to the same page, but in the output
preview I can disable one of the 5 channels separately.) - Internally the images (separations in low-res for example at 100
dpi) must link the original hi-res pdf files through opi. The hi-res
images will be in another folder on the server. So if I send the low-
res pdf in the rip, it makes a substitution of the internal images
with the hi-res rasterized ones.
A: To create a small (preview) PDF you can open each of PDF
separations and use PDFDraw to generate a page preview. Previews can
be added to a new PDF document and you can associate OPI information
with each image. A high-level pseudo-code would look as follows:
PDFDoc newdoc = new PDFDoc();
PDFDraw draw = new PDFDraw();
For each separation
{
PDFDoc doc = new PDFDoc(“separatio1.pdf”);
Bitmap bmp = draw.GetBitmap();
Page page = newdoc.PageCreate();
// Use ElementWriter & ElemetnBuilder to place a rendered image on a
new page in the newdoc
// Please see AddImage sample for more info on this step…
pdftron.PDF.Image img = pdftron.PDF.Image.Create(bmp);
Element img_elem = builder.Create(img, pos);
writer.WritePlacedElement(img_elem);
newdoc.PagePushBack(page);
doc.Dispose();
// Add OPI information…
Obj opi = img.GetSDFObj().PutDict(“OPI”);
Obj opi2 = opi.PutDict(“2.0”); // Use OPI 2.0
opi2.PutNumber(“Version”, 2);
// Set low-resolution proxy.
opi2.Put(“F”, pdftron.PDF.FileSpec.Create(doc, “sep1_low.tif”,
false).GetSDFObj());
// Set high-resolution image version.
opi2.PutString(“MainImage”, “sep1_high.tif”);
…
// For details regarding OPI dictionary values please see Section
14.11.7
// ‘Open Prepress Interface (OPI)’ in {DF Reference Manual (ISO
32000).
}
newdoc.Save(…)
newdoc.Dispose();