Add functionality to either drag and drop a PDF file from disk or from URL or use the the "pen" in the context menu. The
PDF will be uploaded in a configured (in the backend) S3 bucket and a NewsItem will be created for the PDF.
{
"id": "io.infomaker.pdf",
"name": "im-pdf",
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-pdf/{PLUGIN_VERSION}/index.js",
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-pdf/{PLUGIN_VERSION}/style.css",
"enabled": true,
"mandatory": false,
"data": {
"disableUseOfAnnotationTools": true
}
}
When uploading a PDF file, the plugin will create a NewsItem that will be stored
in the repository for the Writer. The NewsItem will have mimetype application/vnd.iptc.g2.newsitem+xml.graphic
.
The format is described at GitHub.
In the article, the plugin will add the following xml block under newsItem > contentSet > inlineXML > idf > group
:
<object id="MjIxLDE1LDgxLDE0Mw" uuid="a59569be-8551-5d7f-b9c8-a3ead58043cc" type="x-im/pdf">
<links>
<link rel="self" type="x-im/pdf" uri="im://pdf/8kgljturK6VjXqKEXGm8xIfHfA0.pdf" uuid="a59569be-8551-5d7f-b9c8-a3ead58043cc">
<data>
<text>Lorem ipsum</text>
<title>Lorem ipsum</title>
<objectName>Lorem-ipsum.pdf</objectName>
</data>
</link>
</links>
</object>