Using OverlayImageTool

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
MarkusD
Posts: 2
Joined: Wed Jul 17, 2019 5:55 pm

Using OverlayImageTool

Post by MarkusD »

I'm tried to achieve the following:

Using OverlayImageTool to interactively place an Image on the PDF.
This works so far, i've also studied the examples.

Points i currently can't achieve:

- Stop the tool after placing the first Image (if i click after placing first image it will start placing a copy of it again)
The behavior should be automatic ,without the User has to click a button.
In other words: the User has not the choice to set multiple images.

- After placing the Image, how can i remove it again? Is this Possible? if not, how can i use the OverlayTool but not "stamp" the Image but only use it as a Tool the get the Location and Size of the Image that has been overlayed?

- Knowing when the first Image has placed and switch to a different Visual Tool automatically.

Is the Source code for the existing VisualTool's available? this would help to modify them to specific needs :)

Any suggestions?
Thanks :)
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Using OverlayImageTool

Post by Alex »

Hello Markus,

The OverlayImageTool class is not suitable for your purposes because clas works with raster images and it will rasterize PDF page during image overlay.

Please use the PdfContentEditorTool class for adding image to PDF page. The PdfContentEditorTool class can work with several overlay images and allows to delete overlay image from PDF page.

Also you can use the PdfContentXObjectTool class if you need to remove image or form from any PDF page.

PdfEditorDemo and WpfPdfEditorDemo project show functionality of PdfContentEditorTool and PdfContentXObjectTool visual tools. Please evaluate demos.

Best regards, Alexander
MarkusD
Posts: 2
Joined: Wed Jul 17, 2019 5:55 pm

Re: Using OverlayImageTool

Post by MarkusD »

Hi Alex,

thanks for the Info.

I re-checked your Demo, and just noticed now ,that you can manually drag/drop and resize the Signature in the 'CreateSignatureAppearanceForm' Dialog, which i didn't noticed at first.

Which was my goal all alone, and i tried to achieve this with OverlayImageTool in ImageViewer where the PDF is displayed.

So i guess my best bet is to :

- Set Rectangle Size to a default Value that seems appropriate for my kind of Page
- Set Background Image to PDF Image of the Page i want to place the Signature
- Use the Same code from 'CreateSignatureAppearanceForm' to allow the user to place the Signature interactive way.
- Remove the Background Image before placing the Signature on the PDF

With OverlayImageTool i came as far that it looked like this:

Image

But your solution is fine as well.

I'm still analyze how your Demo App works, because there all works as expected, so the Code is there, just need to find the right way to implement it ,without implementing all of your Demo App Code as well ;-)
Sometimes it's a bit difficult to follow all the right paths, because you wrote it so all different options are handled, while i usually need only a specific solution.

Thanks for your time.
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Using OverlayImageTool

Post by Alex »

Hi Markus,

Thank you for information. Let me know if you will have any question or problem.

Best regards, Alexander
Post Reply