Pdf size reducer 150 kb pdf#
I would love to compress pdf according to your requirement We have specialized algorithms which will be able to achieve the desired results. Please contact us for specific targets to compress pdf file size.Hence, desired reduction in pdf file size may not be achieved Our pdf compressor is designed to compress pdf file size without losing quality. Please note each iteration to compress pdf will reduce compression ratio.Try repeated iterations to compress pdf, till pdf file size is reduced to desired size.Upload pdf file in the panel to upload file.compress pdf to 100kb online or compress pdf to 200kb online or compress pdf to 500kb online
Pdf size reducer 150 kb how to#
NewBMP.Save(directory + " tn_" + filename) Save the new graphic file to the server OGraphics.DrawImage(originalBMP, 0, 0, newWidth, newHeight) Draw the new graphic based on the resized bitmap OGraphics.SmoothingMode = SmoothingMode.AntiAlias oGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic Set the properties for the new graphic file Graphics oGraphics = Graphics.FromImage(newBMP) Create a graphic based on the new bitmap Create a new bitmap which will hold the previous resized bitmapīitmap newBMP = new Bitmap(originalBMP, newWidth, newHeight) int newHeight = newWidth / sngRatio int newHeight = 320 Calculate the new image dimensions int origWidth = originalBMP.Width Create a bitmap of the content of the fileUpload control in memoryīitmap originalBMP = new Bitmap( c:\TestPhotoQualityZero.jpg") Specify the upload directory string directory = Server.MapPath( Uploaded-Files\") If it doesn't then we just create it before going any furtherĭirectory.CreateDirectory(MapPath( Uploaded-Files")) Check if the directory we want the image uploaded to actually exists or not if (!Directory.Exists(MapPath( Uploaded-Files"))) Find the fileUpload control string filename = fileUpload.FileName MyEncoderParameters.Param = myEncoderParameter īmp1.Save( c:\TestPhotoQualityZero.jpg", jgpEncoder, myEncoderParameters)
EncoderParameter myEncoderParameter = new EncoderParameter(myEncoder, 50L) // myEncoderParameters.Param = myEncoderParameter // jgpEncoder, myEncoderParameters) // myEncoderParameter = new EncoderParameter(myEncoder, 100L) // myEncoderParameters.Param = myEncoderParameter // jgpEncoder, myEncoderParameters) // Save the bitmap as a JPG file with zero quality level compression.ĮncoderParameter myEncoderParameter = new EncoderParameter(myEncoder, 25L) In this case, there is only one // EncoderParameter object in the array.ĮncoderParameters myEncoderParameters = new EncoderParameters( 1)
An EncoderParameters object has an array of EncoderParameter // objects. Create an Encoder object based on the GUID // for the Quality parameter category. ImageCodecInfo jgpEncoder = GetEncoder(ImageFormat.Jpeg)
Pdf size reducer 150 kb code#
Copy Code protected void uploadButton_Click( object sender, EventArgs e)īitmap bmp1 = new Bitmap(fileUpload.FileContent)