0

I am trying to implement this basic example https://docs.aspose.com/pdf/cpp/hello-world-example/ but I am getting errors that MakeObject, Document and TextFragment are not defined. I was developing on vscode but then I realized that aspose can be downloaded through nuget in vs so I switched to vs thinking that adding aspose will be automatically integrated in my project dependencies or something, but no it didn't and I don't know currently how to include it (my use case is also very basic I tried hummuspdf/PDF-Writer but also I didn't knew how to implement it or include it, maybe it isn't as simple as #include "file.h" ? )

Robinson
  • 13
  • 3

1 Answers1

1
#include "Aspose.PDF.Cpp/Document.h"
#include "Aspose.PDF.Cpp/SaveFormat.h"

using namespace Aspose::Pdf;
using namespace System;

int main()
{
    auto doc = MakeObject<Document>(u"Example.pdf");
    doc->Save(u"Example.docx", SaveFormat::DocX);
}
Alex
  • 11
  • 1