How do I set the size of each page to match A4 dimensions? Here is the code I have at the moment. Can you test it and see if you can get the size to change. I have tried and have not noticed any change
private static string DecodeMemorialImages(int memId, string path, out List<string> images)
{
try
{
var newFile = "";
images = new List<string>();
bool success = false;
string tempDir = GetTempWorkingDirectory();
var memorial = path + "\\" + PrintDataManager.GetMemorial(memId);
Aspose.Pdf.Document document;
byte[] pdfBytes = File.ReadAllBytes(memorial);
var localDocument = "";
using (var stream = new MemoryStream(pdfBytes))
{
document = new Aspose.Pdf.Document(stream, false);
newFile = Path.ChangeExtension(memorial, "docx");
localDocument = CommonUtils.AddPath(tempDir, Path.GetFileName(newFile));
newFile = localDocument;
document.Save(localDocument, Aspose.Pdf.SaveFormat.DocX);
}
return newFile;
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
ROD_COPY_RETURN22383318.zip (575.5 KB)