Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Short example that shows obtaining metadata and checking a specific value
// CheckLinearized.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <jawsmako/jawsmako.h>
#include <jawsmako/pdfinput.h>
#include <edl/idommetadata.h>
using namespace JawsMako;
using namespace EDL;
int main()
{
auto mako = IJawsMako::create();
auto metadata = IPDFInput::create(mako)->open("Test.pdf")->getJobMetadata();
PValue pValue;
metadata->getProperty(IDOMMetadata::ePDFInfo, "Linearized", pValue);
if (pValue.getBool())
std::cout << "PDF is linearized" << std::endl;
else
std::cout << "PDF is NOT linearized" << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment