ZitatWie prüfen sie, ob und welche Tags das Dokument enthält?
Ich öffne sie mit einem speziellen Werkzeug, dass die PDF in seine Bestandteile zerlegt.
ZitatWie prüfen sie, ob und welche Tags das Dokument enthält?
Ich öffne sie mit einem speziellen Werkzeug, dass die PDF in seine Bestandteile zerlegt.
Was spricht dagegen die Tabelle mit AppendTable zu erstellen?
Der Text im Footer oder Header wird nicht konkret für jede Seite formatiert.
Daher ist es wichtig derartige Objekte so mit Leerstellen aufzufüllen, dass die Werte auf allen Seiten hineinpassen. Das lässt sich technisch nicht anders machen.
Bitte definiere Breiten für die Spalten:
#10+ ' <th width=400>Month</th>' +
#10+ ' <th width=400>Savings</th>' +
Es gab da bewusst keine Änderung da die Druckengine von WPTools sich nicht geändert hat.
Dieses Dokument besitzt tags.
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:
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.
The grid should be linked to a TDatasource.
Ein TWPRTFDataBlock kann auch einen Name haben - normalerweise ist der leer. (vgl. HeaderFooter.Get(...) )
Ich empfehle Ihnen aber OnGetSpecialText zu verwenden.
In ProtectedProp gibt es verschiedene Schutzeinstellungen, mann kann die sg. InsertPoints schützen.
.....Ein Feld in einer Zelle ist bedingt sinnvoll, in so einem Fall reicht of nur der Zelle einen Namen zu geben. Diese kann man dann auch finden.
Gerade verschickt, vielen Dank!
WPTools 9.1 - ja, wird komplett unterstützt.
Am einfachsten über den Windows Emoticon Dialog:
Drücke Windows + . [punkt] taste 👍
WPTools 9.1 unterstützt hier, anders als viel Software, auch kombinierte Emotions, also mit Attributen versehene Symbole.
You can use GetContentsWHPix
Example:
var w,h : Integer;
WPRichText1.SelectedObject.ObjRef.GetContentsWHPix(w,h);
Im Admin Bereich ist hierzu leider auch nichts ...
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:
procedure TForm1.WPRichText1BeforePasteText(Sender: TObject;
RTFData: TWPRTFDataCollection; par: TParagraph; Stream: TStream;
Reader: TWPCustomTextReader; OnlyBodyText: Boolean;
var LoadedText: TWPRTFDataBlock);
var o : TWPTextObj;
begin
if (par.Next=nil)
and (par.StartWithW('http://') or par.StartWithW('https://'))
and not par.HasText(#32)
then
begin
o := par.InsertNewObject(0,wpobjHyperlink,true,false);
o.Source := par.GetText(false, false);
o.SetTag(par.AppendNewObject(wpobjHyperlink,true,true).NewTag);
end;
end;
Alles anzeigen
Oder, wenn man den source verstecken will
procedure TForm1.WPRichText1BeforePasteText(Sender: TObject;
RTFData: TWPRTFDataCollection; par: TParagraph; Stream: TStream;
Reader: TWPCustomTextReader; OnlyBodyText: Boolean;
var LoadedText: TWPRTFDataBlock);
var
s : string;
a : Cardinal;
begin
if (par.Next=nil)
and (par.StartWithW('http://') or par.StartWithW('https://'))
and not par.HasText(#32)
then
begin
s := par.GetText(false, false);
a := par.CharAttr[0];
par.ClearText;
par.AppendNewObjectPair(wpobjHyperlink,'link',a).Source := s;
end;
end;
Alles anzeigen
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
);
Wenn spezielle "custom" Anpassungen gewünscht sind empfehle ich unseren VIP Service Vertrag.