Beiträge von tscheidegger

    We are working with generated documents which contain text and several small tables.

    If the user makes a selection containing only parts of a table by mouse or keyboard and then presses DELETE, nothing gets deleted (sometimes the content of the first cell in the selection)


    Only if the user manages to select full tables, they get deleted[Blockierte Grafik: https://www.dropbox.com/s/veqkc1zyvtf7lsh/wp-table.png]

    The main usecase is users want to remove sections of the document that are not necessary.

    Is there a way to enforce the selection of whole tables either with edit-options or in an event-handler during the selection?https://www.dropbox.com/s/veqkc1zyvtf7lsh/wp-table.png

    Noch eine Rückfrage für mein Verständnis:

    Kann ich "NumberStyle:0" gefahrlos direkt aus einem Element entfernen?

    Wie im Beispiel vom obigen Bericht Zeile 969

    Original

    Code
    <cs nr=12 wpsty=[[CharFont:&#39;Univers LT Std 45 Light&#39;;CharFontSize:1100;CharColor:clWindowText;CharBGColor:clWindow;]]/><table cs=12 wpsty=[[BoxWidth:8983;BoxMarginLeft:-41;]]><cs nr=13 wpsty=[[CharFont:&#39;Univers LT Std 45 Light&#39;;]]/><tr cs=13><cs nr=14 wpsty=[[CharFont:&#39;Arial&#39;;CharFontSize:1000;CharColor:clWindowText;CharBGColor:clWindow;]]/><td cs=14 wpsty=[[COLWIDTH:5258;IndentLeft:0;NumberStyle:0;NumberLevel:0;]]></td>

    Angepasst, ohne NumberStyle

    Code
    <cs nr=12 wpsty=[[CharFont:&#39;Univers LT Std 45 Light&#39;;CharFontSize:1100;CharColor:clWindowText;CharBGColor:clWindow;]]/><table cs=12 wpsty=[[BoxWidth:8983;BoxMarginLeft:-41;]]><cs nr=13 wpsty=[[CharFont:&#39;Univers LT Std 45 Light&#39;;]]/><tr cs=13><cs nr=14 wpsty=[[CharFont:&#39;Arial&#39;;CharFontSize:1000;CharColor:clWindowText;CharBGColor:clWindow;]]/><td cs=14 wpsty=[[COLWIDTH:5258;IndentLeft:0;NumberLevel:0;]]></td>

    Wenn das zulässig ist, habe ich einen Ansatz für eine Automatisierung der Korrektur.

    Guten Tag WPCubed

    Wir haben nach dem Update von wp7 auf wp9 einen komischen Effekt bei einem Kunden gefunden.

    Eine Dokumentvorlage enthielt eine Aufzählung, die nachträglich wieder gelöscht wurde.

    Wenn man das Dokument anlegt, ist die Aufzählung nicht sichtbar

    [Blockierte Grafik: https://www.dropbox.com/s/6hsw9el46a8rtaa/noEnum.png]

    Sobald das Dokument einmalig gespeichert wurde, wird die Nummerierung wieder sichtbar, wenn auch nicht im ursprünglichen Format

    [Blockierte Grafik: https://www.dropbox.com/s/9q8j9lw46zrij3e/withEnum.png]

    Unser Verständnis ist, dass die Formatierung über den Dialog WPBltDlg.pas gelöscht wurde.

    Wenn kein Style gewählt ist, wird der Style geändert mit

    Code
    fsEditBox.ASet(WPAT_NumberSTYLE, 0);
    fsEditBox.ASet(WPAT_NumberLevel, 0);

    Wenn wir die Styles löschen mit

    Code
    fsEditBox.ADel(WPAT_NumberSTYLE);
    fsEditBox.ADel(WPAT_NumberLevel);

    sind sie komplett weg, d.h. man kann das Problem beheben, aber erst, wenn es sichtbar wird.

    Was unklar ist:

    ist es ein bekanntes Problem, dass Berichte aus älteren wp-Versionen Formatierungen enthalten, die in wp9 anders interpretiert werden - und möglicherweise sogar einen Fix oder Workaround

    ist der Weg über ADel korrekt

    gibt es im Update einen spezifischen Schritt (Konversion o.ä.) die wir übersehen haben

    existiert eine Einstellung oder ein Define den wir ändern müssten

    Just stumbled on a minor error in TWPRTFEnginePaint.PaintRTFPage/PaintLine

    It can be reproduced in WPToolsDemo.exe with this rtf-document.

    TestBericht.rtf

    If you select the text "Röntgen: " including the space after the colon and then delete it with DEL or backspace, a range-check-error is thrown on line 7547

    Code
    rw := rw + lineData.Par.CharPos[pobj_i].xoff;

    lineData.Par.CharCount is 0 and the CharPos-array is empty.

    Adding an additional check for CharCount > 0 did it, so no impediment for me.


    Using version 9.1.004

    >Dieses Dokument besitzt tags.

    Wie prüfen sie, ob und welche Tags das Dokument enthält?

    Mit dieser Info kann ich mit dem Kunden in die Diskussion gehen weil die Validatoren sind sich uneinig

    3-Heights online unter https://www.pdf-online.com/osa/validate.aspx (vom Kunden als Referenz angegeben)

    PDFEN unter https://www.pdfen.com/pdf-a-validator

    Code
    CHECK FAILED
    THE DOCUMENT DOES NOT CONFORM TO THE PDF/A-1A STANDARD.

    BFO unter https://bfo.com/blog/2017/11/08/verify_pdfa_online/

    Hat nicht auszusetzen

    veraPDF (lokal installiert)

    Auch ok

    Thanks for the fast response.

    The Flag wpNoAutoTagsForPDFA is not set, Modes is empty.

    Here's my code which generates best results so far. Is the order in which the properties are set of any importance?

    This is the document generated

    https://polypoint.mount10.swiss/index.php/s/WCnP9aDgmJzzbLD

    Case:

    Generated pdf/a is not accepted by validator

    Validator https://www.pdf-online.com/osa/validate.aspx says

    Setup

    Delphi RIO

    current wPDF 12/2019

    To generate layout-tags I call

    Code
    Inc(frwp.WP.Memo._WPDFParRun);

    before generating the PDF as documented in the manual.

    Are there other steps needed to generate logical structure information?

    Any idea about the P-key? Could not find any info on that.

    I found the culprit.

    Customer is using Logo in the header. As soon as a part of it is visible, CPU goes from 12% to 40%.

    With scrolling down and up again to the area I wanted to write, I pushed the logo out of the visible area.

    Image size is about 500kB.

    Are there options to manage display or rendering of images resulting in lower CPU-usage?

    A customer encounters a strange effect while writing a report.

    Usecase

    Report is based on a template with header, footer and some small tables with addresses and the like, length is 3 pages.

    Spellcheck is disabled.

    Reproduced with a "typewriter" program typing the same block of text at constant speed.

    Does not happen on single-page documents.

    Attempt one

    User opens reports and starts typing on the first page. CPU goes up to 50% (1 core) and stays at 40..50% while typing

    Attempt two

    User opens report, scrolls down to the last page and up to 1st again, starts typing there. CPU stays between 10..20%

    Hypothesis

    Some off-screen elements are calculated or rendered repeatedly until they are made visible at last once by scrolling down

    Questions

    Are there any options or procedures which force a full-paint of the document after loading or ways to control rendering of offscreen content?

    Thanks Thomas

    Hi everyone

    One of our customers is planning to migrate our application to a vdi-infrastructure.

    He did extensive tests and realised the CPU-load peaked whenever a user was typing in a TWPCustomRtfEdit.
    While on a physical PC with more power this is not a big issue, on a VM there's a annoying lag.
    Our customer tried to resolve the problem by putting more graphic-power to the vdi, but that did not help.

    I tried $DEFINE USE_INPUTBUFFER_WAIT10 which lowers the load a bit but makes the lag permanent even if you have enough power.

    Turning off the spellchecker (Addict) also helps a bit, but the load is still pretty high around 80% for a fast/professional typist.

    On the same vdi-environment writing in MS Word, CPU stays below 20%.

    Are there any known workarounds or settings (e.g. rendering) which reduce the load?

    Using WPTools_6.060-PRM

    Thanks for your help.

    Thomas

    Hi,
    I'd like to have text in a table align nicely with text outside the table. Borders are hidden, and I have set wpNoMinimumCellPadding, wpDontUseTablePadding and wpDontUseBorderPadding - and yet the text in the table is indented.

    I have then tried to offset the table to the left (like in MS Office), using an empirically found value of -44:
    WP.Table.ASet (WPAT_BoxMarginLeft, -44)
    Is there a stable way to calculate the distance from the (hidden) table border to the first character of the cell?

    Thanks!

    Funny thing.
    We've just stumbled upon the very same problem which was reported to us by a user.
    When loading a document, the cursor is placed top left and the font is set to default (Arial 10, black).

    |header of my document

    the user just starts typing

    Important|header of my document

    If the document already contains text, the properties of the text are not applied. However, if I move the cursor to the right and back left manually, the properties are applied.
    My first idea was also to move the cursor by code after loading (quick and dirty), but this seems not to work.

    Is there something like GetFontPropertiesFromRightOfCursorAndApplyToCurrentPosition?

    Thanks![/b]

    We've checked the suggested solution and are afraid, this would result in a major overhaul of our reporting module.
    Since our product is in productive use by several hundred customers, overhauling a central component is a task, we'd like to avoid :?

    Usually, writing reports with WPTools works perfectly fine. Only since some customers started to add several pictures to medical documents, we have this problem. A test-document with 8 pictures shows erratic behavior. Depending on printer and iteration, 1..4 pictures are randomly skipped when printing. No visible or internal errors are encountered.

    Printing the same RTF-document of about 28MB from Word, WordPad or Richview works.

    You can download the document here: http://dl.dropbox.com/u/3206828/RTF-from-WP.rtf

    Any ideas or workarounds not requiring mayor surgery would be greatly appreciated.

    Thomas