1/5/2024 0 Comments Pdf images blurryUnfortunately, when exported as a PDF the logos and all other images become blurry, while the tableau graphics remain unchanged. Image1.FixHeight = b.Height - Ĭonsole.WriteLine("Image updated Width = " + image1.FixWidth) Ĭonsole.WriteLine("Image updated Height = " + image1. These dashboards include several high quality images of company logos. Save your changes then download the document as a PDF. To preserve image quality, you’ll need a higher DPI. First, find the advanced settings in Word and change your default DPI selection. ![]() We are sorry for this inconvenience.īitmap b = new Bitmap("c:/pdftest/IMG_1344.jpg") Ĭonsole.WriteLine("Input Image Width = " + b.Width) Ĭonsole.WriteLine("Input Image Height = " + b.Height) If you don’t have a PDF tool, you can manually adjust your Word document’s image DPI settings before you save it as a PDF with a few extra steps. Furthermore, the dimensions of input image are so big that when transforming it to PDF format, the size of output file is not according to image dimensions.įor your reference, I have also attached the output file generated over my end. NET 11.2.0 and I am unable to notice any image blur issue in resultant file. I have tested the scenario using Aspose.Pdf for. MemoryStream outStream = new MemoryStream() doc.Save(“c:/Projects/Image2PDF_DOM.pdf”) specify the image Height information equal to page Height Add the image into paragraphs collection of the section Page.CropBox = new (0, 0, b.Width, b.Height) Ī image1 = new () Instantiate BitMap object with loaded image stream MemoryStream myStream = new MemoryStream(tmpBytes) ImageToConvertStream.Read(tmpBytes, 0, Convert.ToInt32(imageToConvertStream.Length)) FileStream fs = new FileStream(“c:/Projects/test.jpg”, FileMode.Open, FileAccess.Read) īyte tmpBytes = new byte Load the source image file to Stream object Add a page to pages collection of document ![]() Is there a way to keep the dimensions and still fit on the page? Or maybe if it’s too big for the page then switch to landscape? Here this the code I’m using: public byte convertImagetoPDF(Stream imageToConvertStream)Ī license = new () Ī doc = new () ![]() When I do the image in the pdf is very blurry.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |