PDFExport generating messy pdf file!

  • Hi! I'm using wPDFExport do generate a pdf file from WPRichText. Here is the code I'm using to do that:

    Code
    wp_internet.AsString := wp_result.AsString; 
     wp_internet.Refresh;
     WPPDFExport1.Source   := wp_internet;
     WPPDFExport1.Filename := NetParams.TempDir+'\result.pdf';
     WPPDFExport1.Print;

    When a preview the wp_internet, it looks ok. But, the pdf file generated it's all messed, with larger fonts, and very big spaces between lines, as it was in other resolution. I've tried many changes in the code, but none seems to work. What I'm doing wrong??

    Thanks

  • Zitat von wpsupport

    Hi,

    I never came accross such a problem, esspecially not when exporting from WPTools. Did I understand correctly that the PDF looks different when you open it in on the desctop or download from the server?

    Maybe the component uses CanvasReference set to Printer but the server does not have any?

    Julian

    Hi! Julian, the problem is not that. I'll try to explain better, but my english isn't so good.

    This is the code I'm using to generate the pdf file:

    Code
    wp_internet.Clear;         wp_internet.CheckHasBody;         GeraResultado(wp_resultado, CodPedido, CodExame);         SetaConfigPaginaNet(wp_internet);         wp_internet.AsString  := wp_resultado.AsString;         CabecalhoRodapeNet(wp_internet, CodPedido, CodExame);         wp_internet.Refresh;         WPPDFExport1.Source   := wp_internet;         WPPDFExport1.Filename := NetParametros.DiretorioTemp+'\result.pdf';         WPPDFExport1.Print;

    The procedures I'm using:


    The wp_internet has the final formated text. When I preview it, all lokks good! But the pdf file generated from wp_internet not. It looks all messeu up. One thing I forget to mention: my header have a logo (bitmap). The final pdf file show only the logo, but incomplete and with very bigger height!!

    Can yopu help me?

    Thanks