![]() The tools are interconnected and easy to combine. How to add shapes to your PDF fileĬreate diagrams and schemes using shapes such as arrows, circles, rectangles, etc. ![]() ![]() You can easily wipe it out from your PDF with the Eraser tool. PDF Expert remembers your choice so the next time you can quickly pick the needed tool.ĭon't worry if you added an extra element. You can also adjust the tip sensitivity for the Pen and opacity for the Marker. Pick either Pen or Marker tool, select your color, opacity and line thickness.Draw or sketch anything you wish: 3D plans for construction, UX maps, financial graphs, and many more. The code above can be found in the C# GDI+ Annotations example, I've simply replaced that example.Īny feedback that could point me in the right direction would be appreciated.With PDF Expert, you can draw on a PDF like on a regular text document, using only your finger or the Apple Pencil. Here is a copy of PDFSharp 1.2 with all of the modifications I've made that will allow the code above to compile: But mousing over the line then exiting the button area does not hide the Free Text annotation below that line like it should.ĭoes anyone understand why this is not working? It seems like the hide event can't find the reference to my text annotation for some reason, but I don't know why. This code will output a PDF document where you can click on the first line of text for an alert dialog. PdfPushButtonField butt = (PdfPushButtonField)(mouseAnot) MouseAnot.AcroFormFlags = PdfAcroFieldFlags.Pushbutton SetString("/JS", "app.alert('Mouse events are working.') ") ("/FT", "/Btn") //Set this up as a form button. MouseAnot.Rectangle = new PdfRectangle(rect) ("/T", "TestButton") //Field name needed for this to be recognized.? MouseAnot.Contents = "Mouse over widget test!" PdfWidgetAnnotation mouseAnot = new PdfWidgetAnnotation(document) ![]() Create another annotation, just for kicks TextAnnot.Rectangle = new PdfRectangle(rect) TextAnnot.Contents = "This is the contents of the annotation.\nLineTwo" PdfFreeTextAnnotation textAnnot = new PdfFreeTextAnnotation(document) Gfx.DrawString("There is no second line of text.", font, XBrushes.Black, 30, 140, XStringFormats.Default) Gfx.DrawString("The first line of text, with mouse events.", font, XBrushes.Black, 30, 50, XStringFormats.Default) XGraphics gfx = XGraphics.FromPdfPage(page) PdfDocument document = new PdfDocument() Here is my code that tries to accomplish what I've explained above: I know these events are firing because I can display an app.alert('') box just fine with them. I've also tried attaching JavaScript events for the Enter and Exit and hiding the same annotation via JavaScript, which does not work either. But the /Hide action won't work on my FreeText annotation, it doesn't hide. I've reached the point where I have a FreeText annotation on the page, and am using a Widget Annotation PushButton over some text for support for the /X and /E additional action types. I've partially accomplished this, by adding support for FreeText annotations, widget annotations, and trigger events along with some changes to allow the AcroForms code in 1.2 to work. Adding text annotations is not an option, because I don't want the note icon and the user needs to be able to mouse-over a large area of a page for these tooltips. I'm currently working to modify PDFsharp so that I can use it to output documents with mouse-over tooltips on specific areas.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |