Hello,
When I convert a TIFF application to PDF, Images are being forced to portrait orientation regardless of the embedded orientation.
Also When I merge two PDF files it does the same ; - >outputs the portrait version.
Please advice, a code snippet is attached as per the email I got from the support team.
Thanks,
Jess
Hi Jess,
Hi Jess,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for sharing the sample code.
However, to test your issue, I would request you to share your Tiff file with us. This will help us figure out the cause of the issue soon.
Sorry for the inconvenience,
Hi Nausheranwan,
You can choose any TIFF image from the internet that is displayed in landscape orientation.
I used couple of TIFF images and after executing my code the TIFF image got converted to PDF version, but the orientation changed to Portrait by default
I want to have the orientation not to be forced to portrait. It should remain as per its parent file(TIFF image).
NOTE:
For more clarification , I am using the following code for excel document orientation display:
if (orientation == PageOrientation.Portrait)
{
workbook.Worksheets[i].PageSetup.Orientation =
Aspose.Cells.PageOrientationType.Portrait;
}
else
{
workbook.Worksheets[i].PageSetup.Orientation =
Aspose.Cells.PageOrientationType.Landscape;
}
}
workbook.Save(pdfMs, Aspose.Cells.SaveFormat.Pdf)
Please let me know if you have any questions or concerns.
Thanks,
Jess
Hi Jess,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for the feedback.
I tried replicating your issue with the latest version of Aspose.Pdf for .NET v7.5 but I was unable to reproduce the issue. If you are using an older version, please download and try the latest version and let us know if you still face any problem. In case you still face a problem, please share your sample application with us.
Sorry for the inconvenience,
Hello Nausherwan,
Can you please share the TIFF image and the produced PDF for both portrait and landscape orientation.
I would also like to add that the sample piece of code that I provided in the earlier response was for excel document.
So I need your help for providing something for working with TIFF images being converted to PDF.
NOTE:
I have attached :
1) the sample piece of code I am using to convert the TIFF images to PDF version.
2) Also attached the tiff image and
3) the PDF version produced after running this code in my application.
You can see that the Tiff image is landscape, where PDF produced is Portrait and also it is being compressed to one side leaving some space on the right side.
Please provide me the working piece of code handling the orientation problem, so that images are displayed properly based on the input orientation provided.
Thanks,
Jess