• Hi,

    when I export my document, the page size is created with 21.01 x 29.71 cm (A4) instead of 21.00 x 29.70 cm

    I'm using the script to run:

    var Pdf: TWPPDFExport;

    begin

    WPRichText1.Refresh();

    WPRichText1.ReformatAll(True);

    Pdf := TWPPDFExport.Create(nil);

    try

    WPDF_Start();

    Pdf.Source := WPRichText1;

    Pdf.AutoLaunch := AutoLaunch;

    Pdf.Filename := Arquivo;

    Pdf.Encryption := [wpEncryptFile, wpEnablePrinting];

    Pdf.FontMode := wpEmbedSymbolTrueTypeFonts;

    Pdf.Encryption := [wpEnablePrinting, wpEnableCopying];

    Pdf.Print;

    Result := True;

    finally

    Pdf.Free;

    end;

    end;

    Setup of WPRichText1:

    WPRichText1.AutoZoom := wpAutoZoomWidth;

    WPRichText1.AutomaticTextAttr.AlsoUseforPrintOut := True;

    WPRichText1.EditOptions := Wp.EditOptions + [wpTableRowResizing, wpAutoInsertRow, wpActivateRedo, wpActivateRedoHotkey, wpAllowCreateTableInTable];

    WPRichText1.FormatOptionsEx2 := Wp.FormatOptionsEx2 + [wpfUseKerning, wpfNewKeepNSupport];

    WPRichText1.FormatOptionsEx := Wp.FormatOptionsEx + [wpDontUseRowPadding, wpDontUseBorderPadding, wpDontAddExternalFontLeading];

    WPRichText1.ViewOptions := Wp.ViewOptions + [wpTraditionalMisspellMarkers];

    WPRichText1.ViewOptionsEx := Wp.ViewOptionsEx + [wpDualPageViewStartsLeft];

    WPRichText1.PrintParameter.PrintTitle := 'clinux.editor';

    WPRichText1.PrintParameter.PrintOptions := [wpAlwaysHideFieldmarkers];

    WPRichText1.WriteObjectMode := wobRTF;

    WPRichText1.Caret.blink := True;

    WPRichText1.OnPaintWatermark := nil;

    WPRichText1.InsertPointAttr.Hidden := True;

  • with 1 cm left, the print comes out with a blank page;

    the problem was solved when I set a local variable "WPScreenPixelsPerInch" to 72 (replacing the global value of 96) in WPPDFWP.pas,

    the result size page is 20,99 x 29,71,