• My margins are set to 1 inch in the rtf file. When I print the rtf from WPTools everything is fine. When I export to pdf my margins are roughly 1.2 inches. Below is a snip of code I'm using...

    WPPDFExport1.Filename := sPath + sFile;
    WPPDFExport1.BeginDoc;
    while not EOF(f) do
    begin
    Readln(f, sTmp);
    if FileExists(sTmp) then
    begin
    RichText.LoadFromFile(sTmp, True, 'RTF');
    RichText.ReformatAll(false,false);
    WPPDFExport1.Print;
    end
    else
    begin
    sError := 'ERROR_Printing_File_not_found_' + sTmp;
    break;
    end;
    end;
    WPPDFExport1.EndDoc;

    Note I have the same problem when using the demo project PDFConverter. My CanvasReference is set to wprefPrinter. I have tried 3 different printers but no luck.

    WPTools5, wPDF3, D2006

  • It seems as though RichText.Header.LeftMargin, RichText.Header.RightMargin, etc. override margins from my rtf file.

    The queston is how can I get RichText and WPPDFExport to use the margins specified in my rtf file?

    I can manually set the margins in RichText but I would rather the margins be determined by the rtf file.

  • The margins in the rtf are correct (\margl, \margr etc.).

    The only way I can get my pdf margins to match my rtf is to set Page Scaling to "None" in the PDF print dialog box just prior to printing.

    The other PDF Page scaling options "Reduce to Printer Margins" and "Fit to Printer Margins" causes about 1/4 inch of extra padding.

    • Offizieller Beitrag

    Hi,

    Zitat

    The only way I can get my pdf margins to match my rtf is to set Page Scaling to "None" in the PDF print dialog box just prior to printing.

    The other PDF Page scaling options "Reduce to Printer Margins" and "Fit to Printer Margins" causes about 1/4 inch of extra padding.

    Ok, then this means something different. Acrobat does not recognize that the margins are actually empty and adds the unnecessary 0.5 cm physical margins.

    Page Scaling "None" should be actually the default to get exactly the same print out as the PDF.

    Although there are margins, this does not mean that there cannot be any information in them. For example left and right margins can be negative and free floating images can be close to the page border.

    So it is not that simple to specify the page margins as crop box which would maybe cause Acrobat switch off the unnecessary scaling.

    I would say you would exactly the same "problem" with any PDF printer driver.

    Regards,
    Julian