Beiträge von Luke

    Zitat von wpsupport

    WPTools writes this code empty paragraphs:

    <html>
    <head></head><body>
    <div><span style="font-family:'Arial';font-size:11.00pt;">aaaaa</span></div>
    <div>&nbsp;</div>
    <div><span style="font-family:'Arial';font-size:11.00pt;">bbbb</span></div>
    </body></html>

    Julian

    Hi Juilian,

    I used the WrtHTM sample program and it seems to be missing out the &nbsp; from the saved HTM

    ie this text:
    Please drag&drop JPEG images ...


    line 1

    line 3

    space and line 5

    is saving out as
    <html>
    <head></head><body background="back.jpg">
    <div><font face="Arial" size=3>Please drag&amp;drop JPEG images ...</font></div>
    <div></div>
    <div></div>
    <div><font face="Arial" size=3>line 1</font></div>
    <div></div>
    <div><font face="Arial" size=3>line 3</font></div>
    <div><font face="Arial" size=3> </font></div>
    <div><font face="Arial" size=3>space and line 5</font></div>
    </body></html>

    Is there an option im missing??

    Hi,

    I have recently included the pdfMakeJpeg feature of WPViewPDF into my program (using Delphi 2005) but every time I include the following line :

    function pdfMakeJPEG(filename: PChar; password: PChar; licname, lickey: PChar; liccode: Cardinal; destpath: PChar; frompage, to_page: Integer; jpegres: Integer): Integer; stdcall; external 'wPDFView02.dll';

    my application will not load and get an error that reads:

    "The instruction at "0x00553b56" referenced at "0x00da2af0". The memory could not be "read". Click OK to terminate and Cancel to debug."

    If I remove the declaration of pdfMakeJPEG, my program loads fine. What could be causing this error? I have even included this in a brand new sample project with the same error.

    Any help greatly appreciated!

    Luke.

    Zitat von wpsupport


    for i:=0 to WPRichText1.HeaderFooter.SectionPropertyCount-1 do
    WPRichText1.HeaderFooter.SectionProperty[i].Select :=
    WPRichText1.HeaderFooter.SectionProperty[i].Select - [wpsec_PageSize];

    Julian

    Thanks Julian, That did the trick!

    Cheers, Luke

    Zitat von JazzMan

    Luke,

    Greetings..:)

    I might be missing something glaringly obvious to everyone ELSE in your sample code, but nowhere did I see what I was expecting to see in your code: RTFDocument.Header.Landscape := TRUE;

    richard diamond

    Thanks Richard,

    After bringing up the Printer dialog (using a TWPPagePropDlg) and selecting Landscape, the RTFDocument.Header.Landscape equals TRUE. Unfortunately this is only the case for the first page as the remaining pages are all in Portrait.

    Cheers, Luke.

    Hi, I'm trying to change the page orientation for all pages of a document (spanning 1-500+ pages). By default, it is in Portrait and I want to change the page setup so that it's to be Landscape, with the following code:

    *******
    RTFDocument.PaperDefs.Init(true);
    wpPageSetup.EditBox := RTFDocument;

    if wpPageSetup.Execute then begin
    RTFDocument.Header.Select := [wpsec_Margins, wpsec_PageSize];
    RTFDocument.PaperDefs.Init(true);
    RTFDocument.ReformatAll;
    RTFDocument.Invalidate;
    end;
    *******

    This works fine for the first page, but all following pages still are still Portrait.

    What other settings do I need to set to change all pages and not just the first? I also tried using the OnMeasureTextPage with the following code which did not work either:

    *******
    if RTFDocument.Header.Landscape then begin
    PageInfo.heighttw := RTFDocument.Header.PageWidth;
    PageInfo.widthtw := RTFDocument.Header.PageHeight ;
    PageInfo.changed := true;
    end else begin
    PageInfo.heighttw := RTFDocument.Header.PageHeight;
    PageInfo.widthtw := RTFDocument.Header.PageWidth ;
    PageInfo.changed := true;
    end;
    *******

    Any help would be greatly appreciated.

    Luke

    Hi Julian,

    I was able to get it to work in the end. If I went into the RTFText property of the TWPRichText at design time and then click OK (entering no text), it seems to work from now on. Previously there was no document in design time so this has seemed to have fixed it.

    Thanks, Luke.

    Hi,

    I have a situation where I want to always show the header and footer (ie Layout mode set to wplayFullLayout), but when I save the document I want to embed the images in to the document. The only way I have been able to do this is to set the Layout Mode to wplayLayout and then Save the document.

    So when I try to save a document I do this:

    RTFText.LayoutMode := wplayLayout; //want to save the images
    RTFText.SaveToFile(sFile, False, 'RTF-nomergefields'); //save the RTF doc
    RTFText.LayoutMode := wplayFullLayout; //want to see the H + F info again

    But the above does not seem to save the images in the document. It is almost like it doesn't recognize that the Layout mode has changed and needs to call OnPrepareImageForSaving etc.

    Am I doing something wrong?

    I am using 5.35.3.

    Thanks,

    Luke.

    Thanks Juliuan,

    I think a bit of the changes to the code were missing? How should the current function look?

    function TWPSpellForm.SpellCheck(AControl: TControl): Boolean;
    var s : string;
    begin
    if NextWord then begin
    Show;
    edtReplace.SetFocus;
    Result := TRUE;
    end else begin
    WPSpellLoadStr(tlblCompleteMesg);
    MessageBox(Handle, PChar(s), '', 0);
    Result := FALSE;
    end;
    end;

    Cheers, Luke.

    I have just started using WPSpell and have a couple of questions

    1. If I click to start Spell Checking at the end of a document, I get a blank message. What does this mean and how can i go to the start of the document so it starts checking from the start?

    2. Merge Fields are being checking - how can I stop this?

    I tried looking up the spell help file (WPSPELL.HLP) but didn't explain what each property is meant to do. I also looked on the website but found nothing. Are there any other help files that I can download?

    Hi,

    I need to be able to convert some existing Microsoft Word Document Template files (*.dot) to rft format. I basically need all the text (formatting not a must, but would be nice) copied over and some way to distinguish what the merge fields are.

    Is there any way to do this?

    Thanks, Luke.