How to draw AI annotation on document view during mouse drag

I created a AI tool plugin, when use the tool, I hope press mouse left key and drag in document view, AI will draw a rectangle, when mouse up, the rectangle disappears, just like ordinary select tool. So I wrote a class to implement AIAnnotation, during mouse drag, just let the annotation been invalidated. but I see nothing displayed. In the draw funtion I just use DefineClipStart() and then draw a rectangle using AIAnnotation drawer, at last call DefineClipEnd(). After mouse up call ClearClip(). Could anyone tell me if I made something wrong? Thanks in advance.

Hello,
At the begining of ToolMouseDrag(AIToolMessage* message)
add the five following lines, so toolAnnotate(AIAnnotatorMessage *message) will be called each the mouse will be dragged.
AIDocumentViewHandle view;
AIReal zoomview;
AIErr error=kNoErr;
//To call toolAnnotate.
error=sDocView->GetNthDocumentView (0, &view);
error=sDocView->GetDocumentViewZoom(vue, & zoomview);
I used this method in my tools for Illustrator JLG.Dimension for instance and it works well.
JLG.

Similar Messages

  • How to draw geometrical shapes on Acrobat viewer ?

    For instance, empty or transluscent rectangles, lines, arrows etc... I'm not talking about creating these shapes in a pdf file. I'm talking about adding them in a layer of the viewer, on the top of whatever the viewer displays.
    And I'd need to do that programmatically but I didn't even see the functionnality from the Adobe Acrobat Pro Extended commercial viewer...
    Thanks
    Frederic

    Put your own transparent window on top of ours and draw whatever you want...

  • How to get visibility information on a view during runtime?

    Dear experts,
    I want to trigger an event, just when a view becomes invisible.
    Is there a possibility to get the visibility information in theWDDOmodify method e.g?
    kind regards,
         Sahla

    Hello Pooja,
    The WDDOEXIT of the view will only be used when the whole application is exit ( on browser refresh).
    It is not called when just the POWL refresh is selected.
    I tried to set breakpoints in all componentcontroller, window and view hook methods to find out which method is called only  when the details view is not visible. But I couldn't figure it out.
    The wddomodify of the view is called, but I cannot get any visibility information there.
    the WDDOAFTERACTIOM of the view is called, but the refrence to the actions is always initial. I cannot decide whether refresh has been selected or another UI action.
    The WDDOCLOSE of the window is not entered when the POWL_DETAIL window becomes invisible.
    The details view and all related controller are initialized once and they live during the whole session.
    Their hook methods are called even if the view is not visible.
    The cleanest way to solve this problem is to trigger a portal event from the get_objects method.
    But this is now not avaiable.
    I tried up to now to use WD features as a workaround. But I coudlb't find the right feature to use..
    kind regards,
        Sahla.

  • Draw custom selection frame(dashed rectangle), while mouse dragging is moving

    Hi All,
    Maybe anyone has experience of drawing custom selection frame(dashed rectangle) for selected page items.
    I have to draw a custom selection frame(dashed rectangle), when I drag mouse cursor, while left mouse button is pressed.
    Thank you!
    Regards.

    There are two possible answers:
    1. If you use the getGraphics() in your event dispatching code, then the rectangle disappears because the component you paint on gets repainted, and it has no idea about your rectangle it should paint. The painting routine should ALWAYS be written in paintComponent(Graphics gr) method. (I wish they made the getGraphics() method protected).
    2. If you paint it in the write way, it might disappear because the components that it overlaps might cover it.
    Now a fix:
    Because you need to paint on TOP of everything in the JPanel, you can either:
    1. The dirty way: overwrite the paint(Graphics gr) method of your JPanel, first call super.paint(gr) then paint the rectangle.
    2. A proper way: Add a non-opaque JPanel on top of you JLayeredPane (similar to GlassPane), and paint the rectangle on it (in it's paintComponent method).
    Regards,
    Marcin
    You're probably doing some getGraphics() drawing which is usually wrong. If a component gets repainted by the system it loses all the information
    Now to the question:
    Your rectangle disappears beacause the Components that are overlapping it

  • How do I set up my default viewer to view pdf annotations or how to I change my default pdf viewer to Goodreader?

    When I open a pdf it doesn't show any of it's annotations, comments, etc that someone else may have done on that file.  How do I get iPad's default pdf viewer to show the annotations or how do I change my default pdf viewer to Goodreader?

    AHA, completely different animal, try posting here...
    Using iPad

  • How do I save annotations. Even if I close out of the document or email it to myself I don't seethem

    How do I save annotations? Even if I close out of the document or email it to myself I don't see the annotations in the document I email to myself. Thanks.

    Hi,
    Are you editing a local document or a Acrobat.com document?
    If you are using Preview to open the document that you emailed to yourself, you will not see the added annotations. This is a limitation in Preview.
    If you open the same pdf in Adobe Reader app, you would see the added annotations saved in the pdf file.
    Please do let us know if this helps.
    Thanks,
    Rishi

  • Recently I updated to Maverick -- I also updated Numbers, Pages and Keynote.  NOW, I cannot open my pages documents.  I get a message that I need a newer version of Pages.  I have the newest version (5.2).  How do I get around this to view my documents?

    Recently I updated to Maverick -- I also updated Numbers, Pages and Keynote.  NOW, I cannot open my pages documents.  I get a message that I need a newer version of Pages.  I have the newest version (5.2).  How do I get around this to view my documents?

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Peter

  • How can I rotate a PDF document when viewing in adobe reader?

    How can I rotate a PDF document when iewing in adobe reader?

    That hardware button can actually be toggled to work either as a mute button, or a lock orientation button. This can be edited at the settings screen.

  • Drawing directly in the document window

    Can anybody provide sample code showing the basics of drawing directly in the document window? I'm thinking of something along the lines of the measure tool (pardon the pun).
    It looks like I'm supposed to use either the Annotator Suite or the Document View Suite to "invalidate" a rectangle in the document, followed by doing the actual drawing with the ADMDrawer Suite. But the documentation in this area is pretty sparse (for example GetDocumentViewInvalidRect and SetDocumentViewInvalidRect refer to a "fudged" invalid rect without explaining what that is) and I don't see anything in the Sample Code folder that explains this feature.
    Are the little text annotations ("path" "anchor") that pop up when using Smart Guides done using this method?
    Thanks,
    John

    (Sound of crickets chirping...)
    Boy, this forum is awfully dead in comparison to the InDesign SDK forum. Is no one writing Illustrator plug-ins anymore?
    But hey, I'll keep posting, if only for my own amusement, about my saga of writing a plug-in.
    I figured out some of the annotation stuff, but I'm still puzzled by some things.
    I started by simply trying to create a tool which would carry a 100x100 box around with it when moved on the screen -- no clicking or dragging yet -- much as the symbol sprayer, for example, has a nice circle (albeit of varying size) around it. I created the tool and added it as an annotator. When it receives a kSelectorAITrackToolCursor message, it simply captures the cursor location in a global and sets the PlatformCursor. When the tool receives a kCallerAIAnnotation message, I have this code:
    extern AIErr toolAnnotate( AIAnnotatorMessage *message ) {
        AIErr error = kNoErr;
        error = sView->ArtworkPointToViewPoint( message->view, &g->cursorPoint, &g->cursorPointScreen );
        g->annoBoundsScreen.top = g->cursorPointScreen.v - 50;
        g->annoBoundsScreen.bottom = g->cursorPointScreen.v + 50;
        g->annoBoundsScreen.left = g->cursorPointScreen.h - 50;
        g->annoBoundsScreen.right = g->cursorPointScreen.h + 50;
        ADMDrawerRef dr = sADMDrawer->Create(message->port, &g->annoBoundsScreen, kADMPaletteFont);
        ASRect myRect;
        myRect.top = 0;
        myRect.bottom = 100;
        myRect.left = 0;
        myRect.right = 100;
        sADMDrawer->SetDrawMode( dr, kADMXORMode );
        sADMDrawer->SetADMColor( dr, kADMBlackColor );
        sADMDrawer->DrawRect( dr, &myRect );
        sADMDrawer->Destroy( dr );
        sAnnotator->InvalAnnotationRect ( message->view, &g->annoBoundsScreen );
    This (should) convert the cursor location (in artwork coordinates) to screen coordinates, set the annotation boundaries based on this location, create the drawer reference, and draw the 100x100 rectangle within this reference. Finally, it invalidates this rectangle as per the Annotation suite documentation.
    I fired up the tool in Illy 10 and saw a single box created down at the 0, 0 point on the page. No box followed the cursor. Hmm. I added an sADMBasic->Beep() to the annotation code and realized what was happening -- my tool was getting an annotation message when first selected, but none when it was merely moved around the screen.
    After some futzing around I discovered that if I added a call to sView->SetDocumentViewInvalidDocumentRect in the TrackToolCursor code, I got an annotate message every time the mouse was moved! I captured the previous cursor position and invalidated the rectangle 50 points on all sides from it. and tried again. Success -- partially.
    At this point, the cursor could be moved around with the box following it. It suffers, however, from the following bugs:
    1) The SetDocumentViewInvalidDocumentRect is in artwork coordinates and so only works at 100% or greater. If I zoom out, my little box leaves trails all over the screen. In addition, if I zoom in, the cursor stutters noticeably -- I assume because Illustrator is forcing a redraw on large portions of the document. I think I can fix both these bugs by recalculating the SetDocumentViewInvalidDocumentRect into screen coordinates. However I note that the circle of the symbol sprayer can be made huge -- as large as the screen -- and it still moves smoothly. So maybe calling sView->SetDocumentViewInvalidDocumentRect is not the way to force annotations. But I haven't been able to discover another way.
    2) When the mouse moves into a palette, the square remains "hung up" at the last position where the cursor was in the document window. I think I can fix this by utilizing the Suspend and Resume notifiers and doing one last InvalAnnotationRect when I get the Suspend notification.
    3) For fun I tried clicking and dragging. Bad news. If I do this, thereafter the entire Illustrator window only redraws iself in the small rectangle that was set when I created the drawer port. By chance I found that if I use another tool that annotates such as the pencil *before* I use my tool, then everything is fine (although of course the box doesn't follow the cursor around anymore because my toolMouseDrag code is empty). How is using a previous tool "fixing" my code? I don't understand this one at all.
    Anyway, I suppose I could fork over a wad of cash and join the ADN and purchase a support case -- but hey, I'm just a hobbyist messing around at this point and facing some rather crappy documentation. Any tips will be much appreciated.
    John

  • Since iOS 4.2.1 Update - Document viewer Apps do not work right!

    Before I updated to iOS 4.2.1 Air Sharing (Document Viewer) was working (so were all my Document Viewers), but currently, they do not work correctly. I have checked about three others...all have the following problems:
    Since I updated (to iOS 4.2.1), all the documents open up to FULL SCREEN mode (which it had never done before, since the very beginning of the AppStore). Full Screen mode means that it looks like a Word Document on the computer, with the margins showing. This is rediculous for the screen of an iPhone or iPod Touch. There is no need to see the margins. Also, the font size is so small that it makes it almost impossible for most people without a magnifying glass. The document used to open up to a "zoomed in" view of the text. This allows the person using the application to actually read the text. This also allowed scrolling up and down easily. Now, with the new Full Screen view, to get the text large enough to see, you have to double tap (or spread your fingers on the screen to scale it big enough) on the text to read it. Then, when you scroll up and down, it sometimes scrolls side to side or diagonally (into the white margins), making reading cumbersome.
    The other problem with the new view is that the font sizes are all messed up. The normal font (whether 9 pt. to 16 pt.) looks the same. The italic font looks bigger than the normal font, though it is the same point size. It skews the page and alters what the original documents looks like.
    I have contacted the developer of Air Sharing to complain, but he said the following:
    Hello,
    Thank you for the test file. I do see what you're referring to. We use Apple's built-in Office viewer for Air Sharing. This means to display files like .docx ones, we use Apple's viewer. It's possible they changed their viewer in the most recent iOS update to cause this change. Because it's not our viewer we have no control over how it displays such files. Other apps using Apple's viewer will encounter the same issue. I wish there was more we could do on our end to help resolve this problem.
    Cheers,
    Elliot Chase
    Avatron Software, Inc.
    Please tell someone to fix this situation. I can provide you with information (and screen shots of before and after) to back up all my complaints. Thank you for listening.

    Ah, so that could be a good search term.
    Things get a bit more weird though. I was looking through the commands in the drop down menu and saw under "Archive" this: "Put/Send the Apps you bought to this computer" (rough translateion in English) So I tried that out.
    I could only do that by going to "Store" and (**** how to say that in English) "Allow" this computer to do that. This is weird as this is the same computer that I have always used for anything to do with the iPhone! I have now 2 computers that are allowed to sync, and it is one machine. Beats me!
    At a certain point the transfer proces stopped again and again I was requested to "empower" this computer again, as out of the 65 apps now 21 were not allowed to be transfered! That did not work. It now keeps telling me that I have 2 computers allowed for transferring apps and these last 21 can not be put in the library.
    I am a bit at my wits end!
    But really thanks for trying to help out! It seems that 4.2.1 has some real problems when reading through the discussions!
    Cheers!

  • How do I merge multiple pdf documents into 1 with my iPad ?

    How do I merge multiple pdf documents into 1 with my iPad ? We are required by our customer 1 document that includes 4 different documents from different departments. Currently with our PC we can merge PDF files, excel or word files in to 1 PDF document. How can I do the same with our iPads and iPad minis using adobe?

    blogs.adobe.com We are excited to announce that Adobe CreatePDF application is now available on iOS. With this, Adobe brings rich, high-fidelity and Acrobat-like PDF creation to the iOS devices. You can now convert all your documents on iPad, iPhone & iPod touch devices to PDF for reliable, secure sharing and viewing across PCs, tablets & Smartphones.
    Robert Monsalve
    [signature removed by host]

  • How do I generate a Word document and a PDF from Help files?

    Hi,
    I am new to RoboHelp HTML, and am using version 8.  I updated some Help files, and now I want to generate output.  Here are my questions/ or the process I used:
    To compile the help, I clicked Generate Primary Layout.  Is this correct?  I noticed that the date stamp on the xpj file has not changed.  The date is still from many months ago.  (Why is that?  Should it show a recent update date?)  However, the files that I updated do reflect the dates when I made the updates.  These include art files, an hhp, and htm, js, ldb, pss, cpd files.
    To generate a pdf, I clicked Generate PDF.  I was not able to generate the PDF at first, but then, I enabled macros in Word 2007 (Trust Center Settings > Enable all macros...and clicked the checkbox, Trust access to the VBA project object model), and clicked Generate PDF.  At the end of the generation, I got this error in Word: Microsoft Office Word has encountered a problem and needs to close.  We are sorry for the inconvenience.  The info you were working on might be lost.  Word can try to recover it for you.  I closed the dialog and Word generated several blank documents.  Microsoft Office Diagnostics was run and found one problem and corrected it.  Despite the error message, a pdf was generated.  (If you could give me any insight on why I got the error messages, that could be helpful to know).
    How do I generate a Word document?
    Thank you!
    Erin

    Welcome to our community
    Note that RoboHelp is capable of creating a variety of layouts. WebHelp, FlashHelp, AIR Help, Microsoft HTML Help, JavaHelp, Oracle Help, ePub and more.
    Any of these layouts may be nominated as the Primary layout. So when you generate the Primary layout, you get whatever has been configured as the Primary layout.
    Only certain actions will result in a change to the .XPJ file. The actions are indicative of major changes to the project. So I wouldn't fret the fact that the date time stamp wasn't updated.
    Indeed the Printed Documentation Single Source Layout recipe is what you use to create PDF. Generally what happens is that RoboHelp creates a Microsoft Word document as an intermediate file type, then creates the PDF from that. As you might imagine, there are a host of things that can go wrong during the process. I might suggest that you first get a Word document to generate cleanly. Then once you do that, focus on PDF. I know that I typically gen a Word document and stop there. I just open Word and use Word to create the PDF.
    If you look at the properties for the Printed Documentation Single Source Layout recipe (View > Pods > Single Source Layouts then right-click the Printed Documentation layout and choose Properties) you will see that PDF, Word or both are options at the top of the dialog.
    Hopefully that gives you a nudge in the right direction.
    My fellow Adobe Community Expert Peter Grainge has excellent info on Printed Documentation on his site at Grainge.org. Click the link below for that.
    Click here to visit Peter's site
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcererStone Blog
    RoboHelp eBooks

  • How to configure and set a default view for contents of a data set

    Here is my scenario:
    I have a document library where each item is a "Plan".  "Plan" is of a custom content type that inherits from a Document Set content type but has some additional attributes such as Plan Type.  Inside each Plan, each item is
    a Plan Document which is of custom content type Plan Document which inherits from Document content type but has some additional attributes e.g. Document Status.
    So the hierarchy is:
    All Plans (document library)
         Plan 1  (custom content type that inherits from Document Set but also has a "Plan Type" attribute)
                 Plan Document   (custom content type that inherits from Document but also has a "Document Status" attribute
    When I click on the document library, I want to see all the folders (e.g. Plan 1) where one of the columns will be "Plan Type"
    When I click on an individual Plan (e.g. Plan 1) I want to see the contents of that custom document set.  At this point, since this page shows contents of one document set, I want to see the column "Document Status" but NOT Plan Type since
    Plan Type applies to the document set as a whole, not to an individual item in that document set.
    However, I don't think I have it set up correctly because right now the "Plan Type" column is visible both on the list of all document sets AND on the page that shows the contents of one document set.
    I've found a discussion on this topic here:
    http://sharepoint.stackexchange.com/questions/61565/how-can-i-set-a-custom-default-view-for-a-document-set
    where one person said "When you click on a Document Set content type in library settings, one of the options is "Document Set settings". The last option in this dialogue allows you to select a defined view on the library that will be used
    to show the contents of that Document Set."  I don't see that view selection.  The last item on the document set settings page is "Update List and Site Content Types".  The field before that is for customizing the Welcome page. 
    However, I don't want to customize the Welcome Page as a whole, I just want to customize the columns that are displayed on the list of content of this document set.
    thanks

    I finally found the answer:
    At the document library level, create a new view to use when displaying the files in the document set
    Go to the document library settings
    Select your custom content type (in my case it was "Plan")
    In the next screen select Document Set settings
    Select your newly created view at the Welcome Page View section
    Press Ok
    Now the default All Documents view will be shown when displaying all the document sets and the newly created view will be displayed when viewing one document set with the files within.

  • How to control access to a document library based on fields of the list?

    Hi, 
    I need to give access to a document library but the users who need permission are unknown until the form
    is submitted to the document library.  The 2 users information are in 2 fields of the form.  I created a infopath form and a workflow with it.
    I need to give the "CreatedBy" user, the person who completed and submitted the form, and the
    Requester (a data field on the form), both need access to the new document library or just to the forms they submitted.  How do I setup access for the createor and requester of the form?  These are unknown until the time of the form submission and
    it's dynamic.
    Anyway to implement this in SP?  If not what about coding for when the form is loaded.  Can
    someone point me to a sample coding for ref fields in the form when form is first loaded up?  Also, how to redirect to a access denied view in the code.
    Thank you.

    It's not easy OOTB but it can be done if you either use code or use some code someone else created.
    Have a look at this on codeplex
    https://spdactivities.codeplex.com/wikipage?title=Grant%20Permission%20on%20Item

  • How do I save a scanned document as a PDF file?

    How can I save a scanned document as a PDF file.  I'm using a Photosmart C6280.
    This question was solved.
    View Solution.

    If you still have the document re-scan it using the Solution Center saving it as a pdf file.
    Please mark the post that solves your issue as "Accept as Solution".
    If my answer was helpful click the “Thumbs Up" on the left to say “Thanks”!
    I am not a HP employee.

Maybe you are looking for

  • How to use pre-defined scenarios for RosettaNet with XI 3.0

    Hi all.    I am working in Comgroup Shanghai co. ltd. which is partner of SAP China.    We have a potential customer who use RosettaNet as their Supply Chain EDI system.    I would like to make a demo for demostrate the pre-defined scenarios for Rose

  • Bit of a strange question regarding security and internet connection

    This is a bit of an odd question so bear with me for a moment. I sold my old G4 to someone I didn't know yesterday. While he was looking at it to make sure it was working I allowed him to plug my ethernet cable in (connected to both a netgear router

  • I cannot update or uninstall iTunes with Windows XP.

    I have an older OS (windows XP) and have been trying to update iTunes.  I keep getting a message saying that Bonjour is on another network that I do not have access to.  It then tells me that iTunes.msi is not available either.  Now I am not able to

  • How to use the RV_EXPORT_CONTROL function (via 2LIS_11_VAITM extractor)

    Hi guys, I use the 2LIS_11_VAITM extractor to load R/3 data to BW. On this extractor, there is an user exit which filled many fields. I have to add the export control status of items, the value we can find in VA03 (Extras -> Export Licence -> Log ->

  • Itunes freezing when launched.

    I just upgraded to 7.5 and now my itunes will not open properly. I read other peoples posts about "missing files" and itunes not even starting up at all.. I think my problem is a bit different. When I click on the itunes application to launch.. itune