[PDFNet] How do I selectively rasterize all vector paths inside a PDF?

Q: How do I selectively rasterize all vector paths inside a PDF?

I need to write a server component that takes a pdf file, selectively
rasterizes all _vector_ images inside the pdf (i.e. paths), and spits
out the pdf. Can I do this with PDFNet ?
-----------------------
A: You could rasterize images selectively as shown in ElementEdit and
PDFDraw samples:
   http://www.pdftron.com/pdfnet/samplecode.html#ElementEdit

In ElementEdit sample all images are removed and text color is changed
to blue, but with a simple tweak you can turn things around and skip
everything but paths etc. You have full control over which elements
will be preserved before passing the modified page to PDFDraw.

For a concrete sample project using this technique you may want to
take a look at PDF2HTML sample project that comes as part of C#
version of PDFNet (http://www.pdftron.com/pdfnet/samplecode/
Pdf2Html.cs). In this case PDFDraw is used to selectively rasterize
HTML background image (which contains everything except text).

In case you need to process the original embedded images, you can
extract them as shown in ImageExtract sample (http://www.pdftron.com/
pdfnet/samplecode.html#ImageExtract).

--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group. To post to this group, send email to support@pdftron.com
To unsubscribe from this group, send email to pdfnet-sdk-unsubscribe@googlegroups.com. For more information, please visit us at http://www.pdftron.com

Q: Is there a way to convert a vector image into a bitmap image? (eg:
rasterize) We only need to operate on vector images while leaving
bitmap based graphics alone.
--------------------
A: You can do so by copying the vector object on a temporary page (or
a form xobject) and then using PDFDraw to rasterizer a page. Please
note that you don’t need to modify the original page or add a temp
object to a document (e.g. with doc.PagePushBack() or similar).

--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group. To post to this group, send email to support@pdftron.com
To unsubscribe from this group, send email to pdfnet-sdk-unsubscribe@googlegroups.com. For more information, please visit us at http://www.pdftron.com