Beiträge von wpsupport

    This means tagged PDF which wPDF always was able to create, but it requires special graphic routines and will created by the WPTools export.

    At start the validators did not complain about those tags, in contrary, marked them as mistakes. Most PDF do not use tags.

    In "Modes" there is a switch: wpNoAutoTagsForPDFA

    Unless this flag is used a page tag is always added, mostly to disable error messages.

    Die Demo macht dies ja so:

    Code
         for j:=page.EmbeddedObjectCount([wpobjTextObject])-1 downto 0 do
         begin
            obj := page.EmbeddedObjectGet(j);
            if obj.Name='LASTTOTAL' then
            begin
              ResultText := obj.Params;
              UseIt := TRUE;
              exit;
            end;
         end;

    und das funktioniert auch. EmbeddedObjectCount initialisiert ja, wie Sie sicher im Quellcode gesehen haben, die Liste sodass der Fehler vermutlich woanders herkommt.

    Wenn Sie das $DEFINE WPDEBUG aktivieren bekommen Sie einen konkreten Hinweis darauf, wo der Laufzeitfehler auftritt.

    If you really need the physical size you need to check what image is loaded in Graphic or in the stream. The unit wpobj_image will give you an idea. The question is what do you need those values vor?

    The way TWPObject.GetContentsWH works it usually takes the screen resolution as reference, but it also limits the size to a page size since bitmaps could be really big otherwise since they do not store a dpi value, at least jpeg does not.

    So könnte man den link der im Klemmbrett steht umwandeln:

    Oder, wenn man den source verstecken will

    The use of ObjRef.Picture.Width and ObjRef.Picture.Height is not recommended. Picture is a sole container for the bitmap non not the owning object.

    WPTextObj.Width and WPTextObj.Height is the required size of the image in twips.

    The functions ContentsWidth and ContentsHeight return the actual, not stretched size of the loaded image in twips.

    Am meisten Kontrolle hat man über das Ereignis BeforePasteText:

    ( Sender: TObject; RTFData: TWPRTFDataCollection; par: TParagraph; Stream: TStream;

    Reader: TWPCustomTextReader; OnlyBodyText: Boolean; var LoadedText: TWPRTFDataBlock);

    Man kann hier die Attribute nach Notwendigkeit durch direkten Zugriff auf par anpassen.

    LoadedText könnte man auch auf einen ganz anderen TWPRTFDataBlock richten welcher dann stattdessen eingefügt wird. (nil ist bisher nicht möglich)

    In diesem Fall wird es aber vermutlich bereits reichen, das entsprechende Flag in der property ClipBoardOptions zu setzen:

    TWPClipboardOptions = set of

    ( wpcoNoInternalDragAndDrop, // Switch off the internal drag&drop

    wpcoNoDragAndDropFromOutside, // Allow only Drop from within

    wpcoAlwaysDeleteInDragSource, // Delete dragged source text if from different editor, too!

    wpcoDontMoveCursorDuringDrag, // Do not show cursor when dragging

    wpcoNoAutoSelSpaceExtension, // Don't select preceding or trailing spaces when doing Drag&Drop

    wpDontHideCaret, // do not hide the caret while selection is active

    wpcoDontPasteWPT, wpcoDontPasteRTF, wpcoDontPasteANSI, wpcoDontPasteUNICODE, wpcoDontPasteHTML,

    wpcoPasteHTMLWhenAvailable, // Paste HTML even if RTF is available (unless wpcoDontPasteHTML was set)

    wpcoDontPasteGraphics,

    wpcoDontCopyRTF, wpcoDontCopyANSI, wpcoDontCopyUNICODE, wpcoDontCopyWPTOOLS, wpcoPreserveBorders, wpcoPreserveShading,

    wpcoPreserveIndents,

    wpcoDontAutoAppendSpace,

    wpcoPasteAsNestedTable, // - cells are always pasted as nested table

        wpcoDontPasteFonts, wpcoDontPasteFontSizes,

    wpcoDoNotUseInsertMode, // Any paste operation will completely replace the document!

    wpcoDontCopyProtectedText, // Do not copy protected text - independently to ppProtectSelectedTextToo

    wpcoDontCopyProtectedAttribute, // Do not save the afsProtected Attribute

    wpcoAlwaysCopyImagesEmbedded, // Copy BLOB data for linked images

    wpcoAlsoCopyHTML, // also copy HTML to clipboard

    wpcoAlsoPasteRTFVariables, // Per default don't load RTF variables from clipboard

    wpcoDontPasteWhenTextIsSelected,

    wpcoPastedANSIDoesNotInheritParAttr // By default, when pasting ANSI text the new paragraphs inherit the current paragraph attributes

    );