PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Question On Annotations
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3699
Page 1 of 1

Author:  rmcx [ Tue Nov 28, 2017 6:55 pm ]
Post subject:  Question On Annotations

I would like to annotate a rectangular area on my PDF. i.e. I would like to hover the mouse anywhere within the given area and have the annotation pop up.

It seems that a Text annotation only appears when hovering in the upper left corner of the annotation Rectangle. I tried using a Square annotation but that only seems to pop up when I'm hovering over the borders of the Rectangle and not the interior.

Can you tell me how to have the annotation appear when I hover anywhere within the given Rectangle?

Thx.

Author:  rmcx [ Thu Jan 25, 2018 4:59 pm ]
Post subject:  Re: Question On Annotations

Bump?

Author:  gkunduru [ Wed Sep 01, 2021 4:57 pm ]
Post subject:  Re: Question On Annotations

2021,I am also searching for the same solution. Any help is highly appreciated

Author:  MoKoNaFactory [ Fri Sep 03, 2021 12:24 am ]
Post subject:  Re: Question On Annotations

Dear everyone

your Annotation object is need few additional thing.
1./Square annotation. edit Elements entry.
2./IC Element entry.this is Filling Command.
3./CA Element entry.this is Transparent Command.

use PdfAnnotate.Element.Add method.

new PdfTextAnnotate Anno();
Anno.Title="Title1";
Anno.Contents="Value1";
Anno.Rectangle=/*input your PdfRectangle*/;
Anno.Remove("/Subtype");
Anno.Elements.Add("/Subtype",new PdfLiteral("/Square"));
Anno.Elements.Add("/IC",new PdfLiteral("[0 0 0]");
Anno.Elements.Add("/CA",new PdfLiteral("0");

Let's Do it!

Author:  gkunduru [ Fri Sep 03, 2021 6:06 pm ]
Post subject:  Re: Question On Annotations

[quote="MoKoNaFactory"]
This solution worked like anything.
Thank you so much for saving my day.
It would be a great help if you can point me the documentation you followed to come up with the solution.

Happy Coding!!

Author:  MoKoNaFactory [ Mon Sep 13, 2021 8:16 am ]
Post subject:  Re: Question On Annotations

Hi brother.
sorry,I have only done Trial and Err.

I adding hand maid Annotation to Base File on Acrobat DC.
after,open PDFSharp and check difference of Annotation list.
element fix is My small result.

have a nice coding you too!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/