Beiträge von vkattila

    and here is the answer I've got from Julian :


    >Yes. You need our component WPViewPDF fot this.
    >
    >Here I would recommend to extract the PDF as PNG file and paint in in the >background of a TWPRichText as usual. (See Tasks\Watermark)

    Hi,

    I use Delphi 2009 and WPTools 6.03.5.

    I get an integer overflow when I try to save my document to the database (as a stream).

    Seems to happen only when I include BMP images in my document using the Insert / Graphic menu (everything works fine with JPG images).

    Note that the problem arose after we moved from D2006 / WPTools 5.47 and that everything worked fine with the very same documents before.


    Exception occurs in :

    TWPOImage.WriteRTFData :

    at last instruction of block :

    else if Picture.Graphic is TBitmap then
    try
    bin := TMemoryStream.Create;
    Picture.Bitmap.SaveToStream(bin);
    if bin.Size > 0 then
    begin
    InfoHeader := Pointer(Pchar(bin.Memory) + SizeOf(TBitmapFileHeader));
    { l := bin.Size; }
    //h := MulDiv(Picture.Graphic.Height, 1440, 96);
    //w := MulDiv(Picture.Graphic.Width, 1440, 96);
    StrPLCopy(buf, '\dibitmap0'
    + '\wbmbitspixel' + IntToStr(InfoHeader^.biBitCount)
    + '\wbmplanes' + IntToStr(InfoHeader^.biPlanes)
    + '\wbmwidthbytes' + IntToStr((InfoHeader^.biWidth
    * InfoHeader^.biBitCount + 7) div 8)
    + '\picw' + IntToStr(InfoHeader^.biWidth)
    + '\pich' + IntToStr(InfoHeader^.biHeight)
    // + '\picscalex' + IntToStr(muldiv(AliasTextObj.Width, 100, w))
    // + '\picscaley' + IntToStr(muldiv(AliasTextObj.Height, 100, h))
    + '\picwgoal' + IntToStr(AliasTextObj.Width)
    + '\pichgoal' + IntToStr(AliasTextObj.Height) + #13#10, 400);


    Thanks,
    Attila

    Hi,

    Has something changed in the handling of PrintParameter.AllPagePaperSource and PrintParameter.FirstPagePaperSource ?

    Everything worked properly with V 5.47 / D2006 : I could specify different trays, e.g. tray 2 for the first page and tray 3 for the rest.

    Since moving to D2009 / V 6.3.35, I can't get it to work properly : no matter which trays I specify, all the pages get printed from the same tray.

    Example code :

    WPRichText.PrintParameter.FirstPagePaperSource := 260; // tray 2
    WPRichText.PrintParameter.AllPagePaperSource := 261; // tray 3
    WPRichText.Print;

    => every page gets printed from tray 2 !

    (the above code works all right with D2006 / V 5.47 and the very same printer)

    Thanks,
    Attila

    Apparently :

    - menu items having actions named 'WPA...' get translated correctly
    - menu items having actions named 'XA_...' don't get translated at all

    I tried the following :
    - changing the values for action wpaSelectColumn in the XML file => translation updated accordingly in the application
    - adding :
    <XA_SplitTable C="Fractionner la table" H="Fractionner la table"/>
    in the WPAction section => nothing happens (menu shows 'Split Table')

    Am I missing something here ?

    Thanks,
    Attila

    Hi Arturo,

    I think your problem has something to do with the conversion of your document from WPTools format into RTF and back...

    I opened your document and saw :
    - a header not on first page
    - a footer on all pages
    - a footer first page only

    I deleted the footer 'first page only'.

    1) if I save the document to disk as a RTF file, and load it back again, the footer first page only REAPPEARS !

    2) if I save the document to a database (as a stream) and load it back again, I DO NOT have the extra footer !!

    3) if I save the document to disk as a WPT file and load it back again, I DO NOT have the extra footer !!

    So the extra footer appears ONLY when saving to RTF format...

    I hope this helps...
    Attila

    Hi,

    When applying a style to a paragraph, and then changing the font attributes for a portion of it, the attributes of the changed portion are not shown correctly (inside the comboboxes with font names and sizes - cbsTrueTypeFonts / cbsFontSize). If you SELECT the changed portion, they show the attributes of the paragraph and not those of the selected text.

    To reproduce :

    - start demo WordPad5 \ UseDefEditor.exe
    - define a new style, e.g. Times New Roman 12 Bold
    - type some text (appears in Times New Roman 12 Bold)
    - select a word of your newly typed text and change the font to Arial 14 Normal for example

    => if you place the carret inside this word :
    - the font properties are show correctly in the corresponding FontName and FontSize comboboxes

    => if you select the word in Arial 14 (or portions of it)
    - the FontSize and FontName listboxes show the attributes of the style of the paragraph (Times New Roman 12) and not the actual attributes of the modified text (Arial 14, as show on screen)

    Furthermore :
    - this problem seems to affect only the font's name and size, the attribute 'Bold' is shown correctly (checked if I select a portion of my paragraph in Times New Roman 12 Bold, unchecked if I select the portion in Arial 14 Normal.
    - in both cases (carret inside the word, word selected) the selected style shows the newly created style (Times New Roman 12 Bold)

    WPTools 6.03.3, D2009.

    Thanks,
    Attila