Beiträge von support

    WPTools formats the text only in idle phases. This uses messages. If a message is missing formatting does not take place and the editor could look empty.

    To get more information I would hide a button somewhere which saves the current content to a file - so you can see if the editor is really empty.

    Also useful is code which calls ReformatAll directly or the function CheckHasBody which makes sure a document is selected for view. (WPTools separates display from text storages).

    Julian

    WPViewPDF 4.1.5.3 release 2.8.2016
    - fix problem when 64bit DLL was used with .NET 4.5 (This fix is also available for WPViewPDF V3)
    - fix problem with lost image resource when saving PDF

    WPViewPDF 4.1.5.2 release 28.7.2016
    + using command COMPDF_MODIFIED it is possible to check if the contents were modified by the user, i.e. if pages were moved.
    + new function pdfMakeImageEx can load the PDF data from a IStream and save one ore multiple images to an IStream.
    + new unit: wpcubed_pdf_plugin has been added to use WPViewPDF with ImageEn, the powerful image component for Delphi.
    + new WPViewPDF Edition "WPViewPDF MakeImage" which supports pdfMakeImageEx only.

    WPViewPDF 4.1.5.1 release 15.7.2016
    - do not show OCR text on certain scanned document
    + support for Win2151Encoding (not standard)

    WPViewPDF 4.1.5 release 30.6.2016
    * improved rendering code for auto-textheight multiline freetext annotations
    + when saving a PDF the Catalog/AF array is also saved.
    * the saving of names dictonaries has been changed so save names to merged documents, too.
    + new ViewOption: wpDisableAnnotTextEditInEditMode
    + new commands to add file attachments to a PDF file
    COMPDF_Attachment_AddAF, COMPDF_Attachment_SetData, COMPDF_Attachment_SetProp
    + new DLL methods to create a non-visual "PDF workbench". With the created object most
    viewer commands can be used to examine and manipulate PDF data. This can be helpful if you need
    a powerful PDF tool in C++.
    * editor will switch into text edit mode of text annotations on click on selected object, not at once

    WPViewPDF 4.1.4'' release 20.6.2016
    - fix display of some (OCR) fonts which are not embedded but loaded from system

    WPViewPDF 4.1.4' release 14.6.2016
    - fix a checkbox saving glitch

    WPViewPDF 4.1.4 release 8.6.2016
    - URI links were not working - now OnHyperlinkWWW can be used
    + scale the PDF pages when saving to a new PDF file
    New commands: COMPDF_SaveScaledPDFMode, COMPDF_SaveScaledPDFSetX and COMPDF_SaveScaledPDFSetY
    When using Delphi you can use the method ActivateScaledPDFWriting to enable the scaling.

    WPViewPDF 4.1.3' release 17.5.2016
    + annotation flattening mode UseOriginalDataForRendering
    + allow the sign ~ to be used in PDF names

    WPViewPDF 4.1.3 release 14.5.2016
    + It is possible to flatten PDF forms - the annotations are rendered into the PDF.
    + new action "FlattenAnnotations" in group 4, Draw Operations (by default hidden, use RequiredOptionalActions to show)
    + added annotation save modes to remove annotations and widgets
    + it is now possible to set and modify the draw object options using commandCOMPDF_Ann_ModifyAddProps
    - fix annotation loading problem - transparency was not loaded
    * improvement in annotation export code
    + new parameter RequiredOptionalActions in procedure WPPDFViewerInitMainMenu

    The textobject belogs to a paragraph can may not be created like this.

    as I said:

    Zitat

    You will have to add a new and positioned image inside the MailMerge event and leave "Contents" unchanged. You can do most operations with the TWPRichText inside the event, since the contents of the field are selected when OnMailMergeGetText is beeing called.

    While the program is inside the event handler you can insert an image into the text using the usual (cursor) methods and NOT use Contents.

    Hi,

    You will have to add a new and positioned image inside the MailMerge event and leave "Contents" unchanged. You can do most operations with the TWPRichText inside the event, since the contents of the field are selected when OnMailMergeGetText is beeing called.

    Julian

    Yes, thanks, is the correct link.

    With WPViewPDF PLUS Version 4 it is possible to load PDF and convert selected or all PDF into a watermarks for other PDF files. The PDF to Watermark feature preserves the original PDF data of the watermark PDF file, this is important to keep the PDF size small and the quality at the best.

    Hi,

    I can only try to reproduce this with an example PDF. Some PDFs cannot be converted to text very well, this has a lot to do with how the text was added and if proper ToUnicode tables are there.

    Julian

    Zitat

    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.

    Usually annotations loaded from PDF are not touched. They will not automatically be converted into movable objects.

    If the PDF file is saved, it is possible to remove all annotations (and other items) by using the COMPDF_SetSaveMode command with several flags.

    If, and only if, the annotations are converted into objects they can be moved, changed and deleted. New annotations can be added.

    This is done in PDFEdit.exe (and the example projects)

    // Make sure the annotations work interactively!
    newTab.wpviewpdf.Command(COMPDF_ACRO_MAKEDRAWOBJ,'',0); // 0=all Annots!

    The modifications will only be saved after
    wpViewPDF1.Command(COMPDF_Ann_SetAnnotSaveMode, 1);

    Hi, If you do a programmatic change of the text, such as mailmerge, any you need to print or PDF export right away it is required to call ReformatAll.

    Reason: WPTools format the text when in idle phase, if there are none, ReformatAll must be called. If the text is visible on screen, ReformatAll is not required.

    Hi,

    to remove all formattings from an RTF text there is a very fast function
    function WPToolsRTFToANSI(const inputstring: AnsiString; Codepage : Integer = 1252; maxlength : Integer = 0): AnsiString;

    That is globally defined, not part of TWPRichText.

    You can also use
    WPRichText.AsString := rtftext

    ansitext := WPRichText.AsANSIString('ANSI') which will work a lot slower than the above method.

    You cannot use the TWPCombos for this since it only lists the colors which are used by the text already. There are color drop down component availoable on the market.

    You can use any color in the text but you need to add it to the RTF text to use it.

    This is done by the function
    WPRichText.GetColorNr(aColor: TColor): Integer;

    The result value it the color index which can then be used.

    Found in WPCtrMemo.pas - WPTools 7:

    {:: Load the text from a string. Insert at current position. This is slower than using InputString and InputText }
    function LoadFromString(const X: AnsiString; FormatString: string = '';
    WithClear: Boolean = FALSE): Boolean;

    >> Additionally: How do I retrieve the resulting RTF (=the base RTF string containing encodings)?

    I would use the function AsANSIString which also uses a formatstring to sepcify the format, such as "RTF-nobinary".

    Please use ANSIString and not unicode strings since RTF is a single byte char based format (originally ASCII!)

    Julian

    Hi,

    RTFVariables are not automatically used and exported into the PDF. That would cause privacy issues in many cases.

    I recommend to set the wPDF.Info strings prior to export with the values you need to export.

    Julian