PDFiumCore
PDFiumCore copied to clipboard
fpdf_annot.FPDFAnnotGetFormFieldName needs a ref uint for the buffer?
I'm try to get this method to work, but i don't find out how to use this. Other functions like fpdf_doc.FPDFBookmarkGetTitle use IntPtr as pointer to the buffer. Can someone show me how to use them correctly or is this a bug ?
byte[] bufferfont = new byte[1000];
fixed (byte* ptrint = bufferfont)
{
int flags = 0;
uint fontnamelength = fpdf_text.FPDFTextGetFontInfo(textpage, 0, (nint)ptrint, (uint)bufferfont.Length, ref flags);
byte[] temp = new byte[fontnamelength - 1];
for (int i = 0; i < (int)fontnamelength - 1; i++)
{
temp[i] = bufferfont[i];
}
string name = Encoding.ASCII.GetString(temp);
}
like this
Thank you. I'll see about adding some helper classes that include some of these common methods.