mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-02-20 19:02:50 +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;
|
goto error;
|
||||||
if (!pdfioContentSetFillColorDeviceGray(st, 0.0))
|
if (!pdfioContentSetFillColorDeviceGray(st, 0.0))
|
||||||
goto error;
|
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;
|
goto error;
|
||||||
|
|
||||||
plinenum ++;
|
plinenum ++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user