Beiträge von wpsupport

    Coordinates in PDF are limited to 32000 by the PDF specs - so an xresd/yres of 25400 can cause a problem when you display the PDF on certain PDF readers which respect this limitation.

    So you needs to use a lower resolution and ModifyWorldTransform to scale your coordinates to the low res surface.

    Better avoid SetWorldTransform, it is a specialty supported by windows but not by PDF. (The transforms are always based on each other). Use SaveDC/RestoreDC to return to the unmodified world after you draw a rotateds object.

    If you use SetWorlkdsTransform wPDF has to create an inverse matrix which may not always give correct results because of rounding errors which cannot be avoided.

    A Table is aligned by this properties WPAT_BoxMarginLeft and WPAT_BoxWidth.

    You can use this code:

    Code
    l := WPRichText1.ActiveParagraph.AGetDef( WPAT_IndentLeft, 0 );
    r := WPRichText1.ActiveParagraph.AGetDef( WPAT_IndentRight, 0 );
    par := WPRichText1.TableAdd(3, 4, [
            wptblReturnCreatedTableObject, 
            wptblActivateBorders, 
            wptblReuseCurrentParIfEmpty]);
    par.ASet( WPAT_BoxMarginLeft, l );
    par.ASet( WPAT_BoxWidth, WPRichText1.Header.PageWidth-
    WPRichText1.Header.LeftMargin-
    WPRichText1.Header.RightMargin-l-r );

    Note the flag wptblReturnCreatedTableObject - it is mandatory for this code to work.

    Unless your system is RTF based, you can use WPAT_BoxMarginRight, too:

    Code
    l := WPRichText1.ActiveParagraph.AGetDef( WPAT_IndentLeft, 0 );
    r := WPRichText1.ActiveParagraph.AGetDef( WPAT_IndentRight, 0 );
    par := WPRichText1.TableAdd(3, 4, [
        wptblReturnCreatedTableObject, wptblActivateBorders, wptblReuseCurrentParIfEmpty]);
    par.ASet( WPAT_BoxMarginLeft, l );
    par.ASet( WPAT_BoxMarginRight, r );

    As you probably know characters use a index value (CharAttr) which references to the character attribute table in RTFProps.

    This means that you only have to assign the index value to assign multiple characters to make them use all the same attributes.

    On the other hand also paragraphs may have attributes. The one with the low numbers (up to 15) are the characer attributes. They are assigned with par.ASet. The character attributes however have precedence, so if a paragraph uses an attribute also the character use, you will not see the value of the paragraph.

    In you case you need a character attribute set for an empty paragraph which should be applied to characters as soon as they are typed in. The index value for this new characters is stored in TParagraph.LoadedCharAttr. So you need to assign the calculated index value there. (the name is historic, since RTF uses something like this when loading empty paragraphs)

    To calculate the index values you can use the AttrHelper object.

    Code
    var cha: TWPStoredCharAttrInterface;
    var HeadlineA : Cardinal;
    
    cha := RTFMemo.HeaderFooter.RTFProps.AttrHelper;
    cha.Clear;
    cha.SetFontName('Times New Roman');
    cha.SetFontSize(12);
    HeadlineA := cha.CharAttr;

    Also see the demo unit WPCreateDemoText.pas.

    The current version has this kind of selection right out of the box.

    In October 2017 a new double click management was introduced in wpctrmem. It is activated by

    the symbol USE_STD_DBLCLICK.

    Of course you should contact support for help with an outdated version since this does not affect the current version.

    Sure, you need to read out the object under the mouse cursor.

    This code is from one of the demos. It was made to show a panel to pick values for a field from. It uses a time to hide the panel.

    The Contents can be read with fieldobj.EmbeddedText.

    Zuerst muss gesagt werden, dass RTF nur bestimmte Auswahlen (Range: TWPPagePropertyRange) unterstützt, das sind alle, erste, gerade und un gerade.

    WPTools kann aber auch andere, insbesondere

    wpraOnLastPage, wpraNotOnFirstAndLastPages, wpraNotOnLastPage, wpraIgnored, wpraNotOnFirstPage

    Andere Auswahlen bedürfen Programmierung über das Ereignis OnGetSpecialText. Hier kann in abhängigkeit der nummer der aktuellen Seite ein Kopf- oder Fusstext für diese spezielle Seite ausgewählt werden. Diese Auswahl gilt dann nur für die Anzeige (oder Druck) in diesem Moment. Gespeichert wird die Auswahl nicht, da der Text ja grundsätzlich nicht in feste Seiten unterteilt ist. Hier kommt dann "Benannt" ins spiel, da für die Auswahl der Name herangezogen werden kann.

    Die Reihenfolge im Menü in HeaderFooter dialog wird vorgegeben in der unit wpManHeadFoot.pas, procedure TWPManageHeaderFooter.InitMenu. Die Reihenfolge ergibt sich aus der schleife

    for r := Low(TWPPagePropertyRange) to High(TWPPagePropertyRange) do

    Mit der Eigenschaft PossibleRanges kann ausgewählt werden, welche Element sichtbar werden können.

    Acrobat verwendet meines Wissens nicht GDI+.

    Gerade auf einem Terminal Server kann das ganze mit der Rechteverwaltung zu tun haben. Ich habe da leider keine weitere Einsichten. Ich prüfe den Code nochmal auf Handles vom Desktop. Ich nehme an es handelt such um die letzte Version WPViewPDF 5.x?

    WPViewPDF 5.0.4.0 release 10.12.2021

    + in AcroForm fields the /MaxLen parameter is now loaded and saved and also used by the rendering.

    Using MaxLen a certain count of characters can be specified in a field so the characters are

    spaced accordingly.

    * Improvements to AcroForm Load&Save code

    + command COMPDF_LoadStreamAsWatermark