Rendera MD till XAMLFLOW på Android via Java

Konvertera MD till XAMLFLOW i mobilappar utan att installera någon programvara

 

Du kan integrera konverteringsfunktionen MD till XAMLFLOW i dina mobilappar genom att använda två API:er av paketet Aspose.Total for Android Java . Först måste du konvertera MD-filen till DOC med Aspose.PDF for Android via Java . För det andra, genom att använda Word Processing API Aspose.Words for Android via Java , kan du rendera DOC till XAMLFLOW.

Konvertera MD till XAMLFLOW på Android via Java

  1. Öppna MD-filen med klassen Document
  2. Konvertera MD till DOC genom att använda save metod
  3. Ladda DOC-fil genom att använda klassen Document av Aspose.Words
  4. Spara dokumentet i XAMLFLOW-format med metoden save och ställ in XAMLFLOW som SaveFormat

Konverteringskrav

Du kan enkelt använda Aspose.Total for Android via Java direkt från Maven och installera Aspose.PDF for Android via Java och Aspose.Words for Android via Java i dina applikationer.

Alternativt kan du få en ZIP-fil från downloads .

// load MD file with an instance of Document class
Document document = new Document("template.md");
// save MD as a DOC 
document.save("DocOutput.doc", SaveFormat.DOC); 
// load DOC with an instance of Document
Document outputDocument = new com.aspose.words.Document("DocOutput.doc");
// call save method while passing SaveFormat.XAML_FLOW
outputDocument.save("output.xaml_flow", SaveFormat.XAML_FLOW);   

Få MD-filinformation på Android via Java

Innan du konverterar MD till XAMLFLOW kan du behöva information om dokumentet, inklusive författare, skapelsedatum, nyckelord, ändringsdatum, ämne och titel. Denna information är användbar för beslutsfattande för konverteringsprocessen. Genom att använda det kraftfulla Aspose.PDF for Android via Java API kan du få allt. För att få filspecifik information om en MD-fil, skaffa först objektet DocumentInfo med getInfo metod. När DocumentInfo-objektet är hämtat kan du få värdena för de enskilda egenskaperna.

// load MD document
Document doc = new Document("template.md");
// get document information
DocumentInfo docInfo = doc.getInfo();
// show document information
System.out.println("Author: " + docInfo.getAuthor());
System.out.println("Creation Date: " + docInfo.getCreationDate());
System.out.println("Keywords: " + docInfo.getKeywords());
System.out.println("Modify Date: " + docInfo.getModDate());
System.out.println("Subject: " + docInfo.getSubject());
System.out.println("Title: " + docInfo.getTitle());

Infoga slutanteckningar i XAMLFLOW-dokument i Android via Java

Förutom dokumentkonvertering kan du också lägga till en massa andra funktioner i dina Android-applikationer med Aspose.Words for Android via Java API. En av dessa funktioner är att infoga slutanteckningar och numrering i XAMLFLOW-dokument. Om du vill infoga en fotnot eller en slutnot i ett XAMLFLOW-dokument, använd metoden DocumentBuilder.InsertFootnote. Denna metod infogar en fotnot eller slutnot i dokumentet. Klasserna EndnoteOptions och FootnoteOptions representerar numreringsalternativ för fotnot och slutnot.

// load document
Document doc = new Document("input.DOC");
// initialize document builder
DocumentBuilder builder = new DocumentBuilder(doc);
// add text in it
builder.write("Some text");
// insert footnote
builder.insertFootnote(FootnoteType.ENDNOTE, "Endnote text.");
// initialize endnote options
EndnoteOptions option = doc.getEndnoteOptions();
// set restart rule
option.setRestartRule(FootnoteNumberingRule.RESTART_PAGE);
// set position
option.setPosition(EndnotePosition.END_OF_SECTION);
// save the document to disk.
doc.save("output.xaml_flow", SaveFormat.XAML_FLOW);  

Explore MD Conversion Options with Android

Konvertera MDs till DOCM (Microsoft Word 2007 Marco File)
Konvertera MDs till DOT (Microsoft Word Template Files)
Konvertera MDs till DOTM (Microsoft Word 2007+ Template File)
Konvertera MDs till DOTX (Microsoft Word Template File)
Konvertera MDs till FLATOPC (Microsoft Word 2003 WordprocessingML)
Konvertera MDs till GIF (Graphical Interchange Format)
Konvertera MDs till MHTML (Web Page Archive Format)
Konvertera MDs till ODT (OpenDocument Text File Format)
Konvertera MDs till OTT (OpenDocument Standard Format)
Konvertera MDs till PCL (Printer Command Language Document)
Konvertera MDs till PS (PostScript File)
Konvertera MDs till RTF (Rich Text Format)
Konvertera MDs till WORDML (Microsoft Word 2003 WordprocessingML)
Konvertera MDs till ODP (OpenDocument Presentation Format)
Konvertera MDs till OTP (OpenDocument Standard Format)
Konvertera MDs till POT (Microsoft PowerPoint Template Files)
Konvertera MDs till POTM (Microsoft PowerPoint Template File)
Konvertera MDs till POTX (Microsoft PowerPoint Template Presentation)
Konvertera MDs till PPS (PowerPoint Slide Show)
Konvertera MDs till PPSM (Macro-enabled Slide Show)
Konvertera MDs till PPSX (PowerPoint Slide Show)
Konvertera MDs till PPT (Microsoft PowerPoint 97-2003)
Konvertera MDs till PPTM (Macro-enabled Presentation File)
Konvertera MDs till SWF (Shockwave Flash Movie)
Konvertera MDs till CSV (Comma Seperated Values)
Konvertera MDs till DIF (Data Interchange Format)
Konvertera MDs till EXCEL (Spreadsheet File Formats)
Konvertera MDs till FODS (OpenDocument Flat XML Spreadsheet)
Konvertera MDs till ODS (OpenDocument Spreadsheet)
Konvertera MDs till SXC (StarOffice Calc Spreadsheet)
Konvertera MDs till TSV (Tab Seperated Values)
Konvertera MDs till TXT (Text Document)
Konvertera MDs till XLAM (Excel Macro-Enabled Add-In)
Konvertera MDs till XLSB (Excel Binary Workbook)
Konvertera MDs till XLSM (Macro-enabled Spreadsheet)
Konvertera MDs till XLT (Excel 97 - 2003 Template)
Konvertera MDs till XLTM (Excel Macro-Enabled Template)