Printing a office letterpapers Logo and text as background

  • I want to print a letterpapers complete page as background using wPDF.
    May be that's possible using the watermark function.
    The letterpapers files are available als PDF, EMF oder BMP file,
    I want to print this file as Background and above it an output of the developers express printing system. The printing without background works without errors. Is there an easy way to print it directly in one PDF with the background file als watermark. The background should be underlayed meaning that der List output ist printed over the background.

    • Offizieller Beitrag

    Hi,

    I would recommend to use the OnBeforePrintPage event to print the letter head.

    When you use the EMFs first create a PDF watermark with StartWatermark, DrawTGRaohiuc, EndWatermar and use that watermark on all pages

    procedure TForm1.WPPDFExport1BeforePrintPage(Sender: TObject; Number,
    FromPos, Length: Integer);
    begin
    WPPDFExport1.UseWaterMark('WaterMark');
    end;

    Julian

  • Zitat

    When you use the EMFs first create a PDF watermark with StartWatermark, DrawTGRaohiuc, EndWatermar and use that watermark on all pages.

    I read the EMF file into a TMetafile record named emf using emf.LoadFromFile.

    What kind of code is useful to transfer the EMF from then TMetafile structure to the PDF.StartWaterMark call ?

  • >> What kind of code is useful to transfer the EMF from then TMetafile structure to the PDF.StartWaterMark call ?

    I had mentioned the required procedure calls. In fact it is really simmple:


    WPPDFPrinter1.StartWatermark('WaterM',
    MulDiv(WPRichtext.Header.PageWidth,Screen.PixelsPerInch,1440),
    MulDiv(WPRichtext.Header.PageHeight, Screen.PixelsPerInch,1440)
    Screen.PixelsPerInch, Screen.PixelsPerInch);
    WPPDFPrinter1.DrawTGraphic(0,0, metafile);
    WPPDFPrinter1.EndWatermark;


    Now in BeforePrintPage do this

    WPPDFPrinter1.UseWatermark('WaterM');

    Julian

  • I'm sorry I don't have a component WPPDFExport ?

    Therefore the WPPDFPrinter component doesn't habe a OnBeforePrintPage event.

    The following components are availabe after installation of the package to Delphi 7:

    WPPDFPrinter
    WPPDFProperties
    WPPDFPagesImport
    QRWPDFFilter
    WPViewPDF

    Where can I find the WPPDFExport component ?

    Mikesch