Developer Tools
|
Office Productivity Applications
|
Enterprise Solutions
|
|||||||||||||||||||||||







The Windows clipboard allows you to temporarily store content in formats such as text, bitmap, metafile, and wave.
eDocEngine's gtClipboard class supports text, Software Arts' Data Interchange Format (used in VisiCalc), Microsoft's Symbolic Link (SYLK) format, bitmap, Windows Metafile (WMF), and Enhanced Metafile (EMF).
After you create a gtClipboard object, you can add elements such as text, images, shapes, tables, watermarks and stamps to it. The elements supported by the format will be copied to the Windows clipboard.
After the content has been copied to the Windows clipboard in a particular format, you can open any application that supports that format, open a new document, and do a "Paste" operation. The Windows clipboard contents will be copied to the document right away!
To illustrate this, here is a small application that places some text and an image into the clipboard in a given format.

After the button is clicked, you can open an image-editing application and do the "Paste" operation.

And, here is the code snippet where all the action is.
type
TForm1 = class(TForm)
// The "Copy to Clipboard" button
Button1: TButton;
// eDocEngine Clipboard engine component
gtClipboard1: TgtClipboard;
OpenDialog1: TOpenDialog;
GroupBox1: TGroupBox;
Label1: TLabel;
Memo1: TMemo;
// The "Load a picture" button
Button2: TButton;
// The "Select the output format" list
ComboBox1: TComboBox;
Label2: TLabel;
Shape1: TShape;
Image1: TImage;
...
procedure TForm1.Button1Click(Sender: TObject);
var
LStr: String;
begin
LStr := Memo1.Lines.Text;
case ComboBox1.ItemIndex of
0: gtClipboard1.OutputFormat := ofText;
1: gtClipboard1.OutputFormat := ofSYLK;
2: gtClipboard1.OutputFormat := ofDIF;
3: gtClipboard1.OutputFormat := ofBMP;
4: gtClipboard1.OutputFormat := ofMetafile;
end;
// Use the clipboard engine component
with gtClipboard1 do
begin
BeginDoc;
BeginPara;
// Write the text
TextOut(LStr);
// Render the selected image
DrawImage(1, 1, Image1.Picture.Graphic);
EndPara;
EndDoc;
end;
end;
// Allow the user select an image and display it
// on the form
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then
Image1.Picture.LoadFromFile(OpenDialog1.FileName);
end;
Downloads:
---o0O0o---
| Our Developer Tools | |
|---|---|
eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
XtremePDFConverter VCLA Delphi/C++Builder component to intelligently convert PDF to user-friendly Word RTF documents. |
|
PDFOne .NETA .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications. |
XtremeDocumentStudio .NETMulti-format document-processing component suite for .NET developers |
PDFOne (for Java™)A Java™ PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java™ applications. |
XtremeFontEngine (for Java)Java font engine to render glyphs from Type 1, Type 2 (CFF), and TrueType fonts |
| Our Office Productivity Applications |
|---|
Free PDF ReaderA free, fast, and portable application for viewing, printing and converting PDF documents. |
| Privacy | Legal | Feedback | Newsletter | Resellers | © 2002-2013 Gnostice Information Technologies Private Limited. All rights reserved. |
This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows XP users are advised to use Microsoft ClearType Tuning for optimal experience. Also, please use the latest version of a standards-compliant browser such as Firefox, Opera, or Dragon (Chromium).