You cannot. The rotation is just for the display in the viewer.
Beiträge von wpsupport
-
-
Please put this in your project under unit scope names
System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi
-
It woks fine with Delphi 11 -please make sure the directory with the pascal files is in the language/delphi/library path.
-
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.
-
Good idea, wPDF cannot do it, it also does not insert any script code. I will keep the idea in mind.
-
A Table is aligned by this properties WPAT_BoxMarginLeft and WPAT_BoxWidth.
You can use this code:
Codel := 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:
Codel := 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.
Codevar 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.
-
Thanks for this feedback. I check it out.
-
Man kann natürlich
PasteFromClipboard
aufrufen.
Das macht aber nur Sinn wenn wenn man das Bild nicht auch anders laden kann. Wo kommt es denn her?
Problem ist, dass im Clipboard meist nur BMP sind, keine komprimierten Daten.
-
Das erkennt man an
(SelectedObject <>nil) and (SelectedObject.IsImage)
SelectedObject ist ein TWPTextObj. Das ist ein Objekt welches auch für Felder, Bookmarks und Links verwendet wird.
TWPTextObj kann auch über ObjRef ein TWPObject referenzieren, welches auch ein Bild sein kann.
-
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.
Code
Alles anzeigenprocedure TWPMiniEd.WPRichText1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var fieldobj, fieldobjend : TWPTextObj; px, py : Integer; begin fieldobjend := nil; fieldobj := (Sender as TWPRichText).CodeInsideOf(x, y, wpobjMergeField); if (fieldobj <> nil) then begin fieldobjend := fieldobj.EndTag; if fieldobjend<>nil then begin (Sender as TWPRichText).GetParXYBaselineScreen(fieldobjend.ParentPar, fieldobjend.ParentPosInPar, px, py ) ; PickPanel.Left := px - PickPanel.Width div 2; PickPanel.Top := DataEdit.Top + py - MulDiv(PickPanel.Height,4,5); CurrField := fieldobj.Name; end; end; if fieldobjend=nil then HidePickPanelTimer.Enabled := TRUE // we hide it 500ms delayed else begin PickPanel.Visible := true; HidePickPanelTimer.Enabled := FALSE; end; end;
-
-
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?
-
Das Problem ist nicht bekannt. Tritt es denn mit allen PDF Dateien auf?
-
Hi,
that is not possible, sorry. Adding raw JPEG with different color spaces is on the list for wPDF V5.
Julian
-
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