From 562417a13c197190abe7908ae42d79a35c92fbc1 Mon Sep 17 00:00:00 2001 From: Suriya Balamurugan Date: Mon, 12 Oct 2020 20:55:01 +0530 Subject: [PATCH 1/4] Added the GettingStarted and GenerateOrderDetails examples --- .../generateorderdetails/CustomerDetails.java | 82 +++++ .../GenerateOrderDetails.java | 316 ++++++++++++++++++ docio/generateorderdetails/OrderDetails.java | 72 ++++ .../generateorderdetails/ProductDetails.java | 44 +++ docio/gettingstarted/GettingStarted.java | 134 ++++++++ docio/resources/CustomerDetails.xml | 251 ++++++++++++++ docio/resources/Image.png | Bin 0 -> 5346 bytes docio/resources/Template.docx | Bin 0 -> 34729 bytes 8 files changed, 899 insertions(+) create mode 100644 docio/generateorderdetails/CustomerDetails.java create mode 100644 docio/generateorderdetails/GenerateOrderDetails.java create mode 100644 docio/generateorderdetails/OrderDetails.java create mode 100644 docio/generateorderdetails/ProductDetails.java create mode 100644 docio/gettingstarted/GettingStarted.java create mode 100644 docio/resources/CustomerDetails.xml create mode 100644 docio/resources/Image.png create mode 100644 docio/resources/Template.docx diff --git a/docio/generateorderdetails/CustomerDetails.java b/docio/generateorderdetails/CustomerDetails.java new file mode 100644 index 0000000..4f733b2 --- /dev/null +++ b/docio/generateorderdetails/CustomerDetails.java @@ -0,0 +1,82 @@ +package generateorderdetails; + +import com.syncfusion.javahelper.system.collections.generic.ListSupport; + +public class CustomerDetails { + private String m_customerName; + private String m_address; + private String m_city; + private String m_postalCode; + private String m_country; + private String m_phone; + private ListSupport m_orders; + + public String getCustomerName() throws Exception { + return m_customerName; + } + + public String setCustomerName(String value) throws Exception { + m_customerName = value; + return value; + } + + public String getAddress() throws Exception { + return m_address; + } + + public String setAddress(String value) throws Exception { + m_address = value; + return value; + } + + public String getCity() throws Exception { + return m_city; + } + + public String setCity(String value) throws Exception { + m_city = value; + return value; + } + + public String getPostalCode() throws Exception { + return m_postalCode; + } + + public String setPostalCode(String value) throws Exception { + m_postalCode = value; + return value; + } + + public String getCountry() throws Exception { + return m_country; + } + + public String setCountry(String value) throws Exception { + m_country = value; + return value; + } + + public String getPhone() throws Exception { + return m_phone; + } + + public String setPhone(String value) throws Exception { + m_phone = value; + return value; + } + + public ListSupport getOrders() throws Exception { + if (m_orders == null) + m_orders = new ListSupport(OrderDetails.class); + return m_orders; + } + + public ListSupport setOrders(ListSupport value) throws Exception { + m_orders = value; + return value; + } + + public CustomerDetails() throws Exception { + m_orders = new ListSupport(OrderDetails.class); + } +} diff --git a/docio/generateorderdetails/GenerateOrderDetails.java b/docio/generateorderdetails/GenerateOrderDetails.java new file mode 100644 index 0000000..d798141 --- /dev/null +++ b/docio/generateorderdetails/GenerateOrderDetails.java @@ -0,0 +1,316 @@ +package generateorderdetails; + +import java.io.FileInputStream; +import com.syncfusion.docio.*; +import com.syncfusion.javahelper.system.ObjectSupport; +import com.syncfusion.javahelper.system.RefSupport; +import com.syncfusion.javahelper.system.StringSupport; +import com.syncfusion.javahelper.system.collections.DictionaryEntrySupport; +import com.syncfusion.javahelper.system.collections.generic.DictionarySupport; +import com.syncfusion.javahelper.system.collections.generic.IDictionarySupport; +import com.syncfusion.javahelper.system.collections.generic.IEnumeratorSupport; +import com.syncfusion.javahelper.system.collections.generic.ListSupport; +import com.syncfusion.javahelper.system.io.*; +import com.syncfusion.javahelper.system.xml.XmlDocumentSupport; +import com.syncfusion.javahelper.system.xml.XmlNodeSupport; +import com.syncfusion.javahelper.system.xml.XmlNodeType; +import com.syncfusion.javahelper.system.xml.XmlReaderSupport; +import java.io.File; + +public class GenerateOrderDetails { + + public static void main(String[] args) throws Exception { + // Creates a new document + WordDocument document = new WordDocument(); + // Loads template + String basePath = getDataDir("Template.docx"); + document.open(basePath, FormatType.Docx); + // Retrieves the mail merge data + MailMergeDataTable dataTable = getMailMergeDataTable(); + // Executes nested Mail merge using implicit relational data + document.getMailMerge().executeNestedGroup(dataTable); + // Removes empty page at the end of Word document + removeEmptyPage(document); + document.save("Sample.docx", FormatType.Docx); + System.out.println("Word document generated successfully."); + } + + /** + * + * Gets the mail merge data table. + * + * @return + * @exception System.Exception reader + * @exception XmlException Unexpected xml tag + reader.LocalName + */ + private static MailMergeDataTable getMailMergeDataTable() throws Exception { + // Gets the employee details implicit as "IEnumerable" collection. + ListSupport customers = new ListSupport(CustomerDetails.class); + FileStreamSupport stream = new FileStreamSupport(getDataDir("CustomerDetails.xml"), FileMode.OpenOrCreate); + XmlReaderSupport reader = XmlReaderSupport.create(stream); + if (reader == null) + throw new Exception("reader"); + while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) + reader.read(); + if (!(reader.getLocalName() == "CustomerDetails")) + throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) + reader.read(); + while (!(reader.getLocalName() == "CustomerDetails")) { + if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { + case "Customers": + + customers.add(getCustomer(reader)); + break; + } + } else + + { + reader.read(); + if ((reader.getLocalName() == "CustomerDetails") + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + break; + } + } + reader.close(); + stream.close(); + // Creates an instance of "MailMergeDataTable" by specifying mail merge group + // name and "IEnumerable" collection. + MailMergeDataTable dataTable = new MailMergeDataTable("Customers", customers); + return dataTable; + } + + /** + * + * Gets the customer. + * + * @param reader The reader. + * @return + * @exception System.Exception reader + * @exception XmlException Unexpected xml tag + reader.LocalName + */ + private static CustomerDetails getCustomer(XmlReaderSupport reader) throws Exception { + if (reader == null) + throw new Exception("reader"); + while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) + reader.read(); + if (!(reader.getLocalName() == "Customers")) + throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) + reader.read(); + CustomerDetails customer = new CustomerDetails(); + while (!(reader.getLocalName() == "Customers")) { + if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { + case "CustomerName": + + customer.setCustomerName(reader.readContentAsString()); + break; + case "Address": + + customer.setAddress(reader.readContentAsString()); + break; + case "City": + + customer.setCity(reader.readContentAsString()); + break; + case "PostalCode": + + customer.setPostalCode(reader.readContentAsString()); + break; + case "Country": + + customer.setCountry(reader.readContentAsString()); + break; + case "Phone": + + customer.setPhone(reader.readContentAsString()); + break; + case "Orders": + + customer.getOrders().add(getOrder(reader)); + break; + default: + + reader.skip(); + break; + } + } else + + { + reader.read(); + if ((reader.getLocalName() == "Customers") + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + break; + } + } + return customer; + } + + /** + * + * Gets the order. + * + * @param reader The reader. + * @return + * @exception System.Exception reader + * @exception XmlException Unexpected xml tag + reader.LocalName + */ + private static OrderDetails getOrder(XmlReaderSupport reader) throws Exception { + if (reader == null) + throw new Exception("reader"); + while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) + reader.read(); + if (!(reader.getLocalName() == "Orders")) + throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) + reader.read(); + OrderDetails order = new OrderDetails(); + while (!(reader.getLocalName() == "Orders")) { + if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { + case "CustomerName": + + order.setCustomerName(reader.readContentAsString()); + break; + case "OrderID": + + order.setOrderID(reader.readContentAsString()); + break; + case "OrderDate": + + order.setOrderDate(reader.readContentAsString()); + break; + case "ExpectedDeliveryDate": + + order.setExpectedDeliveryDate(reader.readContentAsString()); + break; + case "ShippedDate": + + order.setShippedDate(reader.readContentAsString()); + break; + case "Products": + + order.getProducts().add(getProduct(reader)); + break; + } + reader.read(); + } else + + { + reader.read(); + if ((reader.getLocalName() == "Orders") + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + break; + } + } + return order; + } + + /** + * + * Gets the product. + * + * @param reader The reader. + * @return + * @exception System.Exception reader + * @exception XmlException Unexpected xml tag + reader.LocalName + */ + private static ProductDetails getProduct(XmlReaderSupport reader) throws Exception { + if (reader == null) + throw new Exception("reader"); + while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) + reader.read(); + if (!(reader.getLocalName() == "Products")) + throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) + reader.read(); + ProductDetails product = new ProductDetails(); + while (!(reader.getLocalName() == "Products")) { + if (reader.getNodeType().getEnumValue() != XmlNodeType.EndElement.getEnumValue()) { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { + case "OrderID": + + product.setOrderID(reader.readContentAsString()); + break; + case "Product": + + product.setProduct(reader.readContentAsString()); + break; + case "UnitPrice": + + product.setUnitPrice(reader.readContentAsString()); + break; + case "Quantity": + + product.setQuantity(reader.readContentAsString()); + break; + } + reader.read(); + } else + + { + reader.read(); + if ((reader.getLocalName() == "Products") + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + break; + } + } + return product; + } + + /** + * + * Removes empty paragraphs from the end of Word document. + * + * @param document The Word document + */ + private static void removeEmptyPage(WordDocument document) throws Exception { + WTextBody textBody = document.getLastSection().getBody(); + boolean IsRenderableItem = false; + for (int itemIndex = textBody.getChildEntities().getCount() - 1; itemIndex >= 0 + && !IsRenderableItem; itemIndex--) { + if (textBody.getChildEntities().get(itemIndex) instanceof WParagraph) { + WParagraph paragraph = (WParagraph) ObjectSupport.instanceOf(textBody.getChildEntities().get(itemIndex), + WParagraph.class); + for (int pIndex = paragraph.getItems().getCount() - 1; pIndex >= 0; pIndex--) { + ParagraphItem paragraphItem = paragraph.getItems().get(pIndex); + if ((paragraphItem instanceof Break + && ((Break) ObjectSupport.instanceOf(paragraphItem, Break.class)).getBreakType() + .getEnumValue() == BreakType.PageBreak.getEnumValue())) + paragraph.getItems().removeAt(pIndex); + else + + if (!(paragraphItem instanceof BookmarkStart || paragraphItem instanceof BookmarkEnd)) { + IsRenderableItem = true; + break; + } + } + if (paragraph.getItems().getCount() == 0 || !IsRenderableItem) + textBody.getChildEntities().removeAt(itemIndex); + } + } + } + + /** + * Get the file path + * + * @param path specifies the file path + */ + public static String getDataDir(String path) { + File dir = new File(System.getProperty("user.dir")); + if (!(dir.toString().endsWith("samples"))) + dir = dir.getParentFile(); + dir = new File(dir, "resources"); + dir = new File(dir, path); + if (dir.isDirectory() == false) + dir.mkdir(); + return dir.toString(); + } + +} diff --git a/docio/generateorderdetails/OrderDetails.java b/docio/generateorderdetails/OrderDetails.java new file mode 100644 index 0000000..fddb442 --- /dev/null +++ b/docio/generateorderdetails/OrderDetails.java @@ -0,0 +1,72 @@ +package generateorderdetails; + +import com.syncfusion.javahelper.system.collections.generic.ListSupport; + +public class OrderDetails { + private String m_customerName; + private String m_orderID; + private String m_orderDate; + private String m_expectedDeliveryDate; + private String m_shippedDate; + private ListSupport m_products; + + public String getCustomerName() throws Exception { + return m_customerName; + } + + public String setCustomerName(String value) throws Exception { + m_customerName = value; + return value; + } + + public String getOrderID() throws Exception { + return m_orderID; + } + + public String setOrderID(String value) throws Exception { + m_orderID = value; + return value; + } + + public String getOrderDate() throws Exception { + return m_orderDate; + } + + public String setOrderDate(String value) throws Exception { + m_orderDate = value; + return value; + } + + public String getExpectedDeliveryDate() throws Exception { + return m_expectedDeliveryDate; + } + + public String setExpectedDeliveryDate(String value) throws Exception { + m_expectedDeliveryDate = value; + return value; + } + + public String getShippedDate() throws Exception { + return m_shippedDate; + } + + public String setShippedDate(String value) throws Exception { + m_shippedDate = value; + return value; + } + + public ListSupport getProducts() throws Exception { + if (m_products == null) + m_products = new ListSupport(ProductDetails.class); + return m_products; + } + + public ListSupport setProducts(ListSupport value) throws Exception { + m_products = value; + return value; + } + + public OrderDetails() throws Exception { + m_products = new ListSupport(ProductDetails.class); + } +} diff --git a/docio/generateorderdetails/ProductDetails.java b/docio/generateorderdetails/ProductDetails.java new file mode 100644 index 0000000..da6200f --- /dev/null +++ b/docio/generateorderdetails/ProductDetails.java @@ -0,0 +1,44 @@ +package generateorderdetails; + +public class ProductDetails { + private String m_orderID; + private String m_product; + private String m_unitPrice; + private String m_quantity; + + public String getOrderID() throws Exception { + return m_orderID; + } + + public String setOrderID(String value) throws Exception { + m_orderID = value; + return value; + } + + public String getProduct() throws Exception { + return m_product; + } + + public String setProduct(String value) throws Exception { + m_product = value; + return value; + } + + public String getUnitPrice() throws Exception { + return m_unitPrice; + } + + public String setUnitPrice(String value) throws Exception { + m_unitPrice = value; + return value; + } + + public String getQuantity() throws Exception { + return m_quantity; + } + + public String setQuantity(String value) throws Exception { + m_quantity = value; + return value; + } +} diff --git a/docio/gettingstarted/GettingStarted.java b/docio/gettingstarted/GettingStarted.java new file mode 100644 index 0000000..6105c08 --- /dev/null +++ b/docio/gettingstarted/GettingStarted.java @@ -0,0 +1,134 @@ +package gettingstarted; + +import com.syncfusion.docio.FormatType; +import java.io.FileInputStream; +import java.io.File; + +import com.syncfusion.docio.*; + +public class GettingStarted { + + public static void main(String[] args) throws Exception { + //Create an instance of WordDocument Instance (Empty Word Document). + WordDocument document = new WordDocument(); + //Add a new section into the Word document. + IWSection section = document.addSection(); + //Specifies the page margins. + section.getPageSetup().getMargins().setAll(50f); + //Add a new simple paragraph into the section. + IWParagraph firstParagraph = section.addParagraph(); + //Set the paragraph's horizontal alignment as justify. + firstParagraph.getParagraphFormat().setHorizontalAlignment(HorizontalAlignment.Justify); + //Add a text range into the paragraph. + IWTextRange firstTextRange = firstParagraph.appendText("AdventureWorks Cycles,"); + //set the font formatting of the text range. + firstTextRange.getCharacterFormat().setBoldBidi(true); + firstTextRange.getCharacterFormat().setFontName("Calibri"); + firstTextRange.getCharacterFormat().setFontSize(14) ; + //Add another text range into the paragraph. + IWTextRange secondTextRange = firstParagraph.appendText(" the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company."); + //set the font formatting of the text range. + secondTextRange.getCharacterFormat().setFontName("Calibri"); + secondTextRange.getCharacterFormat().setFontSize(11); + //Add another paragraph and aligns it as a center. + IWParagraph paragraph = section.addParagraph(); + paragraph.getParagraphFormat().setHorizontalAlignment(HorizontalAlignment.Center); + //Set after spacing for paragraph. + paragraph.getParagraphFormat().setAfterSpacing(6); + //Add a picture into the paragraph. + IWPicture picture = paragraph.appendPicture(new FileInputStream(getDataDir("Image.png"))); + //Specify the size of the picture. + picture.setHeight(86); + picture.setWidth(81); + IWTable table = section.addTable(); + //Create the specified number of rows and columns. + table.resetCells(2,2); + //Access the instance of the cell (first row, first cell). + WTableCell firstCell = table.getRows().get(0).getCells().get(0); + //Specifies the width of the cell. + firstCell.setWidth(150); + //Add a paragraph into the cell; a cell must have atleast 1 paragraph. + paragraph=firstCell.addParagraph(); + IWTextRange textRange = paragraph.appendText("Profile picture"); + textRange.getCharacterFormat().setBold(true); + //Access the instance of cell (first row, second cell). + WTableCell secondCell = table.getRows().get(0).getCells().get(1); + secondCell.setWidth(330); + paragraph=secondCell.addParagraph(); + //Add text to the paragraph. + textRange=paragraph.appendText("Description"); + textRange.getCharacterFormat().setBold(true); + firstCell=table.getRows().get(1).getCells().get(0); + firstCell.setWidth(150); + //Add image to the paragraph. + paragraph=firstCell.addParagraph(); + //Set after spacing for paragraph. + paragraph.getParagraphFormat().setAfterSpacing(6); + IWPicture profilePicture = paragraph.appendPicture(new FileInputStream(getDataDir("Image.png"))); + //Set the height and width for the image. + profilePicture.setHeight(98); + profilePicture.setWidth(95); + //Access the instance of cell (second row, second cell) and adds text. + secondCell=table.getRows().get(1).getCells().get(1); + secondCell.setWidth(330); + paragraph=secondCell.addParagraph(); + textRange=paragraph.appendText("AdventureWorks Cycles, the fictitious company on which the AdventureWorks sample databases are based, is a large, multinational manufacturing company."); + paragraph=section.addParagraph(); + //Set before spacing for paragraph. + paragraph.getParagraphFormat().setBeforeSpacing(6); + paragraph.appendText("Level 0"); + //Apply the default numbered list formats. + paragraph.getListFormat().applyDefNumberedStyle(); + paragraph=section.addParagraph(); + paragraph.appendText("Level 1"); + //Specify the list format to continue from the last list. + paragraph.getListFormat().continueListNumbering(); + //Increment the list level. + paragraph.getListFormat().increaseIndentLevel(); + paragraph=section.addParagraph(); + paragraph.appendText("Level 0"); + //Decrement the list level. + paragraph.getListFormat().continueListNumbering(); + paragraph.getListFormat().decreaseIndentLevel(); + //Write the default bulleted list. + section.addParagraph(); + paragraph=section.addParagraph(); + paragraph.appendText("Level 0"); + //Apply the default bulleted list formats. + paragraph.getListFormat().applyDefBulletStyle(); + paragraph=section.addParagraph(); + paragraph.appendText("Level 1"); + //Specify the list format to continue from the last list. + paragraph.getListFormat().continueListNumbering(); + //Increment the list level. + paragraph.getListFormat().increaseIndentLevel(); + paragraph=section.addParagraph(); + paragraph.appendText("Level 0"); + //Specify the list format to continue from the last list. + paragraph.getListFormat().continueListNumbering(); + //Decrement the list level. + paragraph.getListFormat().decreaseIndentLevel(); + section.addParagraph(); + //Save the document in the given name and format. + document.save("Sample.docx",FormatType.Docx); + //Release the resources occupied by the WordDocument instance. + document.close(); + System.out.println("Word document generated successfully."); + } + + /** + * Get the file path + * + * @param path specifies the file path + */ + public static String getDataDir(String path) { + File dir = new File(System.getProperty("user.dir")); + if(!(dir.toString().endsWith("samples"))) + dir = dir.getParentFile(); + dir = new File(dir, "resources"); + dir = new File(dir, path); + if (dir.isDirectory() == false) + dir.mkdir(); + return dir.toString(); + } +} diff --git a/docio/resources/CustomerDetails.xml b/docio/resources/CustomerDetails.xml new file mode 100644 index 0000000..aa14c9a --- /dev/null +++ b/docio/resources/CustomerDetails.xml @@ -0,0 +1,251 @@ + + + + Paul Henriot +
59 rue de l'Abbaye
+ Reims + 51100 + France + 26.47.15.10 + + Paul Henriot + 10248 + 07/04/2018 + 08/01/2018 + 07/16/2018 + + 10248 + Queso Cabrales + $14.00 + 12 + + + 10248 + Singaporean Hokkien Fried Mee + $9.80 + 10 + + + 10248 + Mozzarella di Giovanni + $34.80 + 5 + + + + Paul Henriot + 10274 + 08/06/2018 + 09/03/2018 + 08/16/2018 + + 10274 + Fløtemysost + $17.20 + 20 + + + 10274 + Mozzarella di Giovanni + $27.80 + 7 + + + + Paul Henriot + 10295 + 09/02/2018 + 09/30/2018 + 09/10/2018 + + 10295 + Gnocchi di nonna Alice + $30.40 + 4 + + +
+ + Maria Anders +
Obere Str. 57
+ Berlin + 12209 + Germany + 030-0074321 + + Maria Anders + 10643 + 08/25/2018 + 09/22/2018 + 09/02/2018 + + 10643 + Rössle Sauerkraut + $45.60 + 15 + + + 10643 + Chartreuse verte + $18.00 + 21 + + + 10643 + Spegesild + $12.00 + 2 + + + + Maria Anders + 10702 + 10/13/2018 + 11/24/2018 + 10/21/2018 + + 10702 + Aniseed Syrup + $10.00 + 6 + + + 10702 + Lakkalikööri + $18.00 + 15 + + +
+ + Pedro Afonso +
Av. dos Lusíadas, 23
+ São Paulo + 05432-043 + Brazil + (11) 555-7647 + + Pedro Afonso + 10290 + 08/27/2018 + 09/24/2018 + 09/03/2018 + + 10290 + Chef Anton's Gumbo Mix + $17.00 + 20 + + + 10290 + Thüringer Rostbratwurst + $99.00 + 15 + + + 10290 + Maxilaku + $16.00 + 15 + + + + Pedro Afonso + 10969 + 03/23/2019 + 04/20/2019 + 03/30/2019 + + 10969 + Spegesild + $12.00 + 9 + + +
+ + Alexander Feuer +
Heerstr. 22
+ Leipzig + 04179 + Germany + 0342-023176 + + Alexander Feuer + 10277 + 08/09/2018 + 09/06/2018 + 08/13/2018 + + 10277 + Rössle Sauerkraut + $36.40 + 20 + + + 10277 + Tarte au sucre + $39.40 + 12 + + +
+ + Sergio Gutiérrez +
Av. del Libertador 900
+ Buenos Aires + 1010 + Argentina + (1) 123-5555 + + Sergio Gutiérrez + 10716 + 10/24/2018 + 11/21/2018 + 10/27/2018 + + 10716 + Sir Rodney's Scones + $10.00 + 5 + + + 10716 + Manjimup Dried Apples + $53.00 + 7 + + + 10716 + Sirop d'érable + $28.50 + 10 + + + + Sergio Gutiérrez + 10916 + 02/27/2019 + 03/27/2019 + 03/09/2019 + + 10916 + Pavlova + $17.45 + 6 + + + 10916 + Mascarpone Fabioli + $32.00 + 6 + + + 10916 + Ravioli Angelo + $19.50 + 20 + + +
+
\ No newline at end of file diff --git a/docio/resources/Image.png b/docio/resources/Image.png new file mode 100644 index 0000000000000000000000000000000000000000..5e610f0d504ec4855e9ec6e126073e857229c912 GIT binary patch literal 5346 zcmcgwXFQwV+qaVLF^@}$rI_4D?5aqe@j&wcIhIoIbpC&|pj0K&|}OhZEhxpnh~1$93DJHSlT zZ{nt{26ejNfAb!ShQ^opchHW_zUQK$xs-kD2EsD5;0MLg->Qor^mD~DM&&t9*w9?3 zE84S$p}|?~Ok&5hTT3=h)8&n3Ouz`2`%}%m_FT0u$JXw)1uYYvpoLT(%rfB_B=yhI2$JMYPWH-JwG3{t0)s73^WK3m)=3I2JQAmoi}~GLgs*S4@nS((?IBw6vRNIm*zlM$`9O0T=yxF>Q-*Aq=}WMF@fz$B(#LM ziy(3LX510A&CHMeI>ukIc^!rp12=G>|Fp1*?0&zRJ^&J09fx<3IVhB@JdI+(~5*0*MzHf~FF$qe0V zKS_?Zc9K*1T7lL2v_CKr^P(j9e5cf=tLOmw{?D0oYTX zS6l$bH8N4I`kUZ%`JK{kF|QYDG>#hwnXAj zCmkz&4h;pt-rLPqGf}&c#X-9{r?=V9Mh5exwmj{uPMe8a_nIpw_O+V#cnq@gjEaQm zFBIdYp0X&nTnmGY8anhQBxqi=tJ{`5^Q5=(BfhygWNhlR+9>EB$3MQtV@4iT%0Ino z)k83tdZH`i0$Zbxr5kCC?S1!jf;4{t;?i4*FQH4 zFj2oyIj@Ke9$cq0G8IWGFPbi>kCeL#F9&lV3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 HcmV?d00001 diff --git a/docio/resources/Template.docx b/docio/resources/Template.docx new file mode 100644 index 0000000000000000000000000000000000000000..43f58babf20e417727fca2a94d37b4949afed7e0 GIT binary patch literal 34729 zcmeFXbyQqm(_iWt9PGOwd<*>ed;;tN^tPF07L*X005u@tdvmSkwEPg{vXEmxDcJF+40|ApjP-{{M{sjd!3WZAx{B^S#W2{EPG;4y4w4e|ashA65=HlL>_ANmAYZZE&-ei+`#oOsxixN|(hgg^K-lHyMOd2jxbC%N1=6 zm=cW)M{DJKKO(+(@OB+U%_9>_*NCpVUBg#?!6OuPI&+o2wxKc`FkAd$F`}H7CTX~f z#P<&MO^K$4O_MtD+_(0Kqp6`RT3+`7Y@iz;jUk6!H3M_B^YZGsmLv0>>KL$sQ5)QD= z^TFb8@TG{|kMQP@w?(%Nkyb8g{u>5hLo!_zd7wU|r0oD5p%5QP{0h1rZVIG2p3{4f zqI6KR&Oh1t=-|qnEPOKaMQvmC^Mx$0qS-Uv&oylnkYZY^>U@Kwd>xS78m$Oys5(7E|WFyXMNe@1`08 ziPN<(qI*!5AB~3epS!&PX<^-ETwcrH_R({W?=4>^X%v_yLt=FCqGyQ_lfaRg)BQL{ z%pdQMD$s1GnPz{R(KeUlJ8P{xWcu?IW^pYo+sf!`&t@c>p@PU zkBKDsuc&lejQ5;Kat$SKpe5{oj*pdMi+m~q06^sk0KkH7il>u{IfuEEnY#nD!u?a) zF2r=>59B@G5PgxP3S_OKo~f0W1MRe6mc)d#mKG%-Me>%>?9sUL%o$wh;CJHT3A=ql zlexnj_;uKyaX(k4rv8%6`0;i4K!3j$3;p$MHeo8V6LW!8dH)Z}Lr@;43 zU(YNl(u*?abzO1-fXPR^ojn*mU!M|7A*ohE_{Oyh!)Q(D`Bq(^o*WfM!K+3JUI}-K zubi-qsy$&j#{*^vAsZx-yi4Wh^pySp%EH7Gen}LckmL&FYK#y2lpg|@5NT})OWB4e zhA2TfiK!-up(^s{obn`#Hl0EPDO&G`rZ;E}yM%mIuF91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VpNWNCU$q~aFymKI{`a21xk$`mf* zZ)UKht};{CvEksAKD5)FXsW$6NVaZVtNanRKQd5K7fx$SA6;KV7mGeZcm*cjczr;Y z7y3CaIJ(>^_AoU{yfI8~5Wk4gln>YIi&$SwYt;;*UAEVG4|%4>Two7UplyEVWugHu z9TOTzeQLgRmsyZYQo$>bd(xW%qyPS^3xcIE=>g9x>jE<=AjyJ7H(-(!HIAr-K`(%!q;4NEISBG6MJBo z(DEij$dC0oHa#_;<1mzW)c1s885vWImp;MT`1HRchz@O_5$x_@7-D4;f z-+%>HaS5g0|8NELD@KT_1`7pIETG7s7K$u{f+2jd3h|J^`WFTKv(gr|w{wA{Ki60F zbTD<+{ew{yW&X1Rl6ZpV3kXIYvK~M*nSVSwAz%4tzL$UHc=;Xpd%pF*k!z5#{8#q% z-{Jq6UgmEw6ci)LU-17+vYFp|`aN&R-+kr0`>Ut_$RhGP{`Wi&f8&`b{=)w=>%;Hx z-vjgi4ey}(3;vHV{ePnW@8Q+|Msv{qh5oN#>%WiScQ@g``>4_UtB>EEhJWwkcPFdA zyJ$4{tBZfST>TFJ-H!e@9K-zI@c*%@{|^3r5Art{)9WwrZ#$CTd-z@1{<{Zj@4tF5 zgD}GXsNTQh|5GRW8w~~Z+7Alqzci%Z;s3cd{S)5q{}1?IE0v Date: Mon, 12 Oct 2020 21:05:50 +0530 Subject: [PATCH 2/4] Fixed the alignment issues in code example --- .../GenerateOrderDetails.java | 23 ------------------- docio/gettingstarted/GettingStarted.java | 14 +++++------ 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/docio/generateorderdetails/GenerateOrderDetails.java b/docio/generateorderdetails/GenerateOrderDetails.java index d798141..ee88af3 100644 --- a/docio/generateorderdetails/GenerateOrderDetails.java +++ b/docio/generateorderdetails/GenerateOrderDetails.java @@ -61,12 +61,10 @@ private static MailMergeDataTable getMailMergeDataTable() throws Exception { if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { case "Customers": - customers.add(getCustomer(reader)); break; } } else - { reader.read(); if ((reader.getLocalName() == "CustomerDetails") @@ -106,40 +104,31 @@ private static CustomerDetails getCustomer(XmlReaderSupport reader) throws Excep if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { case "CustomerName": - customer.setCustomerName(reader.readContentAsString()); break; case "Address": - customer.setAddress(reader.readContentAsString()); break; case "City": - customer.setCity(reader.readContentAsString()); break; case "PostalCode": - customer.setPostalCode(reader.readContentAsString()); break; case "Country": - customer.setCountry(reader.readContentAsString()); break; case "Phone": - customer.setPhone(reader.readContentAsString()); break; case "Orders": - customer.getOrders().add(getOrder(reader)); break; default: - reader.skip(); break; } } else - { reader.read(); if ((reader.getLocalName() == "Customers") @@ -174,33 +163,26 @@ private static OrderDetails getOrder(XmlReaderSupport reader) throws Exception { if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { case "CustomerName": - order.setCustomerName(reader.readContentAsString()); break; case "OrderID": - order.setOrderID(reader.readContentAsString()); break; case "OrderDate": - order.setOrderDate(reader.readContentAsString()); break; case "ExpectedDeliveryDate": - order.setExpectedDeliveryDate(reader.readContentAsString()); break; case "ShippedDate": - order.setShippedDate(reader.readContentAsString()); break; case "Products": - order.getProducts().add(getProduct(reader)); break; } reader.read(); } else - { reader.read(); if ((reader.getLocalName() == "Orders") @@ -235,25 +217,20 @@ private static ProductDetails getProduct(XmlReaderSupport reader) throws Excepti if (reader.getNodeType().getEnumValue() != XmlNodeType.EndElement.getEnumValue()) { switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { case "OrderID": - product.setOrderID(reader.readContentAsString()); break; case "Product": - product.setProduct(reader.readContentAsString()); break; case "UnitPrice": - product.setUnitPrice(reader.readContentAsString()); break; case "Quantity": - product.setQuantity(reader.readContentAsString()); break; } reader.read(); } else - { reader.read(); if ((reader.getLocalName() == "Products") diff --git a/docio/gettingstarted/GettingStarted.java b/docio/gettingstarted/GettingStarted.java index 6105c08..bc35b32 100644 --- a/docio/gettingstarted/GettingStarted.java +++ b/docio/gettingstarted/GettingStarted.java @@ -12,12 +12,12 @@ public static void main(String[] args) throws Exception { //Create an instance of WordDocument Instance (Empty Word Document). WordDocument document = new WordDocument(); //Add a new section into the Word document. - IWSection section = document.addSection(); - //Specifies the page margins. + IWSection section = document.addSection(); + //Specifies the page margins. section.getPageSetup().getMargins().setAll(50f); //Add a new simple paragraph into the section. IWParagraph firstParagraph = section.addParagraph(); - //Set the paragraph's horizontal alignment as justify. + //Set the paragraph's horizontal alignment as justify. firstParagraph.getParagraphFormat().setHorizontalAlignment(HorizontalAlignment.Justify); //Add a text range into the paragraph. IWTextRange firstTextRange = firstParagraph.appendText("AdventureWorks Cycles,"); @@ -34,7 +34,7 @@ public static void main(String[] args) throws Exception { IWParagraph paragraph = section.addParagraph(); paragraph.getParagraphFormat().setHorizontalAlignment(HorizontalAlignment.Center); //Set after spacing for paragraph. - paragraph.getParagraphFormat().setAfterSpacing(6); + paragraph.getParagraphFormat().setAfterSpacing(6); //Add a picture into the paragraph. IWPicture picture = paragraph.appendPicture(new FileInputStream(getDataDir("Image.png"))); //Specify the size of the picture. @@ -101,7 +101,7 @@ public static void main(String[] args) throws Exception { //Specify the list format to continue from the last list. paragraph.getListFormat().continueListNumbering(); //Increment the list level. - paragraph.getListFormat().increaseIndentLevel(); + paragraph.getListFormat().increaseIndentLevel(); paragraph=section.addParagraph(); paragraph.appendText("Level 0"); //Specify the list format to continue from the last list. @@ -123,8 +123,8 @@ public static void main(String[] args) throws Exception { */ public static String getDataDir(String path) { File dir = new File(System.getProperty("user.dir")); - if(!(dir.toString().endsWith("samples"))) - dir = dir.getParentFile(); + if(!(dir.toString().endsWith("samples"))) + dir = dir.getParentFile(); dir = new File(dir, "resources"); dir = new File(dir, path); if (dir.isDirectory() == false) From 7340f69ae1737bf7c57f255966dfe1cc52549fa8 Mon Sep 17 00:00:00 2001 From: Suriya Balamurugan Date: Mon, 12 Oct 2020 22:13:40 +0530 Subject: [PATCH 3/4] Added comments for the code example --- docio/generateorderdetails/GenerateOrderDetails.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docio/generateorderdetails/GenerateOrderDetails.java b/docio/generateorderdetails/GenerateOrderDetails.java index ee88af3..4cc6df0 100644 --- a/docio/generateorderdetails/GenerateOrderDetails.java +++ b/docio/generateorderdetails/GenerateOrderDetails.java @@ -20,18 +20,20 @@ public class GenerateOrderDetails { public static void main(String[] args) throws Exception { - // Creates a new document + //Creates new Word document instance for Word processing. WordDocument document = new WordDocument(); - // Loads template + //Opens the template Word document. String basePath = getDataDir("Template.docx"); document.open(basePath, FormatType.Docx); - // Retrieves the mail merge data + //Retrieves the mail merge data. MailMergeDataTable dataTable = getMailMergeDataTable(); - // Executes nested Mail merge using implicit relational data + //Executes nested Mail merge using implicit relational data. document.getMailMerge().executeNestedGroup(dataTable); - // Removes empty page at the end of Word document + //Removes empty page at the end of Word document. removeEmptyPage(document); + //Save the document in the given name and format. document.save("Sample.docx", FormatType.Docx); + //Release the resources occupied by the WordDocument instance. System.out.println("Word document generated successfully."); } From a08bb3788cb1254804cef9fc309a24fd77fa3848 Mon Sep 17 00:00:00 2001 From: Suriya Balamurugan Date: Tue, 13 Oct 2020 13:22:51 +0530 Subject: [PATCH 4/4] Addressed the feedback suggested --- .../GenerateOrderDetails.java | 277 ++++++++++-------- docio/gettingstarted/GettingStarted.java | 13 +- 2 files changed, 161 insertions(+), 129 deletions(-) diff --git a/docio/generateorderdetails/GenerateOrderDetails.java b/docio/generateorderdetails/GenerateOrderDetails.java index 4cc6df0..98a7d6e 100644 --- a/docio/generateorderdetails/GenerateOrderDetails.java +++ b/docio/generateorderdetails/GenerateOrderDetails.java @@ -2,7 +2,6 @@ import java.io.FileInputStream; import com.syncfusion.docio.*; -import com.syncfusion.javahelper.system.ObjectSupport; import com.syncfusion.javahelper.system.RefSupport; import com.syncfusion.javahelper.system.StringSupport; import com.syncfusion.javahelper.system.collections.DictionaryEntrySupport; @@ -17,9 +16,11 @@ import com.syncfusion.javahelper.system.xml.XmlReaderSupport; import java.io.File; -public class GenerateOrderDetails { +public class GenerateOrderDetails +{ - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws Exception + { //Creates new Word document instance for Word processing. WordDocument document = new WordDocument(); //Opens the template Word document. @@ -34,6 +35,7 @@ public static void main(String[] args) throws Exception { //Save the document in the given name and format. document.save("Sample.docx", FormatType.Docx); //Release the resources occupied by the WordDocument instance. + document.close(); System.out.println("Word document generated successfully."); } @@ -42,40 +44,47 @@ public static void main(String[] args) throws Exception { * Gets the mail merge data table. * * @return - * @exception System.Exception reader - * @exception XmlException Unexpected xml tag + reader.LocalName */ - private static MailMergeDataTable getMailMergeDataTable() throws Exception { - // Gets the employee details implicit as "IEnumerable" collection. + private static MailMergeDataTable getMailMergeDataTable() throws Exception + { + //Gets the customer details implicit as "IEnumerable" collection. ListSupport customers = new ListSupport(CustomerDetails.class); + FileStreamSupport stream = new FileStreamSupport(getDataDir("CustomerDetails.xml"), FileMode.OpenOrCreate); + XmlReaderSupport reader = XmlReaderSupport.create(stream); - if (reader == null) - throw new Exception("reader"); + while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) reader.read(); - if (!(reader.getLocalName() == "CustomerDetails")) - throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) reader.read(); - while (!(reader.getLocalName() == "CustomerDetails")) { - if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { - switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { - case "Customers": - customers.add(getCustomer(reader)); - break; + + while (!(reader.getLocalName() == "CustomerDetails")) + { + if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) + { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) + { + case "Customers": + customers.add(getCustomer(reader)); + break; } - } else + } + else { reader.read(); if ((reader.getLocalName() == "CustomerDetails") - && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) break; } } + reader.close(); stream.close(); + // Creates an instance of "MailMergeDataTable" by specifying mail merge group // name and "IEnumerable" collection. MailMergeDataTable dataTable = new MailMergeDataTable("Customers", customers); @@ -88,53 +97,56 @@ private static MailMergeDataTable getMailMergeDataTable() throws Exception { * * @param reader The reader. * @return - * @exception System.Exception reader - * @exception XmlException Unexpected xml tag + reader.LocalName */ - private static CustomerDetails getCustomer(XmlReaderSupport reader) throws Exception { - if (reader == null) - throw new Exception("reader"); + private static CustomerDetails getCustomer(XmlReaderSupport reader) throws Exception + { while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) reader.read(); - if (!(reader.getLocalName() == "Customers")) - throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) reader.read(); + CustomerDetails customer = new CustomerDetails(); - while (!(reader.getLocalName() == "Customers")) { - if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { - switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { - case "CustomerName": - customer.setCustomerName(reader.readContentAsString()); - break; - case "Address": - customer.setAddress(reader.readContentAsString()); - break; - case "City": - customer.setCity(reader.readContentAsString()); - break; - case "PostalCode": - customer.setPostalCode(reader.readContentAsString()); - break; - case "Country": - customer.setCountry(reader.readContentAsString()); - break; - case "Phone": - customer.setPhone(reader.readContentAsString()); - break; - case "Orders": - customer.getOrders().add(getOrder(reader)); - break; - default: - reader.skip(); - break; + + while (!(reader.getLocalName() == "Customers")) + { + if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) + { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) + { + case "CustomerName": + customer.setCustomerName(reader.readContentAsString()); + break; + case "Address": + customer.setAddress(reader.readContentAsString()); + break; + case "City": + customer.setCity(reader.readContentAsString()); + break; + case "PostalCode": + customer.setPostalCode(reader.readContentAsString()); + break; + case "Country": + customer.setCountry(reader.readContentAsString()); + break; + case "Phone": + customer.setPhone(reader.readContentAsString()); + break; + case "Orders": + customer.getOrders().add(getOrder(reader)); + break; + default: + reader.skip(); + break; } - } else + } + else { reader.read(); if ((reader.getLocalName() == "Customers") - && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) break; } } @@ -147,48 +159,51 @@ private static CustomerDetails getCustomer(XmlReaderSupport reader) throws Excep * * @param reader The reader. * @return - * @exception System.Exception reader - * @exception XmlException Unexpected xml tag + reader.LocalName */ - private static OrderDetails getOrder(XmlReaderSupport reader) throws Exception { - if (reader == null) - throw new Exception("reader"); + private static OrderDetails getOrder(XmlReaderSupport reader) throws Exception + { while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) reader.read(); - if (!(reader.getLocalName() == "Orders")) - throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) reader.read(); + OrderDetails order = new OrderDetails(); - while (!(reader.getLocalName() == "Orders")) { - if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) { - switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { - case "CustomerName": - order.setCustomerName(reader.readContentAsString()); - break; - case "OrderID": - order.setOrderID(reader.readContentAsString()); - break; - case "OrderDate": - order.setOrderDate(reader.readContentAsString()); - break; - case "ExpectedDeliveryDate": - order.setExpectedDeliveryDate(reader.readContentAsString()); - break; - case "ShippedDate": - order.setShippedDate(reader.readContentAsString()); - break; - case "Products": - order.getProducts().add(getProduct(reader)); - break; + + while (!(reader.getLocalName() == "Orders")) + { + if (reader.getNodeType().getEnumValue() == XmlNodeType.Element.getEnumValue()) + { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) + { + case "CustomerName": + order.setCustomerName(reader.readContentAsString()); + break; + case "OrderID": + order.setOrderID(reader.readContentAsString()); + break; + case "OrderDate": + order.setOrderDate(reader.readContentAsString()); + break; + case "ExpectedDeliveryDate": + order.setExpectedDeliveryDate(reader.readContentAsString()); + break; + case "ShippedDate": + order.setShippedDate(reader.readContentAsString()); + break; + case "Products": + order.getProducts().add(getProduct(reader)); + break; } reader.read(); - } else + } + else { reader.read(); if ((reader.getLocalName() == "Orders") - && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) break; } } @@ -201,42 +216,45 @@ private static OrderDetails getOrder(XmlReaderSupport reader) throws Exception { * * @param reader The reader. * @return - * @exception System.Exception reader - * @exception XmlException Unexpected xml tag + reader.LocalName */ - private static ProductDetails getProduct(XmlReaderSupport reader) throws Exception { - if (reader == null) - throw new Exception("reader"); + private static ProductDetails getProduct(XmlReaderSupport reader) throws Exception + { while (reader.getNodeType().getEnumValue() != XmlNodeType.Element.getEnumValue()) reader.read(); - if (!(reader.getLocalName() == "Products")) - throw new Exception("Unexpected xml tag " + reader.getLocalName()); + reader.read(); + while (reader.getNodeType().getEnumValue() == XmlNodeType.Whitespace.getEnumValue()) reader.read(); + ProductDetails product = new ProductDetails(); - while (!(reader.getLocalName() == "Products")) { - if (reader.getNodeType().getEnumValue() != XmlNodeType.EndElement.getEnumValue()) { - switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) { - case "OrderID": - product.setOrderID(reader.readContentAsString()); - break; - case "Product": - product.setProduct(reader.readContentAsString()); - break; - case "UnitPrice": - product.setUnitPrice(reader.readContentAsString()); - break; - case "Quantity": - product.setQuantity(reader.readContentAsString()); - break; + + while (!(reader.getLocalName() == "Products")) + { + if (reader.getNodeType().getEnumValue() != XmlNodeType.EndElement.getEnumValue()) + { + switch ((reader.getLocalName()) == null ? "string_null_value" : (reader.getLocalName())) + { + case "OrderID": + product.setOrderID(reader.readContentAsString()); + break; + case "Product": + product.setProduct(reader.readContentAsString()); + break; + case "UnitPrice": + product.setUnitPrice(reader.readContentAsString()); + break; + case "Quantity": + product.setQuantity(reader.readContentAsString()); + break; } reader.read(); - } else + } + else { reader.read(); if ((reader.getLocalName() == "Products") - && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) + && reader.getNodeType().getEnumValue() == XmlNodeType.EndElement.getEnumValue()) break; } } @@ -249,27 +267,39 @@ private static ProductDetails getProduct(XmlReaderSupport reader) throws Excepti * * @param document The Word document */ - private static void removeEmptyPage(WordDocument document) throws Exception { + private static void removeEmptyPage(WordDocument document) throws Exception + { WTextBody textBody = document.getLastSection().getBody(); + + //A flag to determine any renderable item found in the Word document. boolean IsRenderableItem = false; - for (int itemIndex = textBody.getChildEntities().getCount() - 1; itemIndex >= 0 - && !IsRenderableItem; itemIndex--) { - if (textBody.getChildEntities().get(itemIndex) instanceof WParagraph) { - WParagraph paragraph = (WParagraph) ObjectSupport.instanceOf(textBody.getChildEntities().get(itemIndex), - WParagraph.class); - for (int pIndex = paragraph.getItems().getCount() - 1; pIndex >= 0; pIndex--) { + //Iterates text body items. + for (int itemIndex = textBody.getChildEntities().getCount() - 1; itemIndex >= 0 && !IsRenderableItem; itemIndex--) + { + //Check item is empty paragraph and removes it. + if (textBody.getChildEntities().get(itemIndex) instanceof WParagraph) + { + WParagraph paragraph = (WParagraph) textBody.getChildEntities().get(itemIndex); + //Iterates into paragraph + for (int pIndex = paragraph.getItems().getCount() - 1; pIndex >= 0; pIndex--) + { ParagraphItem paragraphItem = paragraph.getItems().get(pIndex); - if ((paragraphItem instanceof Break - && ((Break) ObjectSupport.instanceOf(paragraphItem, Break.class)).getBreakType() - .getEnumValue() == BreakType.PageBreak.getEnumValue())) - paragraph.getItems().removeAt(pIndex); - else - if (!(paragraphItem instanceof BookmarkStart || paragraphItem instanceof BookmarkEnd)) { + //If page break found in end of document, then remove it to preserve contents in same page + if ((paragraphItem instanceof Break + && ((Break) paragraphItem).getBreakType().getEnumValue() == BreakType.PageBreak.getEnumValue())) + { + paragraph.getItems().removeAt(pIndex); + } + //Check paragraph contains any renderable items. + else if (!(paragraphItem instanceof BookmarkStart || paragraphItem instanceof BookmarkEnd)) + { IsRenderableItem = true; + //Found renderable item and break the iteration. break; } } + //Remove empty paragraph and the paragraph with bookmarks only if (paragraph.getItems().getCount() == 0 || !IsRenderableItem) textBody.getChildEntities().removeAt(itemIndex); } @@ -281,7 +311,8 @@ private static void removeEmptyPage(WordDocument document) throws Exception { * * @param path specifies the file path */ - public static String getDataDir(String path) { + public static String getDataDir(String path) + { File dir = new File(System.getProperty("user.dir")); if (!(dir.toString().endsWith("samples"))) dir = dir.getParentFile(); diff --git a/docio/gettingstarted/GettingStarted.java b/docio/gettingstarted/GettingStarted.java index bc35b32..2f08feb 100644 --- a/docio/gettingstarted/GettingStarted.java +++ b/docio/gettingstarted/GettingStarted.java @@ -3,12 +3,12 @@ import com.syncfusion.docio.FormatType; import java.io.FileInputStream; import java.io.File; - import com.syncfusion.docio.*; public class GettingStarted { - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws Exception + { //Create an instance of WordDocument Instance (Empty Word Document). WordDocument document = new WordDocument(); //Add a new section into the Word document. @@ -121,14 +121,15 @@ public static void main(String[] args) throws Exception { * * @param path specifies the file path */ - public static String getDataDir(String path) { + public static String getDataDir(String path) + { File dir = new File(System.getProperty("user.dir")); - if(!(dir.toString().endsWith("samples"))) - dir = dir.getParentFile(); + if(!(dir.toString().endsWith("samples"))) + dir = dir.getParentFile(); dir = new File(dir, "resources"); dir = new File(dir, path); if (dir.isDirectory() == false) - dir.mkdir(); + dir.mkdir(); return dir.toString(); } }