mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2024-11-08 06:28:27 +01:00
Hard wrap text in README.md
This commit is contained in:
parent
bca0add5d8
commit
d1f199c7ae
18
testpdfio.c
18
testpdfio.c
@ -1940,7 +1940,23 @@ write_text_test(pdfio_file_t *pdf, // I - PDF file
|
||||
goto error;
|
||||
if (!pdfioContentSetFillColorDeviceGray(st, 0.0))
|
||||
goto error;
|
||||
if (!pdfioContentTextShow(st, line))
|
||||
if (strlen(line) > 81)
|
||||
{
|
||||
char temp[82]; // Temporary string
|
||||
|
||||
memcpy(temp, line, 80);
|
||||
temp[80] = '\n';
|
||||
temp[81] = '\0';
|
||||
|
||||
if (!pdfioContentTextShow(st, temp))
|
||||
goto error;
|
||||
|
||||
if (!pdfioContentTextShowf(st, " %s", line + 80))
|
||||
goto error;
|
||||
|
||||
plinenum ++;
|
||||
}
|
||||
else if (!pdfioContentTextShow(st, line))
|
||||
goto error;
|
||||
|
||||
plinenum ++;
|
||||
|
Loading…
Reference in New Issue
Block a user