Attribute Name |
Description |
Type |
Values |
Default Value |
|---|---|---|---|---|
Left |
Left position in Twips |
Integer |
0 |
|
Top |
Top position in Twips |
Integer |
0 |
|
Right |
Right position in Twips |
Integer |
0 |
|
Bottom |
Bottom position in Twips |
Integer |
0 |
|
LeftF |
Left position in Twips |
Float |
0.00F |
|
TopF |
Top position in Twips |
Float |
0.00F |
|
RightF |
Right position in Twips |
Float |
0.00F |
|
BottomF |
Bottom position in Twips |
Float |
0.00F |
|
Page |
Page Index where object is located. Page Number is Page Index + 1. |
Integer |
>= 0 |
0 |
Filename |
Source file name, if image is loaded from an external file. |
String |
Supported input formats are: JPEG, BMP, TIFF, GIF, and PNG. |
None |
BorderColor |
Color for drawing text border. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF or in COLORREF (aabbggrr) 00000000 to FFFFFFFF |
000000 (Solid black) |
BorderWidth |
Width of border around text. Units in Twips. |
eum acBorderWidth
|
0: acBorderWidthNone 1: acBorderWidthSimple 2: acBorderWidthDouble 3: acBorderWidthTriple 4: acBorderWidthQuadruple |
0: acBorderWidthNone |
Compression |
Compression method. |
enum acImageCompressionConstants |
0: acCompressionDefault 1: acCompression256Colors 2: acCompressionJPegLow 7: acCompressionJPegMedium 9: acCompressionJPegHigh 10: acCompressionCCITTFax 11: acCompressionPNG 12: acCompressionJPG2000 13: acCompressionJBIG2 14: acCompressionJBIG2Huffman |
0: DocumentDefaultValue |
Hyperlink |
Clicking on the object in Run mode will navigate to the specified location |
String |
Using URL: http://, ftp: // , mailto:// , Using Bookmark: #Ref ex: #Pages[2] |
|
Locked |
Object cannot be modified |
Boolean |
True / False |
False |
BitmapData |
Defines the image information. |
Byte Array |
|
[] |
BitmapWidth |
Width of the image. In Pixels. |
Integer |
|
0 |
BitmapHeight |
Height of the image. In Pixels. |
Integer |
|
0 |
BitsPerComponent |
Number of bits per color component. |
Integer |
|
0 |
ColorSpace |
Defines the color-space for this bitmap. |
Integer |
|
0 |
Palette |
Color palette. |
Integer Array |
|
0 |
Mask |
Color used as mask. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF or in COLORREF (aabbggrr) 00000000 to FFFFFFFF |
FFFFFFFF (Transparent) |
GrayScale |
True if image is grayscale. |
Boolean |
True/False |
False |
Hidden |
Hidden in certain report states |
Integer |
A binary combination of the following values: 1: Hidden in Run mode 2: Hidden in Design mode 4: Reserved value 8: Hidden in Print preview 16: Hidden in Annotation mode |
0: Always visible |
RGBMask |
RGB Mask. |
Color |
COLORREF (bbggrr) 000000 to FFFFFF or in COLORREF (aabbggrr) 00000000 to FFFFFFFF |
FFFFFFFF (Transparent) |
ClipPoints |
Points that define the clip region. |
Array of Points |
|
NULL |
ClipOps |
Operations that define how the points are connected. |
Array of enum PolyOps |
0: acNoOp 1: acCloseFigure 2: acLineTo 4: acBezierTo 6: acMoveto 16: acClip_Winding 32: acClip_Alternate |
0: acNoOp |
BitsPerColor |
Number of bits per color. |
Integer |
|
0 |
ColorDepth |
Number of possible colors. |
Integer |
|
0 |
LayerID |
ID layer which belongs the object. |
String |
||
Annotation |
Object is saved as an annotation as opposed to a drawing within the page contents |
Boolean |
True / False |
False for static objects such as lines, polygons and text. True for dynamic objects such as form fields or high-lighters |
Rotation |
Object rotation. |
Integer |
10th of a degree |
0 |
ImageFileData |
Byte array of an image file, as it is read from the file system. |
Byte Array |
Supported input formats are: JPEG, BMP, TIFF, GIF, and PNG. |
[] |
Visible |
Object is visible when document is printed |
Boolean |
True / False |
True |
CanActivate |
User can Activate. |
Boolean |
True/False |
True |
XAML |
XAML representation of the object |
String |
||
Opacity |
Object' s image will be rendered in the case of using GDI+ or DirectX with varying range of translucency |
Integer |
1 (most translucent) to 100 (most opaque) |
100 |
BlendMode |
Blends the color object according to a define mode. This blending is also applied to the object when it is saved or printed. |
enum acBlendMode |
0: acBlendModeNormal 1: acBlendModeMultiply 2: acBlendModeScreen 3: acBlendModeOverlay 4 : acBlendModeDarken 5: acBlendModeLighten 6: acBlendModeColorDodge 7: acBlendModeColorBurn 8: acBlendModeHardLight 9: acBlendModeSoftLight 10: acBlendModeDifference 11: acBlendModeExclusion 12 : acBlendModeHue 13: acBlendModeSaturation 14 : acBlendModeColor 15: acBlendModeLuminosity 16: acBlendModeCompatible |
0: acBlendModeNormal |
Creating a picture object from an external file using the FileName attribute.
Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation"
Const strActivationCode As String = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6"
' initailize library
' This should be done once
Dim PDF As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
' set license key
PDF.SetLicenseKey(strLicenseTo, strActivationCode)
' Create a Picture in the current Page
PDF.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePicture, "Picture1")
' Define obj as Picture1
Dim obj As ACPDFCREACTIVEX.IacObject = PDF.GetObjectByName("Picture1")
' Set-up the Picture
obj("Left") = 1000
obj("Top") = 0
obj("Right") = 5000
obj("Bottom") = 4000
obj("BorderColor") = &HFF00FF
obj("BorderWidth") = 1
obj("Filename") = "c:\temp\image.jpg"
' Save PDF
PDF.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
End Sub
public void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation";
const string strActivationCode = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6";
// initailize library
// This should be done once
ACPDFCREACTIVEX.PDFCreactiveX PDF = new ACPDFCREACTIVEX.PDFCreactiveX();
// set license key
PDF.SetLicenseKey(strLicenseTo, strActivationCode);
// Create a Picture in the current Page
PDF.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePicture, "Picture1");
// Define obj as Picture1
ACPDFCREACTIVEX.IacObject obj = PDF.GetObjectByName("Picture1");
// Set-up the Picture
obj["Left"] = 1000;
obj["Top"] = 0;
obj["Right"] = 5000;
obj["Bottom"] = 4000;
obj["BorderColor"] = 0xFF00FF;
obj["BorderWidth"] = 1;
obj["Filename"] = @"c:\temp\image.jpg";
// Save PDF
PDF.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
}
#import "c:\users\amyuni\pdfcreactivex.dll" no_namespace
using namespace std;
int main()
{
// Constants for Activation codes
bstr_t strLicenseTo = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation";
bstr_t strActivationCode = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6";
// Initialize the COM subsystem
CoInitialize(0);
// IPDFCreactiveXPtr is a smart pointer type defined in pdfcreactivex.tlh,
// the type library header file generated by the #import instruction above
IPDFCreactiveXPtr PDF;
// Create the PDFCreactiveX instance
PDF.CreateInstance( __uuidof(PDFCreactiveX));
// set license key
PDF->SetLicenseKey(_bstr_t(strLicenseTo), _bstr_t(strActivationCode));
// Create a Picture in the current Page
PDF->CreateObject(acObjectTypePicture, "Picture1");
// Set-up variables for attributes
_variant_t varAttribute;
// Set-up the Picture
varAttribute.vt = VT_I4; // integers
varAttribute.lVal = 1000;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Left"), varAttribute);
varAttribute.lVal = 0;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Top"), varAttribute);
varAttribute.lVal = 5000;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Right"), varAttribute);
varAttribute.lVal = 4000;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Bottom"), varAttribute);
varAttribute.lVal = 0;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"BorderColor"), varAttribute);
varAttribute.lVal = 1;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"BorderWidth"), varAttribute);
varAttribute.SetString("c:\\temp\\image.jpg");
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t("Filename"), varAttribute);
// Save PDF
PDF->Save("c:\\temp\\CreatePDFDocument_resulting.pdf", acFileSaveView);
return 0;
}
Creating a picture object from the data(pixels) of a Bitmap in memory, excluding the headers, using the BitmapData attribute. This attribute does not support compressed images.
Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation"
Const strActivationCode As String = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6"
' initailize library
' This should be done once
Dim PDF As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
' set license key
PDF.SetLicenseKey(strLicenseTo, strActivationCode)
' Load an image
Dim bmp As Drawing.Bitmap = New Drawing.Bitmap("c:\temp\image.jpg")
' Getting the BitMapData from the image
Dim bmpData As Byte()
Using ms = New System.IO.MemoryStream()
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp)
bmpData = ms.ToArray()
End Using
' Create a Picture in the current Page
PDF.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePicture, "Picture1")
' Define obj as Picture1
Dim obj As ACPDFCREACTIVEX.IacObject = PDF.GetObjectByName("Picture1")
' Set-up the Picture
obj("Left") = 1000
obj("Top") = 0
obj("Right") = 1000 + 4000 * bmp.Width / bmp.Height
obj("Bottom") = 0 + 4000
obj("BorderColor") = &HFF00FF
obj("BorderWidth") = 1
obj("BitmapWidth") = bmp.Width
obj("BitmapHeight") = bmp.Height
obj("BitmapData") = bmpData
' Save PDF
PDF.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
End Sub
static void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation";
const string strActivationCode = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6";
// initailize library
// This should be done once
ACPDFCREACTIVEX.PDFCreactiveX PDF = new ACPDFCREACTIVEX.PDFCreactiveX();
// set license key
PDF.SetLicenseKey(strLicenseTo, strActivationCode);
// Load an image
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(@"c:\temp\image.jpg");
// Getting the BitMapData from the image
Byte[] bmpData;
using (System.IO.MemoryStream ms = new System.IO.MemoryStream()){
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
bmpData = ms.ToArray();
}
// Create a Picture in the current Page
PDF.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePicture, "Picture1");
// Define obj as Picture1
ACPDFCREACTIVEX.IacObject obj = PDF.GetObjectByName("Picture1");
// Set-up the Picture
obj["Left"] = 1000;
obj["Top"] = 0;
obj["Right"] = 5000;
obj["Bottom"] = 4000;
obj["BorderWidth"] = 1;
obj["BitmapWidth"] = bmp.Width;
obj["BitmapHeight"] = bmp.Height;
obj["BitmapData"] = bmpData;
// Save PDF
PDF.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
}
Creating a picture object from the image data as a byte array using the ImageFileData attribute. This attribute supports compressed images.
Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation"
Const strActivationCode As String = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6"
' initailize library
' This should be done once
Dim PDF As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
' set license key
PDF.SetLicenseKey(strLicenseTo, strActivationCode)
' Getting the BitMapData from the Image File
Dim sourceFile As System.IO.FileStream = New System.IO.FileStream("c:\temp\image.jpg", System.IO.FileMode.Open)
Dim binReader As System.IO.BinaryReader = New System.IO.BinaryReader(sourceFile)
Dim imgData As Byte() = binReader.ReadBytes(sourceFile.Length)
sourceFile.Close() ' dispose streamer
binReader.Close() ' dispose reader
' Create a Picture in the current Page
PDF.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePicture, "Picture1")
' Define obj as Picture1
Dim obj As ACPDFCREACTIVEX.IacObject = PDF.GetObjectByName("Picture1")
' Set-up the Picture
obj("Left") = 1000
obj("Top") = 0
obj("Right") = 5000
obj("Bottom") = 4000
obj("BorderColor") = &HFF00FF
obj("BorderWidth") = 1
obj("ImageFileData") = imgData
' Save PDF
PDF.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
End Sub
static void Sample()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation";
const string strActivationCode = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6";
// initailize library
// This should be done once
ACPDFCREACTIVEX.PDFCreactiveX PDF = new ACPDFCREACTIVEX.PDFCreactiveX();
// set license key
PDF.SetLicenseKey(strLicenseTo, strActivationCode);
// Getting the BitMapData from the Image File
System.IO.FileStream sourceFile = new System.IO.FileStream(@"c:\temp\image.jpg", System.IO.FileMode.Open);
System.IO.BinaryReader binReader = new System.IO.BinaryReader(sourceFile);
Byte[] imgData = binReader.ReadBytes((int)sourceFile.Length);
sourceFile.Close(); // dispose streamer
binReader.Close(); // dispose reader
// Create a Picture in the current Page
PDF.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePicture, "Picture1");
// Define obj as Picture1
ACPDFCREACTIVEX.IacObject obj = PDF.GetObjectByName("Picture1");
// Set-up the Picture
obj["Left"] = 1000;
obj["Top"] = 0;
obj["Right"] = 5000;
obj["Bottom"] = 4000;
obj["BorderColor"] = 0xFF00FF;
obj["BorderWidth"] = 1;
obj["ImageFileData"] = imgData;
// Save PDF
PDF.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
}
#include <iostream>
#include <fstream>
#import "c:\users\amyuni\pdfcreactivex.dll" no_namespace
using namespace std;
int main()
{
// Constants for Activation codes
bstr_t strLicenseTo = "Amyuni PDF Creator WinRT-UWP Evaluation Evaluation";
bstr_t strActivationCode = "07EFCDAB01000100DF6EFC86A6518CC902BADA9A6CD601748A03C78B8804C4D09ECA8C769C8178480245B08FAE6CD0692C541472F082AA3BE6";
// Initialize the COM subsystem
CoInitialize(0);
// IPDFCreactiveXPtr is a smart pointer type defined in pdfcreactivex.tlh,
// the type library header file generated by the #import instruction above
IPDFCreactiveXPtr PDF;
// Create the PDFCreactiveX instance
PDF.CreateInstance( __uuidof(PDFCreactiveX));
// set license key
PDF->SetLicenseKey(_bstr_t(strLicenseTo), _bstr_t(strActivationCode));
// Getting the BitMapData from the Image File
int size;
char * memblock;
ifstream file ("c:\\temp\\image.jpg", ios::in|ios::binary|ios::ate);
file.seekg(0, ios::end);
size = file.tellg();
memblock = new char[size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
SAFEARRAYBOUND Bound;
Bound.lLbound = 0;
Bound.cElements = size;
SAFEARRAY * imgData = SafeArrayCreate(VT_UI1, 1, &Bound);
BYTE * pData = NULL;
HRESULT hrv = SafeArrayAccessData(imgData, (void **)&pData);
memcpy(pData, memblock, size);
SafeArrayUnaccessData(imgData);
// Create a Picture in the current Page
PDF->CreateObject(acObjectTypePicture, "Picture1");
// Set-up variables for attributes
_variant_t varAttribute;
// Set-up the Picture
varAttribute.vt = VT_I4; // integers
varAttribute.lVal = 1000;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Left"), varAttribute);
varAttribute.lVal = 0;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Top"), varAttribute);
varAttribute.lVal = 5000;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Right"), varAttribute);
varAttribute.lVal = 4000;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"Bottom"), varAttribute);
varAttribute.lVal = 0;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"BorderColor"), varAttribute);
varAttribute.lVal = 1;
PDF->put_ObjectAttribute(_bstr_t("Picture1"), _bstr_t(L"BorderWidth"), varAttribute);
varAttribute.vt = VT_ARRAY | VT_UI1; // A SAFEARRAY pointer and An unsigned character
varAttribute.parray = imgData;
PDF->put_ObjectAttribute(_bstr_t("Picture1"),_bstr_t(L"ImageFileData"), varAttribute);
// Save PDF
PDF->Save("c:\\temp\\CreatePDFDocument_resulting.pdf", acFileSaveView);
delete[] memblock;
return 0;
}