We have a problem to convert the jpg file (seejpg attached file) to PDF, the result give us an empty PDF file (see PDF attached file). It’s very strange and we don’t find why only for this file it doesn’t work.
var pdfDocument = new Aspose.Pdf.Document();
var pdfPage = pdfDocument.Pages.Add();
var image = new Aspose.Pdf.Image();
image.File = myDir + "Test.jpg";
pdfPage.Paragraphs.Add(image);
pdfDocument.Save(myDir + "Test-out.pdf");
@dlan
What version of the library are you using?
What variable values are you setting for:
page.PageInfo.Height = PageSize.A4.Height;
page.PageInfo.Width = PageSize.A4.Width;
int marginBottom = 20;
int marginTop = 20;
int marginLeft = 20;
int marginRight = 20;
?
after the sign = those that I took and I created a valid document. True, I used a library for C #, I don’t use Java, and if the code had been given right away, I would not have taken this question (but the libraries must be synchronized).