0

I'm trying to move away from using a command line app to convert TIFF to PDF; in doing so, I've installed LibTiff.net and tried to convert a file using their provided example.

Even using the sample exactly as they put it, it seems like I can't find the Tiff2Pdf function. I've tried Tiff2Pdf, BitMiracle.Tiff2Pdf, BitMiracle.LibTiff.Classic.Tiff2Pdf, etc.

Imports System
Imports System.Diagnostics
Imports System.Drawing
Imports System.IO
Imports BitMiracle

Namespace BitMiracle.LibTiff.Samples
    Public NotInheritable Class ConvertTiffToPdf
        Public Shared Sub Main()
            Dim inputFile As String = "Sample Data\multipage.tif"
            Dim outputFile As String = "output.pdf"

            Dim arguments As String() = New String() {"-o", outputFile, "-p", "A4", inputFile}
            Tiff2Pdf.Program.Main(arguments)

            Process.Start(outputFile)
        End Sub
    End Class
End Namespace

Is there another reason why this wouldn't be working?

Rein S
  • 889
  • 6
  • 18

1 Answers1

4

When you download the binaries package from here, it will contain Tiff2Pdf.exe. As crazy as it sounds you need to add this exe as reference for access to BitMiracle.Tiff2Pdf. You can find the source code of this utility in its GitHub repository.

tpeczek
  • 23,867
  • 3
  • 74
  • 77