public void PdfHelper_ThrowsExceptionOnEmptyImageBytes() { PDFContentData contentData = new PDFContentData { Buffer = null, Type = "image", }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); }
public void PdfHelper_CanConcatenatePDFFromBytes() { PDFContentData contentData = new PDFContentData { Buffer = testPdfByteArray, Type = "pdf", }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); Assert.IsNotNull(doc); }
public void PdfHelper_ThrowsExceptionOnNonexistantFilePath() { PDFContentData contentData = new PDFContentData { FilePaths = new List <string> { @"C:\this-is-a-fake-file-and-i-really-hope-nobody-really-has-one-of-these.pdf" } }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); }
public void PdfHelper_ThrowsExceptionOnEmptyFilePath() { PDFContentData contentData = new PDFContentData { FilePaths = new List <string> { "" } }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); }
public void PdfHelper_CanConcatenateHTMLFromString() { PDFContentData contentData = new PDFContentData { HtmlString = testHtmlString, Type = "html", }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); Assert.IsNotNull(doc); }
public void PdfHelper_GracefullyHandlesEmptyHTMLString() { PDFContentData contentData = new PDFContentData { HtmlString = "", Type = "html", }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); Assert.IsNotNull(doc); }
public void PdfHelper_CanConcatenateImageFromFile() { PDFContentData contentData = new PDFContentData { FilePaths = new List <string> { testImagePath } }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); Assert.IsNotNull(doc); }
public void PdfHelper_GracefullyHandlesUnsupportedFileType() { PDFContentData contentData = new PDFContentData { FilePaths = new List <string> { "fake-file.xls" } }; PdfDocument doc = PdfHelper.ConcatenatePDFs(outputDocument, contentData); Assert.IsNotNull(doc); }