|
|
|
|
|
Hey,
Thanks for your response but I guess I was not able to elaborate you correctly my problem. Actually here I am dragging the image from a listView control and drop it in the PDF document loaded in PDF viewer.Again I want to drag that same image and move it to some other place and drop in the same PDF. I want that dropped image to be resized or moved or deleted, until I save the PDF the image should be editable.
Appreciate your Response.
Thanks in advance.
|
|
|
|
|
|
Hi,
I have resolved the problem while inserting the image.
I have an other error occurred now.After inserting the image at mouse position I want to move that inserted image from one position to other in same PDF. Is this possible to change the position of that image after inserting it into PDF.
Waiting for your response.
Thanks in advance.
|
|
|
What exactly problem you have with image insertion?
|
|
|
Hey Paul, I have a query regarding insertion of image in the PDF document in windows form application. I am using PDF viewer of Patagames of windows application. I am not able to insert the image on PDF. Here I am using Drag Drop functionality. I am dragging the image from the ListView and dropping it in the PDF document on the PDF viewer. I have used the ItemDrag event of the ListView to drag the image and have used DragEnter and DragDrop event of the PDF viewer. I have used the code which you have provided in the following link bellow:- "https://forum.patagames.com/postmessage?f=4" I am not able to drop the image on the PDF viewer. Following is my code which i have used:- Code:
private void listView1_ItemDrag(object sender, ItemDragEventArgs e)
{
DoDragDrop(listView1.SelectedItems, DragDropEffects.Move | DragDropEffects.Copy);
}
private void pdfViewer1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(ListView.SelectedListViewItemCollection)))
{
e.Effect = DragDropEffects.Copy;
}
else
e.Effect = DragDropEffects.None;
}
private void pdfViewer1_DragDrop(object sender, DragEventArgs e)
{
ListView.SelectedListViewItemCollection selectedItems = (ListView.SelectedListViewItemCollection)e.Data.GetData(typeof(ListView.SelectedListViewItemCollection));
foreach (ListViewItem item in selectedItems)
{
name = item.Text;
}
location = new Point(e.X, e.Y);
InitWebApp();
var doc = pdfViewer1.Document;
if (doc == null)
return;
using (var testBmp = Bitmap.FromFile(name) as Bitmap)
{
var locationOnPage = pdfViewer1.ClientToPage(pdfViewer1.CurrentIndex, location);
InsertImageAt(doc.Pages.CurrentPage, testBmp, locationOnPage);
};
pdfViewer1.ClearRenderBuffer();
pdfViewer1.Invalidate();
}
Appreciate your response. Eagerly waiting for your response. Thanks in Advance.
|
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close