PNG to PDF

PNG to PDF

Forum member · Feb 17, 2011
I currently use code that converts a TIFF to PDF as shown below. I need to be able to convert a PNG to a PDF as well, but haven't the first clue where to start b/c it doesn't work the same way. Thanks! Dim TiffFile As ceTe.DynamicPDF.Imaging.TiffFile = New ceTe.DynamicPDF.Imaging.TiffFile(ImagePath) Dim document As ceTe.DynamicPDF.Document = TiffFile.GetDocument() document.Draw(DestFilePath)

Re: PNG to PDF

Support · Feb 18, 2011
Hello, Yes, you can add PNG images to the PDF document without any problem using our DynamicPDF Generator product. You will have to use the Image page element to do this. Please refer the documentation on Image page element at: http://www.DynamicPDF.com/Support/NET_Help_Library_11_01/ceTe.DynamicPDF~ceTe.DynamicPDF.PageElements.Image.html . Also below is the sample code for it. Document doc = new Document(); Page page = new Page(); Image image = new Image((@"C:\temp\Test.png", 0, 0, 1.0F); page.Elements.Add(image); doc.Pages.Add(page); doc.Draw(@"C:\temp\MyDocument.pdf"); Thanks, ceTe Software Support Team.