Hi Suppoet,
We are merging multiple PDF files into one PDF and upload the same in azure blob storage. It’s wotking fine for most cases but we observed that in some cases PDF merged with zoomed content so its extrimly diffecult to read ot even view the content.
We are using below code to achive the funcationality.
foreach (var fileItem in fileList)
{
string fileType = Path.GetExtension(fileItem).Replace(“.”, “”);
if (fileType == Enumeration.FileType.PDF.ToString().ToLower())
{
MemoryStream fileStream = await _blobStorageHelper.DownloadBolbDocumentAsync(fileItem, Entity.Load.ToString().ToLower());
Document pdfDocument = new Document(fileStream);
invoiceDocument.Pages.Add(pdfDocument.Pages);
}
}
//Set Page size to legal
PageCollection pageCollection = invoiceDocument.Pages;
foreach (var item in pageCollection)
{
item.SetPageSize(PageSize.PageLegal.Width, PageSize.PageLegal.Height);
}
invoiceDocument.SetTitle(Constants.Constants.InvoicePDF);
using (MemoryStream ms = new MemoryStream())
{
invoiceDocument.Save(ms);
DocumentViewModel documentViewModel = new DocumentViewModel();
documentViewModel = await _blobStorageHelper.UploadAsync(Constants.Constants.BlobContainerName, EnumUtils.StringValueOf(DocumentType.Invoice), null, ms);
documentModel.Name = documentViewModel.Name;
documentModel.DocumentPath = documentViewModel.DocumentPath;
}
ASPOSE_Merge_zoom_issue.png (40.5 KB)
In screenshot you can see that page 2 is zoomed. We have also attached screenshot of original pdf so that you can compare output of merged PDF.
Original page 2.jpg (257.6 KB)
We have tried and search multiple options but unable to figure out above mentioned issue. Can you please help us to resolve the issue.
apologies for not uploading original document due to contractual limitations.
Thanks in advance.