Rendera SVG till FLATOPC på Android via Java

Konvertera SVG till FLATOPC i mobilappar utan att installera någon programvara

 

Du kan integrera konverteringsfunktionen SVG till FLATOPC i dina mobilappar genom att använda två API:er av paketet Aspose.Total for Android Java . Först måste du konvertera SVG-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 FLATOPC.

Konvertera SVG till FLATOPC på Android via Java

  1. Öppna SVG-filen med klassen Document
  2. Konvertera SVG 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 FLATOPC-format med metoden save och ställ in FLATOPC 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 SVG file with an instance of Document class
Document document = new Document("template.svg");
// save SVG 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.FLAT_OPC
outputDocument.save("output.flat_opc", SaveFormat.FLAT_OPC);   

Få SVG-filinformation på Android via Java

Innan du konverterar SVG till FLATOPC 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 SVG-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 SVG document
Document doc = new Document("template.svg");
// 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 FLATOPC-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 FLATOPC-dokument. Om du vill infoga en fotnot eller en slutnot i ett FLATOPC-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.flat_opc", SaveFormat.FLAT_OPC);  

Explore SVG Conversion Options with Android

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