Announcement

Collapse
No announcement yet.

vvPDF - spacingBefore - After issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vvPDF - spacingBefore - After issue

    Let's say.. I want to create a Pdf where f.e left aligned i want to have a Invoice nbr,
    and right aligned i want to have the date & time..


    What is the best-practice for achieving this ?

    i now tried to achieve this with the vvpdf_addText
    vvpdf_Addtext(vvpdf: pdfdoc: 'xxxxInvoice nbr')
    with left alignment, and afterspacing 0

    and then for the right side
    vvpdf_Addtext(vvpdf: pdfdoc: date & time')
    with right alignment, and beforespacing 0

    this is not working, in any way it is taking 1 line as spacing...

    in noticed that in the vvpdf program
    always min 1 line is takenĀµ

    PHP Code:
    if vvPDF.spacingBefore<>0;
    iPdfPTable_setSpacingBefore(table12vvPDF.spacingBefore);
    else;
    iPdfPTable_setSpacingBefore(table121);
    endif;

    if 
    vvPDF.spacingAfter<>0;
    iPdfPTable_setSpacingAfter(table12vvPDF.spacingAfter);
    else;
    iPdfPTable_setSpacingAfter(table121);
    endif; 
    although in the API documentation it is stated.. when not specified
    PHP Code:
          spacingAfter Specify the number of lines to write after writing the supplied text to the document. If not specifiedit will default to 1.     spacingBefore Specify the number of lines to skip before writing the supplied text to the document. If not specifiedit will default to 1. 

    i assumed that when specifying 0, it would remain on the same line..
    is that correct.?

    or maybe in this case, the answer is to use tables??

    what is the best practice?

    thx in advance


  • #2
    Hi Thierry,

    It would probably be best to use a small table layout to achieve that kind of output. Be sure to leave borderWidth=0 so it doesn't create any grid lines.

    Comment

    Working...
    X