Ich kümmere mich drum
Beiträge von wpsupport
-
-
You can retrieve the size and rotation of a certain page using the command
COMPDF_GetPageWidth = 203; // IntPar = pageno
COMPDF_GetPageHeight = 204; // IntPar = pageno
COMPDF_GetPageRotation = 205; // IntPar = pageno
You need to rotate and move the metafile acording to the angle. Sorry, I do not have an example code for this.
-
Die Bearbeitung von RTF erfordert ein COM Interface. In reinem C++ ist dies nicht leicht anzusteuern.
Die API mit ExecCommand etc wird intern verwendet, z.b. von dem OCX wrapper oder dem .NET wrapper.
Am besten kontaktieren Sie mich per e-mail and teilen mir mit, welche manipulationen sie durchführen müssen: support@wptools.de
-
No, there is only little demand for this in the market.
-
Wenn Sie ein demo projekt haben welches dieses Verhalten zeigt können Sie es mir gerne zuschicken.
Also die TextBox demo entsprechend abändern, die Quellen zippen und an support@wptools.de senden.
(Ich habe selber die Textbox demo etwas angepasst - das Problem taucht dennoch nicht auf)
PS.: Wenn Sie Ihr TWPRichText kopieren und in einen TextEditor pasten sieht man schnell alle Properties.
An welche Absätze haben Sie denn die TextBoxen angehängt? Es kann schon sein, dass ein Selektieren der Textbox zum Ankerpunkt der Textbox scrollt.
Die TextBox demo verwendet die Edit funktion in OnClick und MouseDown.
-
Ich nehme an Sie haben da noch andere Event handler angehängt.
In der TextBox demo kann ich das nicht nachvollziehen.
-
Zitat
Markiert man mit der Maus einen Teil des unten stehenden Textes, ist die Markierung hellblau korrekt so hoch wie der Text, markiert man aber alles wird die Markierung wieder so hoch wie die ganze Tabellenzelle!
Das ist mit Absicht so implementiert.
Intern gibt es dafür sogar eine eigene Abfrage - wenn der gesamte Absatz markiert wird, wird die gesamte Zelle markiert dargestellt - so war dies in der Vergangenheit auch.
Sie können die Abfrage
if (iSelectFrom=0) and (iSelectTo>=PaintPar.CharCount) then
in WPRTEPaint.pas abschalten, wenn Sie das anders haben wollen.
-
In WPObj_Image there should be code inside of the IFDEF EMBEDD_PNGJPG
It makes sure that a PNG is embedded instead of painted to the Canvas which will always destroy the transparency. This requires wPDF V4.
Please place a breakpoint there to find out why the code is not executed when you are inside BodyText.PaintPageOnCanvas. I assume this has to do with $DEFINES.
-
Wenn in ihrer Ableitung das Update nicht funktioniert, dann liegt es daran, dass Sie noch alte DCUs einbinden. Also Pfads prüfen, gegebenenfalls Alles erzeugen.
Kann man die Version irgendwie zur Laufzeit abfragen, im Designer wird das ja unter RTFText angezeigt.
Ja: es gibt die globale: __WPToolsVersionI__
Markiert man mit der Maus einen Teil des unten stehenden Textes, ist die Markierung hellblau korrekt so hoch wie der Text, markiert man aber alles wird die Markierung wieder so hoch wie die ganze Tabellenzelle!
Das ist mit Absicht so implementiert.
Intern gibt es dafür sogar eine eigene Abfrage - wenn der gesamte Absatz markiert wird, wird die gesamte Zelle markiert dargestellt - so war dies in der Vergangenheit auch.
Sie können die Abfrage
if (iSelectFrom=0) and (iSelectTo>=PaintPar.CharCount) then
in WPRTEPaint.pas abschalten, wenn Sie das anders haben wollen.
-
Wenn es in absehbarer Zeit ein Update gibt wäre das hervorragend, dann kann ich mich anderen Punkten des Projekts widmen!
Wie immer gibt es die Lösung extrem zeitnah: WPTools 8.05 is available now!
ZitatTrotzdem wäre es für mich interessant zu erfahren wie man nur ein paar einzelne Zeichen eines Paragraphen in Schriftfarbe / Hintergrundfarbe ändert ;-)
Der code mit SelectionAttr ist ja richtig - das Problem ist hier die Änderungen wieder zurückzunehmen. Das geht nur mit sehr grossem Aufwand, da man ja die bisherige Position speichern muss. Allerdings könnte der Anwender etwas geändert haben womit die Positionen nicht mehr stimmen. Daher ist der Ansatz in OnChangeSelection keine gangbare Möglichkeit.
Um ein paar Zeichen zu ändern entweder übe eine Auswahl oder über per low level code über par.CharAttr und dem AttrHelper.
Die Demo Unit "G) Low Level\CreateTable\WPCreateDemoText.pas" zeigt wie das geht.
-
This is an important update to WPTools 8. It improves rendering, formatting and also the API was extended.
This is the list of changes:
*** WPTools 8.05.2 - 6.7.2018 ***
- SelText ignored #10 characters.
- UNICODE reader ignored #10 characters
+ improvement within speech recognition interaction code.
Please note: To enable the interface the property HandleRichEditMsg must be set to TRUE
* text selection is not highlighting additional area when vertical text alignment is being used.
*** WPTools 8.05.1 - 14.6.2018 ***
+ event AfterPaintDesktopBackground - makes it easy to paint custom borders around the TWPRichText
- fix incorrect page length calculation when table borders were used.
- ReplaceTokens sets Finder.DontIgnoreObjects temporarily to true, to avoid miscalculations with token position.
This fixes the problem that if a token was preceeded by a hyperlink the hyperlink got corrupted.
- fix in function TWPTextFinder.FindAgain to avoid wrong found start position
* OnTextObjectClick will not be executed after a textbox object has been first selected
+ flag wpDontCopyCellSubParagaraphs for TParagraph.Duplicate
* updated reference: WPTools_8_Reference.chm
*** WPTools 8.05.0.2 BETA - 11.6.2018 ***
+ the RTF reader will assign the style name style-XX in case it detects an empty style name.
+ use compiler symbol CLEAN_STYLE_NAMES to activate code in RTF reader to clean non-ASCII characters from styles names if style names longer than 256 characters.
*** WPTools 8.05.0.1 BETA - 6.6.2018 ***
+ new demo project: H) Techniques\CustomParDraw
+ new demo project: P) Premium\TextBox
+ ViewOptionsEx: wpShowImagesLinkedByHeader - display linked images and text boxes even when invisible due to Layoutmode
*** WPTools 8.05.0 BETA - 5.6.2018 ***
This version is also the code basis for our upcoming product: WPTools for Firemonkey.
Many refactorings were required to make crosscompiling possible, therefor
we decided to mark 8.05.0 as "beta". There are many IFDEF WPFMX in the code, however
you cannot activate this compiler symbol since it is neither technically nor legally
possible to compile this WPTools editon for other platforms than VCL. If you are
interested in FireMonkey development please let us know: supportwptools.de.
* WPWordDelimiterArray['X'] := TRUE;
has to be changed to WPWordDelimiterArraySet('X', TRUE);
* text boxes in header were empty if header was visible on multiple pages
+ load watermarks created by MS Word better (vertical positionioning of images in RTF)
+ function TWPTextObj.SaveEmbeddedTextToStream
* WPToolsRTFToANSI now reads from a RAWByteString and writes to a String (Delphi XE3 and later)
* FWPT_IsHexChar and other arrays for conversion now BYTE based
* disabled the code which caused lonbg tabvles to be always moved to a new page.
- fix TParagraph._IsWidthTw which was not correct with merged cells.
+ wpHideDynamicCellSelection in ViewOptionsEx can be used to hide the selection in a table.
* wpDisableCaret in EditOptionsEx can be used to dynamically change visibility of caret since SetFocusValues is automatically called
- fix a range check error
* performance optimation in CPAttr interface.
+ WPRichText label now also has TextWidth/and TextHeight function
- fix problem with TReformatWorkObjects
* hardened RTF reader agaianst illegal color values
- fix for rare problem when footnotes were used in table cells and had a space before the number
+ function TParagraph.CalculateTableGrid(needxpos : Boolean; var grid : System.Generics.Collections.TList<Integer>) : Boolean;
+ property TParagraph.Text to read and write the paragraph as string. Any controll codes<#9 will be removed.
* property TParagraph.ANSIText is depreciated
-
Sie wollen doch nicht den Text bei jeder Selektion ändern mit Reformat und allem was dazu gehört?
Ist dieses visuelle Problem wirklich so kritisch? Es gibt sicher bald ein Update das dies ändert.
-
ReformatAll can be used to force a reformat without having to wait for the idle cycle
-
wPDF will export the text like displayed in the TWPRichText used for the export. If this is not the case, the text is either copied to a different editor or reformatted otherwise. Please check if this is the case.
-
Ich nehme den Wunsch auf "die Liste"
-
When you have a table you can loop the rows:
row := par.ChildPar;
while row<>nil do
begin
...
row := row.ParNext;
end;
Inside a row it is the same with cells, they are the children of the row.
This are all references to TParagraph so you can use the sample code from the example (callback).
BTW - in HTML there are no repeating headers.
-
You have access to all the paragraphs and tables, rows and cells after the text was created or modified.
You can enumerate the paragraphs in a loop with
par := WPRichText.FirstPar;
while par<>nil do
begin
..
par := par.NextPar;
end;
This will find all first level paragraphs and tables (not the rows). The rows are inside a table paragraph - use the ChildPar reference.
For example see the wptools code, i.e. procedure TWPCustomRtfEdit.GetSelectedCells(All, Outer: TList); in WPCtrMemo.
-
Without example I cannot tell - the DocX reader has code to read DocX defaults. But in your file this may not work.
-
Mit dem event OnTextObjectMouseUp kann man das machen.
Codeprocedure TForm5.WPRichText1TextObjectMouseUp(Sender: TWPCustomRtfEdit; pobj: TWPTextObj; obj: TWPObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if (obj<>nil) and (obj.GetRTFDataBlock<>Sender.ActiveText) then begin obj.Edit; end; end;
Oder wpObjectSelection in der property EditOptions deaktivieren.
-