Q: Once in a while we get pdfs from customers that has large high
resolution images in them e.g. a background image. This causes pdf
rendering to be extreamely slow (e.g. in Acrobat), so for the moment
we get around that by creating a new pdf from Acrobat by printing the
big pdf to distiller. This compresses the images in a new resolution
(I guess). Is there a way to do this trick with pdfnet?
A: You can down-sample/sub-sample (i.e. shrink) the image prior to
embedding it in PDF using PDFNet.
If you are developing under .NET, you could use GDI+ API to shrink
down System.Drawing.Bitmap (you may want to use bmp.GetThumbnailImage
(). If this doesn't work as expected you can also create a new smaller
System.Drawing.Bitmap, create a new Drawing surface and attach it to
the Bitmap, draw from the original input bitmap to the smaller bitmap,
then embed the resulting Bitmap in PDF using pdftron.PDF.Image.Create