Bug 409032

Summary: show pdf boxes: mediabox, cropbox, bleedbox etc.
Product: [Applications] okular Reporter: Daniel <daniel-other+kdebug>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: wishlist CC: aacid, daniel-other+kdebug
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: An example pdf with bleedbox

Description Daniel 2019-06-22 10:51:22 UTC
SUMMARY
PDF boxes are important metadata for printing professionally. They are for example used to specify where the paper has to be cut and so on. 

An overview of such boxes can be found here https://wiki.scribus.net/canvas/PDF_Boxes_:_mediabox,_cropbox,_bleedbox,_trimbox,_artbox

On linux, you can get information about these boxes using the command

  pdfinfo -box file.pdf

These boxes could be displayed as an overlay over the regular pdf with different colors for mediabox, cropbox, etc. Currently, there is no free pdf viewer which is broadly available that can do that.
Comment 1 Albert Astals Cid 2019-06-22 11:02:22 UTC
The problem is that we're rendering only the cropbox, so showing the mediabox is hard since it's potentially outside of the page. What would you do here?

Also can you please attach a file with diferent boxes so if/when someone has time to work on this they don't need to spend time finding such a file?
Comment 2 Daniel 2019-06-22 11:07:59 UTC
Created attachment 121072 [details]
An example pdf with bleedbox

MediaBox:           0.00     0.00   652.29   898.90
CropBox:            0.00     0.00   652.29   898.90
BleedBox:          20.00    20.00   632.28   878.90
TrimBox:           28.51    28.51   623.78   870.39
ArtBox:            28.51    28.51   623.78   870.39
Comment 3 Albert Astals Cid 2019-06-22 11:10:41 UTC
Still missing "what to do with mediabox when it's outside the page".

But for now i guess we could settle in showing bleed/trim/artbox
Comment 4 Daniel 2019-06-22 11:14:10 UTC
(In reply to Albert Astals Cid from comment #1)
> The problem is that we're rendering only the cropbox, so showing the
> mediabox is hard since it's potentially outside of the page. What would you
> do here?
With standard DTP the mediabox is normally the same as the cropbox as far as I can tell. So, as you said showing bleed/trim/artbox should be good for now.