Posts by support


    I think I sent you a mail already, but in case anybody else has this question:

    How the PDFEdit demo is built described in the PDF manual. It uses the new inbuilt "actions" - that are named commands. The name of the commands should be self explanatory.

    Using the PDFEdit demo in menu "Demo" it is possible to extract the "Action XML script". That is XML data which containes the name, the caption and the hint for each action. That XML can be also used to translate the internal actions.

    The PDF edit simply calls the action methods in a loop to build the toolbar and the menu. To do so each available action name (or id) is retrieved and stored. When the menu or toolbar is clicked the name or id is used to execute a function in the DLL.

    The COMPDF_SetActionModeworks differently. It simply changes the current mouse mode. It is internally used by the actions mentioned above.

    I recommend to use the action names using this commands, most important COMPDF_ACTION which simply gets the name of the action

    // ------------ GUI Interface - Actions
    COMPDF_ACTION = 580; // Execute Action. StrParam : ActionName=ActionStrParam, IntParam as required
    COMPDF_ACTIONNR = 581; // HighWord=Kind, LowWord = Operation, StrParam is passed
    COMPDF_ACTIONEX=582; // Extended Action - with param as record (RESERVED)
    COMPDF_ACTION_READ = 583; // Read Action Properties

    // strparam="?actionname" returns the command id (HighWord=Kind, LowWord=Operation)
    // for the action with the name actionname. Returns 0 if not found.
    // strparam="xml" - read all strings and commands as XML list!
    // Yoi can localize the strings and use COMPDF_ACTION_WRITE to write the string back.
    // strparam="actionnames" - read all action names with their description in the format name=caption. If bit 1 is set in intpar
    // ;hint will be written, if bit 2 is set, ***Action kind captions will be written

    // strparam="caption", IntParam = HighWord=Kind, LowWord=Operation. Result can be ''
    // strparam="hint", IntParam = HighWord=Kind, LowWord=Operation. Result can be ''
    // strparam="command", IntParam = HighWord=Kind, LowWord=Operation. Result can be ''

    // The following will return integer values!

    // strparam="kinds" - read count of kinds
    // strparam="kindX" - read count of opertions in kind X
    // strparam="flags", IntParam = HighWord=Kind, LowWord=Operation. Read action flags for this action
    // strparam="param", IntParam = HighWord=Kind, LowWord=Operation. Read the param bitfield as Integer (not string)
    // strparam="paramkind", IntParam = HighWord=Kind, LowWord=Operation. Read the parameter kind as Integer (not string)

    COMPDF_ACTION_WRITE = 584; // Write <?xml, caption=, hint=, command=.., option=.. to modify the action. IntParam as above (except xml)
    COMPDF_ACTION_READFLAGS = 585; // Read Action flags, optimzed COMPDF_ACTION_READ "flags"
    COMPDF_ACTION_READSTATE = 586; // Read Action state, 1=checked, 2=disabled

    WPTools 7 (and 6 and 5) does not use lines like WPTools 4.

    You can read and delete SubStrings in a TParagraph directly. The substring is identified by the length and start position.

    The Line* methods of TParagraph give you that numbers for a specific line.

    You have access to the unit WPIOHTML.pas which writes the HTML code. I assume you use HTML and not RTF since you get this codes.

    I recommend to make a change there, so it writes the form your parser expects.

    It would also be easy to use StrReplace to change the # codes into the ANSI chars you require.

    In genereal I would recommend to do the replacement inside the editor directly.

    You could use the function ReplaceTokes to create merge fields from all text inside of
    «{ and }»

    Then you can use MailMerge to update the text with your data.

    This problem always happens with C++Builder if the DeignID package was not linked in.

    Change the package options, under "Description" select "Designtime only"

    In the package options, under "Delphi Compiler/Compiling", "Other Options" add
    (Otherwise you get the message "file not found DesignIntf.dcu)

    Yes, InputString(#12) will insert a page break.

    BTW: Since WPTools 5 the WPReporter does not measure the page and so it does not create page breaks according to contents.

    But it will use hard page breaks, #12, from the template.

    as usual you can send me test data.

    If you set wPDF.DebugMode := true it will create EMF data which include the data which is passed to the PDF engine. By examining that data I am able to see what format has been passed and how.

    I expect that this JPEG is a CMYK jpeg which is not directly supported by the jpeg class in Delphi.

    Since it cannot detect that it is cmyk it also cannot change the PDF properties.

    If it is rendered ok on screen, it would be possible to render int into a new bitmap and export that.

    WPRichText1.RTFData.wpRecodeJpeg := true

    That InputFileMode is documented to be obsolete.

    It only worked for very simple PDF files at the times when product wPDF started.

    With WPViewPlus we offer a product which can merge multiple PDF files into a new PDF file, delete pages or reorder.
    WPViewPDF Plus can also add watermarks or simple texts, such a page numbering.