Sunday, August 31, 2014

Multithreading Environment Support & AutoFit Excel Rows/Columns in Android

What’s new in this release?

Aspose development team is pleased to announce the new release of Aspose.Cells for Android v8.2.0. The Aspose.Cells for Android API is equally useful in multi-threading environment as in a single thread execution plan. However, recent changes to the core make the API more reliable when reading cell values in multiple threads simultaneously. Aspose.Cells for Android has exposed the MultiThreadReading property for the Cells class in order to make sure that the correct cell values are returned when API works in a multi-threading environment. For more details, have a look at the detailed article on Simultaneously Reading Cell Values with Multiple Threads. Now you may also use the new overloads we have included to this release – autoFitRows(int startRow, int endRow, AutoFitterOptions options) and autoFitColumns(int firstColumn, int lastColumn, AutoFitterOptions options) – from the list if you need to auto-fit rows or columns with the desired AutoFitterOptions. Aspose.Cells for Android 8.2.0 has provided fixes and other enhancements for several important issues, such as, reading/writing Microsoft Excel files, calculating formulas, manipulating charts and shapes, sheet to image conversion bugs, etc.  Enhanced the PDF rendering engine to handle shapes better and improvements to the core for better handling of embedded OleObjects are also part of this new release. This release includes plenty of improved features and bug fixes as listed below
  • Rendering issue with Shapes (Spinner,ScrollBars) while converting to HTML file format
  • Issue with reading shape values in Excel 2003 file format
  • Embedded Object Icons are Converted to Arrows when edited with Excel 2013 and loaded back
  • Data not same as source in the output PDF
  • Vertical border lines are missing in the output PDF
  • Number 5 is missing below 1 in the output PDF
  • % is missing in the output PDF
  • Files corrupted after conversion
  • Shape overlapping the text in the resultant PDF
  • Incorrect Shape Rendering : The resulted PDF has a trimmed shape with a part of the cross not shown
  • Check Boxes are not aligned properly in the resultant PDF
  • Bubble properties changed in the chart when re-saving the template XLSX file
  • Updating the Linked Cell with Chainese Characters and rendering it to HTML results in '?' (Question) Marks
  • Text is cuted off when converting to PDF
  • Characters are overlapping when converting xls to tiff
Other most recent bug fixes are also included in this release.

Overview: Aspose.Cells for Android

Aspose.Cells for Android is a MS Excel spreadsheet component that allows programmer to develop android applications for reading, writing & manipulate Excel spreadsheets (XLS, XLSX, XLSM, SpreadsheetML, CSV, tab delimited) and HTML file formats without needing to rely on Microsoft Excel. It supports robust formula calculation engine, pivot tables, VBA, workbook encryption, named ranges, custom charts, spreadsheet formatting, drawing objects like images, OLE objects & importing or creating charts.

Thursday, August 14, 2014

Font Substitution Mechanism & Enhanced Excel to PDF Conversion: Android Development

What’s new in this release?

Aspose development team is pleased to announce the new release of Aspose.Cells for Android v8.1.2. Aspose.Cells APIs generally use TrueType Fonts (TTFs) when a task involves rendering spreadsheets to images or portable formats such as PDF. Aspose.Cells detects which TTFs are required by scanning the spreadsheet styles and tries to find the required fonts on the machine where conversion is taking place. There could be situations when the required TTFs are not available. In such cases, Aspose.Cells substitutes the required font with a similar available one. With this release, Aspose.Cells provides the means to receive warnings if a font substitution has occurred during the spreadsheet rendering process. This mechanism is available through a set of classes, interfaces and properties that have been added with version 8.1.2. Aspose.Cells for Android 8.1.2 has provided fixes and other enhancements for several important issues, such as, reading/writing Microsoft Excel files, manipulating styles and calculating formulas, manipulating charts and shapes, Sheet to image bugs, Smart Markers issue, etc. This release includes plenty of improved features and bug fixes as listed below
  • FileFormatUtil.DetectFileFormat uses all system's available memory while detecting a corrupted spreadsheet
  • Data missing is fixed when PivotTable is converted to PDF
  • Total Title missing is fixed when PivotTable is converted to PDF
  • Cell Merging Problem is resolved when PivotTable is converted to PDF
  • PivotTable bug regarding Subtotals is fixed
  • Arrow lines are too thick than in Excel is now fixed
  • Merged cell content disappears is now fixed when rows are filtered and spreadsheet is converted to HTML
  • Aspose.Cells produce arrow double in thickness while converting XLS to PDF
  • Printed result is now centered correctly and last line get lost
  • The text in merged cells are now showing when convert to PDF
  • Shape to image Error is resolved while converting ExcelShapeToImageRedactedEx.xls to Tiff
  • Shape to image Error is resolved while converting ExcelShapeToImageError.xls to Tiff
  • Line thickness is now fixed when saved as PDF using Aspose cells
  • Excel chart labels are overlapping after opening and saving the xlsm file
  • Match formula is now calculated correctly with Workbook.CalculateFormula
  • #NUM! error is resolved when reading certain cells
  • Smart Markers - Cells Formatting is now retaine correctly on Group:Merge, Skip:1
Other most recent bug fixes are also included in this release

Overview: Aspose.Cells for Android

Aspose.Cells for Android is a MS Excel spreadsheet component that allows programmer to develop android applications for reading, writing & manipulate Excel spreadsheets (XLS, XLSX, XLSM, SpreadsheetML, CSV, tab delimited) and HTML file formats without needing to rely on Microsoft Excel. It supports robust formula calculation engine, pivot tables, VBA, workbook encryption, named ranges, custom charts, spreadsheet formatting, drawing objects like images, OLE objects & importing or creating charts.


Wednesday, August 6, 2014

How to Add Text in Header/Footer Area of PDF File in Android Applications



This technical tip shows how developers can add text in headeror footer of a PDF file inside their Android applications. The TextStamp class is used to add text in PDF document. We can also use the same class to add text in Header/Footer area of PDF file. The TextStamp class provides necessary methods to specify font size, font style, and font color etc for stamp object. In order to add text in the Header area, first you need to create a Document object and a TextStamp object using required methods. After that, you can call addStamp(..) method of Page class to add text in the PDF file.     Please note that when placing text in Header section, you need to call setTopMargin(..) in such a way that it adjusts the text in the header area of your PDF. Similarly when placing text in Footer section, you need to call setBottomMargin(..) in such a way that it adjusts to the text in Footer area.

·         When adding stamp object in Header section, you also need to set VerticalAlignment to Top.
·         When adding stamp object in Footer section, you also need to set VerticalAlignment to Bottom.

The following code snippet shows you how to add text in the header of a PDF file.
Java

//open document
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("/mnt/sdcard/input.pdf");
//create text stamp
com.aspose.pdf.TextStamp textStamp = new com.aspose.pdf.TextStamp("Sample Stamp");
//set properties of the stamp
textStamp.setTopMargin(10);
textStamp.setHorizontalAlignment(com.aspose.pdf.HorizontalAlignment.Center);
textStamp.setVerticalAlignment(com.aspose.pdf.VerticalAlignment.Top);

//set text properties
textStamp.getTextState().setFont(new com.aspose.pdf.FontRepository().findFont("Arial"));
textStamp.getTextState().setFontSize(14.0F);
textStamp.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Bold);
textStamp.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Italic);
textStamp.getTextState().setForegroundColor(java.awt.Color.GREEN);

// iterate through all pages of PDF file
for (int Page_counter =1; Page_counter<=pdfDocument.getPages().size();Page_counter++)
{
    //add stamp to all pages of PDF file
    pdfDocument.getPages().get_Item(Page_counter).addStamp(textStamp);
}
//save output document
pdfDocument.save("/mnt/sdcard/TextStamp_output.pdf");

Overview: Aspose.Pdf for Android

Aspose.Pdf for Android is a PDF document creation & manipulation component that enables Android applications to read, write & manipulate PDF document without using any other third party application. It allows PDF compression options, table creation & manipulation, support for graph objects, extended security controls, custom font handling, add or remove bookmarks, create table of contents, add, update, delete attachments & annotations, import or export PDF form data, print PDF docs &  much more.