New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crop: problems under Win #273
Comments
OK I have to and will check your Windows issue. The crop command is designed to define a crop Box for the media Box in effect for a given page. This is the - rather mechanical - way this pdfcpu operation is setup right now - no magic implied and the user has to know what s/he/they is/are doing. Your usecase seems to be valid in terms of a desktop app where you repeatedly play around cropping a page but on the cli? |
The problem is not if I apply multiple times the Is there some reason to keep the |
The new box and crop commands assume the user knows about the media Box involved which you can always inspect via pdfcpu box list or pdfcpu info -pages 1- Does the following describe your use? Somebody gives you a PDF then you open it in Adobe Reader and decide you want to crop the content by a margin of 1cm without even thinking about what the media Box looks like? |
In my point of view If you know how to use
Yes, this is what I'm talking about. There are many reasons to modify a pdf outline without being pdf expert: pick up a logo, modify from letter to A4, ... |
Under Windows you have to use double quotes for string parameters. This is how you should execute the command mentioned above on the Win cmdline: |
I dont think that simple vs double quote is a Windows problem. Under Windows we can use By the way, probably the usage message could be (with
By closing this issue, does this means that for you keeping Thanks one more time for your work and considering my questions. |
I am not an expert on the standard DOS-style Windows command line. As far as In the case of:
the BTW I just had to push another commit because of a redundant The closing of this issue was triggered by the git commit comment but I'd like to keep it closed anyway. Thank you! |
I just checked the new
crop
command and observed the following:pdfcpu crop '-10' in.pdf out.pdf
do not works for me in GitBash under Windows, but it works under PowerShell. The error message is :flag provided but not defined: -10
. The result is the same with double quotes.crop '20'
and thencrop '10'
the second command enlarge the (visible) page. Another option is that thecrop
command sets bothmedia box
andcrop box
even in the "reduction" case (which is already the case for the enlargements).The text was updated successfully, but these errors were encountered: