Hi,
I implemented TIFF, BMP and PNG export.
Commands to control the bitmap export:
21: Set the export resolution to the value of param. The default is 200 dpi. Please avoid too large values if you war exporting color images. The memory consumption of the working bitmap is huge. (The string parameter is ignored)
22: Select the bit count. param=1 select monochrome (=default), param=2 selects 24 bit color. (The string parameter is ignored)
23: Export one page to a BMP file. param=page number (0..), the string param is the filename
24: Export one page to a PNG file. param=page number (0..), the string param is the filename
private void button1_Click1(object sender, System.EventArgs e) { wpdllInt1.Memo.TextCommandStr(24, 0, @"c:\Page_one.png"); }
TIFF Export:
TextDynamic: requires "Premium" or "Server" License!
wRTF2PDF TextDynamic Server: requires "Server" License!
25: Start a new TIFF file - the string parameter contains the file name. Result = "OK" if successful, otherwise an error message.
26: Closes the current TIFF file. If successful, the page count is returned.
27: Exports one page in the current TIFF file. If successful "OK" is returned. Otherwise the result string is empty or an error message. It uses the parameters defined with the commands 21 and 22. By default the resolution is 200 dpi, monochrome.
This example exports the complete document into a single TIFF file.
private void button1_Click1(object sender, System.EventArgs e)
{
if ( wpdllInt1.Memo.TextCommandStr(25, 0, @"c:\multipage.tif")=="OK" )
{
for(int i=0;
wpdllInt1.Memo.TextCommandStr(27, i, "")=="OK";
i++);
MessageBox.Show(
wpdllInt1.Memo.TextCommandStr(26, 0, "") + " page(s) were exported");
};
}
Note: It is possible to load a different document and export pages into the already opened TIFF file.