Here i have tried to convert .txt file to .jpg, .pdf and .tiff.
a.).txt to .jpg(working)
b.).txt to .tiff(working)
c.).txt to .pdf(Alignment was not working properly)
jpeg and tiff files are looks identical but for PDF half of the paragraph is printing in the previous pages itself.
Also attached the Input/Output files
var pdfSaveOptions = new PdfSaveOptions(); pdfSaveOptions.PageIndex = 2; pdfSaveOptions.PageCount = 1; var height = PageSize.A4Height; var width = PageSize.A4Width; var doc = new Document(inputFilePath); var builder = new DocumentBuilder(doc); builder.Font.Size = 4; builder.PageSetup.PageWidth = width; builder.PageSetup.PageHeight = height; doc.UpdatePageLayout(); doc.Save(outputFilePath, pdfSaveOptions);