Default CropBox should be the full MediaBox.

This commit is contained in:
Michael R Sweet 2021-05-16 18:31:45 -04:00
parent 35ea209c73
commit 45899f8a8d
No known key found for this signature in database
GPG Key ID: 999559A027815955
3 changed files with 9 additions and 18 deletions

15
TODO.md
View File

@ -1,17 +1,10 @@
To-Do List To-Do List
========== ==========
- All of the object write code - Resources:
- All of the stream write code - Fonts
- Page create method - ICC profiles/standard color spaces
- Write out trailer - Others?
- How to handle object references between documents, i.e., if I copy a page from
one PDF to another, there are a bunch of resources that also need to be
copied. A dictionary with an object reference can't be copied directly as the
object number in the new PDF will likely be different than the old one.
- Add _pdfio_map_t with original pdfio_file_t * and object numbers
- Add _pdfioObjCopy function
- Add _pdfioFileGetMappedObject function to get the new object number
- Security handlers (RC4 + AES, MD5 + SHA-256) for reading encrypted documents. - Security handlers (RC4 + AES, MD5 + SHA-256) for reading encrypted documents.
- Signature generation/validation code - Signature generation/validation code
- Documentation - Documentation

View File

@ -198,11 +198,9 @@ pdfioFileCreate(
} }
else else
{ {
// Default to "universal" size (intersection of A4 and US Letter) with 1/4" margins // Default to "universal" size (intersection of A4 and US Letter)
pdf->crop_box.x1 = 18.0f; pdf->crop_box.x2 = 210.0f * 72.0f / 25.4f;
pdf->crop_box.y1 = 18.0f; pdf->crop_box.y2 = 11.0f * 72.0f;
pdf->crop_box.x2 = 210.0f * 72.0f / 25.4f - 18.0f;
pdf->crop_box.y2 = 11.0f * 72.0f - 18.0f;
} }
// Create the file... // Create the file...

View File

@ -313,8 +313,8 @@ write_page(pdfio_file_t *pdf, // I - PDF file
fputs("pdfioStreamPuts(...): ", stdout); fputs("pdfioStreamPuts(...): ", stdout);
if (pdfioStreamPuts(st, if (pdfioStreamPuts(st,
"0 g 18 18 559 760 re 72 72 451 648 re f*\n" "1 0 0 RG 0 g 5 w\n"
"1 0 0 RG 18 18 559 760 re 72 72 451 648 re S\n")) "18 18 559 760 re 72 72 451 648 re B*\n"))
puts("PASS"); puts("PASS");
else else
return (1); return (1);