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

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
Kazuhiro Tomita  
#1 Posted : Saturday, January 18, 2025 11:06:41 PM(UTC)
Quote
Kazuhiro Tomita

Rank: Newbie

Groups: Registered
Joined: 3/5/2023(UTC)
Posts: 7
Japan
Location: Tokyo

Thanks: 2 times
I am using Pdfium's PdfViewer in WPF, C#.
I want to prevent copying and pasting text from a PDF. in the default state, selecting text in a PDF and pressing Ctrl+C will copy the text to the clipboard.
How do I set this so that I can't do this?
Either approach is fine, either disable text selection or disable copying to the clipboard.


I want to switch the availability of copying the text from ViewModel, so it would have been ideal if I could set something like TextSelectionEnabled = false in the pdfViewer's DependencyProperty, but it doesn't seem to be possible.
Paul Rayman  
#2 Posted : Tuesday, January 21, 2025 8:25:14 PM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,133

Thanks: 10 times
Was thanked: 132 time(s) in 129 post(s)
Hello,
Code:
pdfViewer1.MouseMode = MouseModes.PanTool;
Kazuhiro Tomita  
#3 Posted : Thursday, January 23, 2025 9:02:41 AM(UTC)
Quote
Kazuhiro Tomita

Rank: Newbie

Groups: Registered
Joined: 3/5/2023(UTC)
Posts: 7
Japan
Location: Tokyo

Thanks: 2 times
Thank you!
I misunderstood when I posted this question and it was a bit odd, but anyway, now I have achieved what I wanted to do.
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.