I am using PDFsharp and System.Drawing.Image to convert TIFF files to PDFs. After I generate the data to a stream, I convert it to a base64 string. However, even though I convert the same file, when I compare them, the strings have a couple characters that are different between runs. They appear perceptually the same but I do not know why there is variation in the end result.
Is there something in PDFsharp that needs to be set in order for PDF generation to be the exact same when I attempt to convert the same file? I know that if I have a PdfDocument p
that p.Info.CreationDate
is set to the current time so I set it to new DateTime()
instead.
I do not believe the variability is caused by the byte array to base64 string because I use Convert.ToBase64String(myByteAarray)
.
To do the actual conversion, I use a process based on work by Steven Wellens: https://stackoverflow.com/a/35209378/19831782