Hi!
Hi,
Amjad Sahi:Hi,If you set OnePagePerSheet to true, it is decided by the sheet's content only.Is there a way to get the sheet's content estimated size ? Having the exact width/height is not important, but having a good approximation is.I could use Graphic2D.drawImage() to resize the image, but it would not be good for large dimensions.
Hi,
Thanks for your posting and using Aspose.Cells.
Please use SheetRender.getPageSize(pageIndex) method for your needs. Let us know if you have any other question, we will look into it and help you asap.
mshakeel.faiz:Hi,
Please use SheetRender.getPageSize(pageIndex) method for your needs. Let us know if you have any other question, we will look into it and help you asap.
Hi,
Thanks for your posting and using Aspose.Cells.
We will look into your issue in detail and help you asap. Please let us know if such a solution is available in Aspose.Words. Could you please post a runnable sample code of Aspose.Words showing this solution for our reference which we could run at our end and observe it? It will help us look into your requirements more closely and precisely and we will be able to provide a similar solution for your needs.
Thanks for your cooperation.
Hi,
Thanks for your sample code and using Aspose.Cells.
The sample code you provided clarifies your requirements. We will test this sample code and logged a New Feature request in our database to support this feature. We will update you asap.
Thank you. Can you provide the ID number of the feature request if possible for tracking purpose ?
Hi,
Thanks for your posting and using Aspose.Cells.
We were able to generated image of Microsoft Word page with desired width and height using Aspose.Words using the following code. I have attached the output images and source word document used in the code for a reference.
We will support the similar feature for worksheet image if possible. We have therefore logged a New Feature request in our database to investigate and implement this feature. Once, the feature is supported or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSJAVA-41235 - Support RenderToSize API for Worksheet Image
Java
String filePath = “F:\Shak-Data-RW\Downloads\sample.docx”;
int renderWidth=400;
int renderHeight = 400;
Document doc = new Document(filePath);
BufferedImage image = new BufferedImage(renderWidth, renderHeight, BufferedImage.TYPE_INT_ARGB);
final Graphics2D gr = image.createGraphics();
gr.setColor(Color.WHITE);
gr.fillRect(0, 0, image.getWidth(), image.getHeight());
gr.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
doc.renderToSize(0, gr, 0, 0, renderWidth, renderHeight);
ImageIO.write(image, “PNG”, new File(“Image.400x400.png”));
Hi,
Hi,
Thanks for your posting and considering Aspose.Cells.
We have added the same New Feature request in our database for .NET version. So, now once it is implemented, it will be available for both platforms (.NET and Java).
This issue has been logged as
- CELLSNET-43469 - Support RenderToSize API for Worksheet Image
Hi,
Thanks for your posting and using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v8.4.0.1 and let us know your feedback.
We have added new API: SetDesiredSize(int desiredWidth, int desiredHeight) in
ImageOrPrintOptions
Hi,
The issues you have found earlier (filed as CELLSNET-43469) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
The issues you have found earlier (filed as CELLSJAVA-41235) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.