Skip to content

Instantly share code, notes, and snippets.

View aspose-com-gists's full-sized avatar

Aspose.com Gists aspose-com-gists

View GitHub Profile
@aspose-com-gists
aspose-com-gists / compress-pdf-document.cpp
Created April 5, 2024 04:53
Compress Documents via C++ Applications
String _dataDir("C:\\Samples\\");
String outfilename("OptimizeDocument_out.pdf");
auto document = MakeObject<Document>();
// Make some operations (add pages, images, etc)
document->Optimize();
@aspose-com-gists
aspose-com-gists / compare-powerpoint-presentation-slides.cpp
Created April 5, 2024 04:51
Compare Documents via C++ Applications
const String templatePath1 = u"../templates/presentation1.pptx";
const String templatePath2 = u"../templates/presentation2.pptx";
SharedPtr<Presentation> presentation1 = MakeObject<Presentation>(templatePath1);
SharedPtr<Presentation> presentation2 = MakeObject<Presentation>(templatePath2);
for (int i = 0; i < presentation1->get_Masters()->get_Count(); i++){
for (int j = 0; j <presentation2->get_Masters()->get_Count(); j++){
if (presentation1->get_Masters()->idx_get(i)->Equals(presentation2->get_Masters()->idx_get(j)))
@aspose-com-gists
aspose-com-gists / delete-pdf-text-annotation.cpp
Created April 5, 2024 04:49
Annotate Documents via C++ Application
String _dataDir("C:\\Samples\\");
auto document = MakeObject<Document>(_dataDir + u"sample_textannot.pdf");
auto page = document->get_Pages()->idx_get(1);
auto annotationSelector = MakeObject<Aspose::Pdf::Annotations::AnnotationSelector>(
MakeObject<Aspose::Pdf::Annotations::LineAnnotation>(page, Rectangle::get_Trivial(), Point::get_Trivial(), Point::get_Trivial()));
page->Accept(annotationSelector);
auto textAnnotations = annotationSelector->get_Selected();
Gist for Aspose.PSD for Python
@aspose-com-gists
aspose-com-gists / convert-xbrl-to-pdf-in-python.md
Created April 3, 2024 10:11
Convert XBRL to PDF in Python | iXBRL to PDF
using (var pst = PersonalStorage.Create("test.pst", FileFormatVersion.Unicode))
{
var inboxFolder = pst.CreatePredefinedFolder("Inbox", StandardIpmFolder.Inbox);
inboxFolder.AddMessages(new MapiMessageEnumerator("PathToFolder"));
}
@aspose-com-gists
aspose-com-gists / AddEmbeddedMessages.cs
Created April 1, 2024 10:28
Manage Outlook Email Attachments with .NET
var msg = new MapiMessage("from@test.com", "to@test.com", "Subj", "This is a message body");
var attachMsg = MapiMessage.Load("Weekly report.msg");
msg.Attachments.Add("Weekly report", attachMsg);
@aspose-com-gists
aspose-com-gists / CreateAppointment.cs
Created April 1, 2024 10:01
Create, Load, Save Outlook Calendar Items in C#
// Create an appointment
var calendarItem = new MapiCalendar(
"LAKE ARGYLE WA 6743",
"Appointment",
"Please make time to attend this very important meeting.",
new DateTime(2024, 10, 2, 13, 0, 0),
new DateTime(2024, 10, 2, 14, 0, 0));
@aspose-com-gists
aspose-com-gists / AddNewEmails.cs
Created April 1, 2024 09:39
Creating PST Files and Filling them with Content in C#
using (var pst = PersonalStorage.Create("sample.pst", FileFormatVersion.Unicode))
{
// Access the folder to add items
var inboxFolder = pst.RootFolder.GetSubFolder("Inbox");
// Create a new message
var message = new MapiMessage("from@example.com", "to@example.com", "Subject", "Body");
// Add the message to the Inbox folder
inboxFolder.AddMessage(message);
@aspose-com-gists
aspose-com-gists / Remove-Password-from-ZIP.java
Last active April 1, 2024 00:11
Remove Password from ZIP Files
package com.example;
import com.aspose.zip.Archive;
import com.aspose.zip.ArchiveLoadOptions;
public class Main {
// Remove password from ZIP files
public static void main(String[] args) {
// Define the directory path of the source files.
String dir = "/Desktop/";
// Create an instance of the ArchiveLoadOptions class.