Cheers everybody!
Subject tells it. In my app, which uses PurePDF, I need to know precisely how many lines were actually printed by the pdf_MultiCell cmd. I tried dividing pdf_GetStringWidth() by the cell width, but this result is inaccurate with longer strings.
Any help is appreciated! Thanks!
PurePDF - Get the number of lines printed by pdf_MultiCell
PurePDF - Get the number of lines printed by pdf_MultiCell
The truth is never confined to a single number - especially scientific truth!
Re: PurePDF - Get the number of lines printed by pdf_MultiCe
you can use nl as it counts the newlines inside ipf_MultiCell(), except the last chunk where you have to add one nl + 1 
BR Klaus
BR Klaus
Re: PurePDF - Get the number of lines printed by pdf_MultiCe
Sorry, I don't follow. Which command can I use to count the number of lines in the pdf? nl() doesn't exist on my PB...
The truth is never confined to a single number - especially scientific truth!
Re: PurePDF - Get the number of lines printed by pdf_MultiCe
I understand, what i meant was the variable called nl.l inside the procedure ipf_MultiCell().merendo wrote:Sorry, I don't follow. Which command can I use to count the number of lines in the pdf? nl() doesn't exist on my PB...
I have already implemented something for you, please see if it works for you.
PurePDF v2.20
new command
Code: Select all
pdf_GetMultiCellNewLines()http://www.purebasicpower.de/downloads/ ... B45X86.zip
BR Klaus
Re: PurePDF - Get the number of lines printed by pdf_MultiCe
It works, but it always returns one too many. So when there was only one line printed, I get 2, and so forth...
The truth is never confined to a single number - especially scientific truth!
Re: PurePDF - Get the number of lines printed by pdf_MultiCe
the new version should fix this, please redownload.
BR Klaus
BR Klaus

