Posts by andi

    ijust saw, that there exists a new version of wpdf, therefore i will bring this topic up and ask it again.


    at the moment i use EMF/WMF as watermark (draw it at first on every page) because i need it, if i would like to send a business letter per email as a pdf file, and i have the correct company paper (the header and footer, which i has if i printed it to the printer)

    Is there a workaround ?


    I has to use a pdf as watermark. The problem i has, is that i can't export (i know no application) the pdf into a format, where no informations are lost.
    In the pdf are some images and some text with Font's which are included into the pdf.
    I can't export them as bitmap graphic.
    If i try to export them as WMF or EMF, i has two problems :
    1.) If i export the text as lines, i cant select the text in the resulting pdf anymore
    2.) If i export the text as text, i loose the font information (which is included into the PDF)

    I have following problem


    Till now i have used EMF or WMF for Watermarks (drawing them in the BeforePage)
    But now i have to Draw a PDF as Watermark, because, i can't get the font which are used in the PDF (The PDF is generated with a MAC). The Text shoulb be selectable (It's no choice to export the PDF, und use the Text as Lines)


    I read some things (here in the forum) about that this would be a problem, but i really need it, how can get it works.
    What is the exactly problem of using PDF Watermarks ?
    Can i redesign the PDF, so that it works ? (Under which condition did the watermark works ?)


    I tried it really simple with

    Code
    1. pdf := TWPPDFExport.Create;
    2. pdf.InputFile := 'f:\Watermark.pdf';
    3. pdf.InputFileMode := wpUseInputAsWatermark;


    and get an error if i Opening the file with Acrobat 7.


    I need it for both exporting from WPTools5 and exporting with "Standard" wPDF


    regards
    andi

    A Custom got following error : "Table in Row not allowed! (D:\Komponenten\WPTools5\D6\WPRTEDefs.pas, line 34861)."


    I have "repaired" the docoment (removed the table which was betwenn a <tr>)


    The customer says he only copied and pasted a Table inside the editor.
    How can i prevent this?

    no, it didn't work


    1.) The right margin still isn't red correctly !
    Please for test use a simple Table in Word (one row, two columns, disable Table->Autosize, select the table, Right align the Text, select a Text font) and copy&Paste it into WPTools -> The second column looks good, but the first column looks bad
    The right margin of the first column has nearly the double width !


    2.) The default font is still not read correctly !


    3.) The clipdbg.txt is still generated
    You have commented it in the line 12613 this is ok
    but it still exists in the line 12586

    Bad news,


    the default font problem still exists (MS Word enter a text default font "Times New Roman 12" -> EXE Demo "v5.18.2" Default Font "Arial 11")


    The problem with the right margin of the Table cell still exists !

    Hm, now i see what you mean, in Word i have the text with Default "Times new Roman" and in WPTools the copied table gets the Font "Arial"
    with the DEFINE this behavior gets corrected.


    But the problem with the right margin of the Table still exists

    ok, but i don't think it has to do something with the font (or default font)


    Defining the DONT_FIX_DEFSTYLE hasn't changed anything, i defined it in the Project ->Conditional Defines and ReBuild the TBX Demo

    i didn't get it work (the import of the Table)


    i tried it with the wpfKeepTablesInTextArea, but no chance




    This is the RTF, i tried to load
    if i load it with Word, it works with no problem (both cells are printed in one line, no line break is needed inside the cell because od the right margin is right)


    If i load it with the TBX Demo (setting the wpfKeepTablesInTextArea flag chance nothing) the first cell need two lines (because of the right margin is to big)


    One customer reported the error that the file c:\clpbrd.txt can't be created.


    I found it in the unit WPCTRMemo (the DEFINE was enabled) and disabled
    {$DEFINE CLIPDEBUG}//OFF: - save cliboard text


    But you save it two times
    in line 12592 its in the DEFINE
    in line 12565 there is no DEFINE


    By the way, how far are you with the problem with importing Tables from Word (the right margin of the cells) ?

    hm, but is it possible, that now we get some memory leaks ?


    What do you mean with "word autosized tables" ? I just created a new table in word.


    If i save the table to RTF, word can open it OK, WPTools can't read the table correct.


    If put the rtf on or i can send it to you per mail.


    Is there anywhere a setting (in word or WPTools to read the table correct)

    I has some problems with the Source parameter of a mailmerge field :


    *) If saving to RTF, i get problems with \ (I has to replace all \ with \\)


    *) If saving to WPT i get problems with the " (the same thing if i copy and paste the text)

    ok, next time, at the moment i didn't get the assert. (I have deleted the image and didn't get the Assert anymore. Then i tried to insert the image a second time, i didn't get the assert anymore)