Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Examples/FullFileName.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class LoadingNotebookInstantly {
public static void main(String... args) throws IOException {
// ExStart:LoadingNotebookInstantly

// By default children loading is "lazy".
// Therefore for instant loading has took place,
// it is necessary to set the NotebookLoadOptions.InstantLoading flag.
Expand All @@ -25,6 +25,6 @@ public static void main(String... args) throws IOException {
// Do something with child document
}
}
// ExEnd:LoadingNotebookInstantly

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void main(String... args) throws IOException {
byte[] buffer = image.getBytes();
Files.write(dataDir + outputFile, buffer);

System.out.printf("File saved: %s\n", outputPath);
System.out.printf("File saved: %s\n", dataDir);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public static void main(String... args) throws IOException {
oneFile.save(dataDir + "ConvertSpecificPageToImage_out.jpg", options);

System.out.println("File saved: " + dataDir + "ConvertSpecificPageToImage_out.jpg");
// ExEnd:ConvertSpecificPageToImage

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.aspose.note.examples.pages;

import java.io.IOException;

import com.aspose.note.Document;
import com.aspose.note.Page;
import com.aspose.note.PageHistory;
import com.aspose.note.examples.Utils;

public class ModifyPageHistory {
public static void main(String... args) throws IOException {

String dataDir = Utils.getSharedDataDir(InsertPages.class) + "pages/";
// Load OneNote document and get first child
Document document = new Document(dataDir + "Sample1.one");

Page page = document.getFirstChild();

PageHistory pageHistory = document.getPageHistory(page);

pageHistory.removeRange(0, 1);

pageHistory.set_Item(0, new Page(document));

pageHistory.get_Item(1).getTitle().getTitleText().setText("New Title");

pageHistory.addItem(new Page(document));

pageHistory.insertItem(1, new Page(document));

document.save(dataDir + "ModifyPageHistory_out.one");

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.aspose.note.examples.pages;

import java.io.IOException;

import com.aspose.note.Document;
import com.aspose.note.Page;
import com.aspose.note.PageHistory;
import com.aspose.note.examples.Utils;

public class PushCurrentPageVersion {
public static void main(String... args) throws IOException {

String dataDir = Utils.getSharedDataDir(InsertPages.class) + "pages/";
// Load OneNote document and get first child
Document document = new Document(dataDir + "Sample1.one");
Page page = document.getFirstChild();

PageHistory pageHistory = document.getPageHistory(page);

pageHistory.addItem(page.deepClone());

document.save(dataDir + "PushCurrentPageVersion_out.one");

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.aspose.note.examples.pages;

import java.io.IOException;

import com.aspose.note.Document;
import com.aspose.note.Page;
import com.aspose.note.PageHistory;
import com.aspose.note.examples.Utils;

public class RollBackToPreviousPageVersion {
public static void main(String... args) throws IOException {

String dataDir = Utils.getSharedDataDir(InsertPages.class) + "pages/";

// Load OneNote document and get first child
Document document = new Document(dataDir + "Sample1.one");

Page page = document.getFirstChild();

PageHistory pageHistory = document.getPageHistory(page);

document.removeChild(page);

document.appendChild(pageHistory.get_Item(pageHistory.size() - 1));

document.save(dataDir + "RollBackToPreviousPageVersion_out.one");

}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.