logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
Paul Rayman Posted: Monday, May 22, 2017 10:38:37 PM(UTC)
 
You can find the image under mouse pointer
http://forum.patagames.c...mage-under-mouse-pointer

and then move it by applying the transformation matrix as mentioned above
Akshara Posted: Monday, May 22, 2017 10:24:27 PM(UTC)
 
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.

Paul Rayman Posted: Monday, May 22, 2017 2:50:21 PM(UTC)
 
Hi,

You can apply the transformation matrix to ImageObject to change the image position
https://pdfium.patagames...73-1e28-c5edc3586df7.htm

Please see more about transformation matices here:
https://blog.patagames.c...matrix-and-how-to-use-it
Akshara Posted: Monday, May 15, 2017 11:41:59 PM(UTC)
 
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.

Paul Rayman Posted: Wednesday, May 10, 2017 5:46:10 AM(UTC)
 
What exactly problem you have with image insertion?
Akshara Posted: Thursday, May 4, 2017 1:07:29 AM(UTC)
 
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.