View convert-MD-to-PDF.java
// Load input MD file and Convert Markdown to HTML document | |
Converter.convertMarkdown(dataDir + "document.md", dataDir + "document.html"); | |
// Convert HTML file to output PDF file format | |
Converter.convertHTML(dataDir + "document.html", new PdfSaveOptions(), dataDir + "output_md.pdf"); |
View add-image-pdf.cs
// For complete examples and data files, please go to https://github.com/aspose-pdf/Aspose.PDF-for-.NET | |
// Open document | |
Document pdfDocument = new Document("AddImage.pdf"); | |
// Set coordinates | |
int lowerLeftX = 100; | |
int lowerLeftY = 100; | |
int upperRightX = 200; | |
int upperRightY = 200; |
View close-streams.cs
// Close streams | |
pdfFileStream.Close(); | |
pdfStream.Close(); |
View Create-KML-file.cs
// Create a layer | |
using (var layer = Drivers.Kml.CreateLayer(dataDir + "Kml_File_out.kml")) | |
{ | |
// Initialize feature for geometry and attributes | |
layer.Attributes.Add(new FeatureAttribute("string_data", AttributeDataType.String)); | |
layer.Attributes.Add(new FeatureAttribute("int_data", AttributeDataType.Integer)); | |
layer.Attributes.Add(new FeatureAttribute("bool_data", AttributeDataType.Boolean)); | |
layer.Attributes.Add(new FeatureAttribute("float_data", AttributeDataType.Double)); | |
// Set value of different attributes |
View excel-to-pdf-compliance.cpp
// Source directory path. | |
StringPtr srcDir = new String("..\\Data\\01_SourceDirectory\\"); | |
// Output directory path. | |
StringPtr outDir = new String("..\\Data\\02_OutputDirectory\\"); | |
// Path of input Excel file | |
StringPtr sampleConvertExcelWorkbookToPDF = srcDir->StringAppend(new String("sampleConvertExcelWorkbookToPDF.xlsx")); | |
// Path of output Pdf file |
View CSVtoExcel.java
// Opening CSV Files | |
// Creating CSV LoadOptions object | |
LoadOptions loadOptions = new LoadOptions(FileFormatType.CSV); | |
// Creating an Workbook object with CSV file path and the loadOptions | |
// object | |
Workbook workbook = new Workbook(dataDir + "Book_CSV.csv", loadOptions); | |
workbook.save(dataDir + "CSVtoExcel.xlsx" , SaveFormat.XLSX); |
View ApplyAutofilter.cs
// Instantiating a Workbook object | |
// Opening the Excel file through the file stream | |
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(dataDir + "book1.xls"); | |
// Accessing the first worksheet in the Excel file | |
Aspose.Cells.Worksheet worksheet = workbook.Worksheets[0]; | |
// Creating AutoFilter by giving the cells range of the heading row | |
worksheet.AutoFilter.Range = "A1:B1"; |
View FormattedTableBuilder.cpp
System::SharedPtr<Document> doc = System::MakeObject<Document>(); | |
System::SharedPtr<DocumentBuilder> builder = System::MakeObject<DocumentBuilder>(doc); | |
System::SharedPtr<Table> table = builder->StartTable(); | |
// Make the header row. | |
builder->InsertCell(); | |
// Set the left indent for the table. Table wide formatting must be applied after | |
// At least one row is present in the table. | |
table->set_LeftIndent(20.0); |
View AllChartImage.java
// Load input XLSX file | |
Workbook workbook = new Workbook(dataDir + "SampleExcel.xlsx"); | |
for (int sheet = 0 ; sheet < workbook.getWorksheets().getCount() ; sheet++) | |
{ | |
// Access required worksheet | |
Worksheet worksheet = workbook.getWorksheets().get(sheet); | |
for (int i =0 ; i<worksheet.getCharts().getCount() ; i++) | |
{ |
View Convert_PDF_Text_Pure.cs
// Open document | |
Document pdfDocument = new Document(dataDir + "MultiColumnPdf.pdf"); | |
StringBuilder builder = new StringBuilder(); | |
// String to hold extracted text | |
string extractedText = ""; | |
foreach (Page pdfPage in pdfDocument.Pages) | |
{ | |
using (MemoryStream textStream = new MemoryStream()) | |
{ |
NewerOlder