PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 10:12 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Question On Annotations
PostPosted: Tue Nov 28, 2017 6:55 pm 
Offline

Joined: Sat May 07, 2016 9:34 pm
Posts: 9
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 25, 2018 4:59 pm 
Offline

Joined: Sat May 07, 2016 9:34 pm
Posts: 9
Bump?


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 01, 2021 4:57 pm 
Offline

Joined: Wed Sep 01, 2021 4:54 pm
Posts: 2
2021,I am also searching for the same solution. Any help is highly appreciated


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 03, 2021 12:24 am 
Offline

Joined: Thu Aug 05, 2021 6:48 am
Posts: 5
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!


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 03, 2021 6:06 pm 
Offline

Joined: Wed Sep 01, 2021 4:54 pm
Posts: 2
[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!!


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 13, 2021 8:16 am 
Offline

Joined: Thu Aug 05, 2021 6:48 am
Posts: 5
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!


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 22, 2023 8:15 am 
Offline

Joined: Sat Apr 22, 2023 8:13 am
Posts: 2
Is this still the solution today on how to create a square annotation? shouldnt be the case. users need to be abstracted. users care about the color property being set not memorizing /CA or /IC


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group