Beiträge von mdgodfrey

    You provided me previously with the list for COMPDF_SetActionMode:

    0 wpacUndefined, // ActionMode was not used yet
    1 wpacClickAndPan, // Standard Mode
    2 wpacSelectPage, // Select page by click
    3 wpacSelectObjects, // Select objects
    4 wpacSelectObjectsLocked, // Select objects, does not move them
    5 wpacFillForms, // Like wpacClickAndPan and allow widgets to be changed
    6 wpacDrawFrameAndZoom, // Zoom to rectangle, Copy rectangle, reset to wpacClickAndPan
    7 wpacDrawFrameAndCopyBitmap, // Copy rectangle, reset to wpacClickAndPan
    8 wpacSelectText, // Select text and invert visual
    8 wpacDrawFrameAndCopyText, // Draw a frame and copy the text within
    10 wpacSelectTextAndColor, // Select text and highlight.
    11 wpacSelectTextAndBlack, // Select text and black it out
    12 wpacSelectTextAndDelete, // Select text and delete (reserved)
    13 wpacDrawObject, // Draw a frame, create an object. Uses 2nd parameter
    14 wpacDrawObjectContinue, // Draw a frame, create an object.
    // Uses 2nd string parameter. Continue drawing
    15 wpacDrawAnnot, // Draw a frame, create an Annotation. Uses 2nd parameter
    16 wpacDrawAnnotContinue, // Draw a frame, create and the next ...
    17 wpacDrawField, // Draw a frame, create an Annotation. Uses 2nd parameter
    18 wpacDrawFieldContinue, // Draw a field, create, and the next
    19 wpacDrawFrameAndEvent, // Draw Frame and trigger the event

    Then you referred me to the PDFEdit demo.
    However that demo, to me, is fairly cryptic since when I search for SetActionMode there only two references.

    So, I am still looking for documentation that more clearly explains the usage or a demo that actually contains code to show how to manually implement these actions. There is a lot going on in the PDFEdit demo but it is hard to determine what is going on since most of the actions seem to be loaded at runtime and so can't be accessed directly as a tutorial.

    Your help is appreciated.

    I haven't been able to work on this for a while but I am confused now by your last reply.
    Because with this line of code added:
    wpViewPDF1.Command(COMPDF_Ann_SetAnnotSaveMode, 1); //Annotations are saved in the PDF

    This is how I get annotations to actually be in the saved PDF if new annotations have been added to the PDF.
    If I remove the line I get no NEW annotations saved in the PDF but the old ones remain.
    This seems to be opposite of what your last reply implies.

    But at any rate I am trying to remove all annotations from a PDF that has been saved and is now being re-opened. In case that wasn't clear.

    The annotation editing in now fixed. Thanks.
    The problem I am having now is that if I try to open the document in another editor, i.e. Adobe the highlight annotations are opaque.
    They appear as expected in a WPViewPDF component but not in other PDF Viewers.

    Final answer:
    My prior post was correct.
    The only way I can get left hand thumbnails (navigation panel) on every PDF is to do the following.
    Set PageModeDefault to wpPageModThumbNails.
    Then in code add the following, after each time a PDF is loaded:
    WpViewPDF1.CommandEx(COMPDF_ShowNavigation, 1);

    Without that line of code the left hand navigation comes and goes and I can't predict when.
    I have the property wpNavigationPanel set to True in the ViewControls as well, but without the above line in code it comes and goes.

    I am having problems with WPViewPDF switching in and out of Thumbnail mode. I always want to show thumbnails.
    I have PageModeDefault set to wpPageModeThumbnails
    I have ViewOptions with wpViewThumbNails set to true;
    I also have wpInteractiveThumbNails set to true;

    I also have this code executing after load a PDF:
    WpViewPDF1.ViewOptions := [ wpViewThumbnails ];
    WpViewPDF1.PageModeDefault := wpPageModeThumbnails;
    WpViewPDF1.CommandEx(COMPDF_SetPageModeDefault, 1);

    But still I have some PDF's that want to show no left bar, some want to show bookmarks and some want to show Thumbnails.
    It seems to be behaving as though PageModeDefault is set to Auto.

    I don't seem to be able to find documentation to explain what all the options are for the 'param' parameter for a line line this:
    Param := Format('"Color=%s","Alpha=325"', [ColorStr]);
    wpViewPDF1.Command(COMPDF_SetActionMode, Param ,15);

    The above line of code draws a box that is filled with white and the border is the color selected.
    What I want is to draw a highlight box filled with ColorStr color.
    It seems that I need to add another parameter but I can find a reference to the parameter that would let me describe the box fill color.

    This line of code does what I want but is in the old format:
    vals[0] := 'DrawAnnotHighlight';
    ColorStr := ColorToString(cbHighlightColor.SelectedColor);
    vals[1] := Format('"Color=%s","Alpha=325"', [ColorStr]);
    if wpViewPDF1.CommandStr(COMPDF_ACTION, vals[0] + '=' + vals[1] )=-2 then

    Thanks

    I have another issue with Annotation Edit Mode.
    When a high-lite annotation if first added it respects the "Alpha" setting.
    The if the document is saved the "Alpha" setting remains as expected.
    However, when I put that document back into Edit mode the high-lite goes completely opaque and disregards the "Alpha" value.
    This make is hard for the user to adjust the size of the high-lite.
    Can this be fixed so that the original "Alpha" setting remains in subsequent Annotation Edit modes?

    I mostly interested in deleting all annotations as a clear function.
    I am looking for a way to allow the document to be saved without any annotations.
    The annotations will mostly be used for my users own purposes but they want to send it to someone else without the annotations.

    I am trying to implement a highlight button in Version 4.
    I would like to change the cursor one the user selects the option to draw a highlight, remain on while the highlight is drawn and then change the cursor back to the default.

    Can you provide an example. Change the Cursor property seems to have not effect.

    Thanks

    I have a couple of stamping questions:

    1 - Can a stamp be added that would just highlight existing text in the PDF?
    2 - Once added can stamps be turned off and back on all at once.
    3 - Can #2 be done on subsequent loads of a PDF?

    Thanks