I cannot for the life of me get it to recognize the CropBox. Based on everything I have read, if the Cropbox is SMALLER and INSIDE the Mediabox, then it Crops the drawing/text to make that the “visible” area. The idea here being using the Cropbox to create page margins, as PDF is capable of drawing edge to edge, and printers are not.
This code creates a RED box with two diagonal lines. It SHOULD be CENTERED in the page, but seeing as it is ignoring the Cropbox, it appears in the upper left corner instead.
Anyone have any ideas?. I cannot believe I have what I thought were the “hard parts” figured out, and this should be so “simple”…
I will be glad to email the actual PDF file to anyone… and the first person that can come up with a viable solution or point out what I am doing wrong, will get two things from me. My grateful appreciation… and a free license to the end product I am creating
Note : my understanding is this
/MediaBox [0 0 612 792]
This line sets the PAGESIZE : 8.5x11 at 72dpi
/Cropbox [144 144 324 504]
This SHOULD set 2 inch margins all the way around… but seems to do absolutly nothing.
%PDF-1.2
%
1 0 obj
<<
/Author (Not Provided)
/Title (Not Provided)
/Subject(My Application.debug)
/CreationDate (D:20131031143808Z00'00')
/ModDate (D:20131031143808Z00'00')
/Producer (SimplePDF for XOJO)
/Creator (My Application.debug)
>>
endobj
2 0 obj
<<
/Type /Catalog
/Outlines 3 0 R
/Pages 4 0 R
>>
endobj
3 0 obj
<<
/Type /Outlines
/Count 0
>>
endobj
4 0 obj
<<
/Type /Pages
/MediaBox [0 0 612 792]
/Cropbox [144 144 324 504]
/Kids [5 0 R]
/Count 1
>>
endobj
5 0 obj
<<
/Type /Page
/Parent 4 0 R
/Contents 6 0 R
/MediaBox [0 0 612 792]
/Cropbox [144 144 324 504]
>>
endobj
6 0 obj % page content
<<
/Length 76
>>
stream
5 w
1. 0. 0. RG
0 792 m
324 288 l
s
324 792 m
0 288 l
s
0 792 324 -504 re
s
endstream
endobj
xref
0 5
0000000000 65535 f
0000000236 00000 n
0000000302 00000 n
0000000349 00000 n
0000000458 00000 n
0000000573 00000 n
trailer
<<
/Size 5
/Info 1 0 R
/Root 2 0 R
>>
startxref
714
%%EOF