Private string company = "Your Company Here" It takes an array of pictures (I think it only works only with jpg) with its sizes and return a pdf file, with one picture per page. Or paying any license, you can use this code. If you want to do it in a cross-platform way, without any thirty part library, If Not PDFDoc.Close() Then Throw New Exception("PDF file could not be closed: " & PDFDoc.GetFileName()) If Not PDFDoc.Save(PDSaveCollectGarbage Or PDSaveLinearized Or PDSaveFull, CreatedFile) Then Throw New Exception("PDF file cannot be saved: " & PDFDoc.GetFileName()) If File.Exists(CreatedFile) Then File.Delete(CreatedFile) 'Avoid conflicts, therefore previous file there will be deleted If Not System.IO.Directory.Exists(DestinationFolder) Then Throw New Exception("Destination directory does not exist: " & DestinationFolder)ĭim CreatedFile As String = DestinationFolder & System.IO.Path.GetFileNameWithoutExtension(FilePath) & ".pdf" If Not DestinationFolder.EndsWith("\") Then DestinationFolder += "\"
You can convert this code here: Private Function ImageToPDF(ByVal FilePath As String, ByVal DestinationFolder As String) As StringĬonst PDSaveCollectGarbage As Integer = 32 Due to that these objects are COM objects, you shall do a 'release object', not just a '=Nothing". FormSwift also offers a tool to convert paper documents to PDFs instantly via a mobile device at: formswift.You need Acrobat to be installed. All you have to do is drag & drop files into the converter to begin.
Our online tool allows you to convert files to PDF file format, then download or share the edited PDF file.