I try your sample PDFViewWPFSimpleCS2013 to try the freehand annotations. I copy the sample to my D disk and set all the reference it need. But one error occurred:
Severity Code Description Project File Line Suppression State
Error The command “xcopy “D:\MyTest\CS…
Lib\PDFNet” “D:\MyTest\CS\bin\Debug\PDFNet” /S /I /Y” exited with code 4. PDFViewWPFSimpleTestCS2013
I suspect it might be because windows marked the files as from internet (unsafe). If you go back to the original zip file, right click, and choose properties, there is probably a button called Unblock at the bottom. Select that and then unzip. Xcopy should be fine. If that still doesn’t help then just make the following changes.
- Remove the xcopy command from the post build events
- Change your Solution Platform to from AnyCPU to either x86 or x64.
- Delete the reference PDFNet.dll in the project
- Re-add the PDFNet reference to the project, selecting the appropriate x86 or x64 version
The xcopy command, and the PDFNetLoader reference are there to support AnyCPU but this is not required. See this post for more details.