|
|
Hi, I can not reproduce this on your example Code:
static void Main(string[] args)
{
PdfCommon.Initialize();
var doc = PdfDocument.Load("e:\\0\\4\\macro_GS1.page21.pdf");
for(int i = 0; i< doc.Pages[0].PageObjects.Count; i++)
{
if (!(doc.Pages[0].PageObjects[i] is PdfTextObject))
continue;
var txt = (doc.Pages[0].PageObjects[i] as PdfTextObject).TextUnicode;
if (txt != "Our FX forecasts ")
continue;
float w;
Pdfium.FPDFTextObj_GetSpaceCharWidth(doc.Pages[0].PageObjects[i].Handle, out w);
Console.WriteLine(w);
}
}
Code:
0.278
Press any key to continue . . .
|
|
|
Hi All, I am trying to work out a logic to determine when a text should be broken down. I am using the function FPDFTextObj_GetSpaceCharWidth to determine the width of the space character. This approach generally appears to be work well. However, for some documents, the space width is zero for some of the text blocks. What could cause this? Example In the sample document the word "Forecasts" in the table header . Thanks, Sau macro_GS1.page21.zip (256kb) downloaded 18 time(s).
|
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close