i would like to take print of a pdf i generated. the current problem in taking print is the print of whole pdf is coming. i need to take the print of pdf which i written
please help me friends
thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Flora TomePosted Mar 5, 2015, 8:11 AM
I am not familiar with iTextSharp SDK, but I used leadtools for several years to load PDF files. If you mean that you want to save the PDF file after loading it, you can simply load the PDF file as raster image using one of leadtools .NET load functions, and then save it to any supported file format (like PNG, JPEG, GIF, etc.). I am currently using the following code to load and save PDF files to PNG format using leadtools:
+--------------+
using (RasterCodecs codecs = new RasterCodecs())
{
codecs.Options.RasterizeDocument.Load.XResolution = 300;
codecs.Options.RasterizeDocument.Load.YResolution = 300;
RasterImage image = codecs.Load(imageFileName, p);
codecs.Save(image, @"c:\Temp\Print.png", RasterImageFormat.Png, 24);
}
+--------------+
I hope this helps :)
shiju kvPosted Mar 4, 2015, 1:25 AM
Naidu AMMANPosted Mar 4, 2015, 12:57 AM