1

I was reading this on the net, (abut 80% down the page), someone suggested to use pdfcrop with --xetex so that the generated pdf is smaller than the default.

When I tried this option, on Linux with TL 2015, I found the cropped pdf file was all blank! Everything in it was deleted.

This is what I typed:

>which pdfcrop
/usr/local/texlive/2015/bin/x86_64-linux/pdfcrop

>pdfinfo 4.pdf
Creator:        TeX
Producer:       pdfTeX-1.40.16
CreationDate:   Thu Dec 17 23:31:34 2015
ModDate:        Thu Dec 17 23:31:34 2015
Tagged:         no
Form:           none
Pages:          1
Encrypted:      no
Page size:      618 x 793 pts
Page rot:       0
File size:      104183 bytes
Optimized:      no
PDF version:    1.6

>pdfcrop --xetex --margins 5 --clip 4.pdf  4.pdf
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `4.pdf'.

>pdfinfo 4.pdf
Creator:         XeTeX output 2015.12.24:1640
Producer:       xdvipdfmx (20150315)
CreationDate:   Thu Dec 24 16:40:59 2015
Tagged:         no
Form:           none
Pages:          1
Encrypted:      no
Page size:      597 x 772 pts
Page rot:       0
File size:      701 bytes
Optimized:      no
PDF version:    1.6

The new 4.pdf file is blank, here is before and after:

Mathematica graphics

Here is link to 4_before.pdf before the crop. Here is link to 4_after.pdf after the crop. if someone likes to reproduce this.

Did I do something wrong? Why new pdf file is blank?

if I do not use --xetex then then the new pdf is not blank. (it is not cropped for some reason, and I am still trying to find out why, but at least it is not blank!).

2

xdvipdfmx in TeX Live 2015 does not include PDF with newer version than 1.5 by default. The version of 4.pdf is 1.6, thus pdfcropped one becomes blank. In upcoming TeX Live 2016, this feature is improved. Even in TeX Live 2015, the commandline

xetex --output-driver="xdvipdfmx -E -V 6"

can be used in order to include PDF images with version 1.6. Please study if pdfcrop allows to pass options for xetex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.