API reference › Import & Output APIs
pdfGetDocumentFileSize
Size in bytes of the output file on disk.
Size in bytes of the output file on disk. Meaningful after pdfCloseFile; before close (or for in-memory output) the file is missing or incomplete and the call returns 0/the bytes written so far. For in-memory documents use the BufSize from pdfGetBuffer instead.
C
int32_t __stdcall pdfGetDocumentFileSize(PPDF IPDF);
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetDocumentFileSize(IntPtr IPDF);
Area
Import & Output APIs
Category
Getters
Exported names
pdfGetDocumentFileSize
String variants
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
See working code
Worked examples — complete programs in ten languages.