Skip to content
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

import images default command and help info mistake #851

Closed
imqishi opened this issue Apr 16, 2024 · 2 comments
Closed

import images default command and help info mistake #851

imqishi opened this issue Apr 16, 2024 · 2 comments
Assignees

Comments

@imqishi
Copy link

imqishi commented Apr 16, 2024

Version: pdfcpu_0.7.0_Linux_x86_64
Exec command:

./pdfcpu import out.pdf image-00001.jpg image-00002.jpg
appending to out.pdf...
pdfcpu: Invalid import configuration string. Please consult pdfcpu help import

Help:

./pdfcpu help import
usage: pdfcpu import -- [description] outFile imageFile...

common flags: -v(erbose)  ... turn on logging
              -vv         ... verbose logging
              -q(uiet)    ... disable output
              -c(onf)     ... set or disable config dir: $path|disable
              -opw        ... owner password
              -upw        ... user password
              -u(nit)     ... display unit: po(ints) ... points
                                            in(ches) ... inches
                                                  cm ... centimetres
                                                  mm ... millimetres

Turn image files into a PDF page sequence and write the result to outFile.
If outFile already exists the page sequence will be appended.
Each imageFile will be rendered to a separate page.
In its simplest form this converts an image into a PDF: "pdfcpu import img.pdf img.jpg"

description ... dimensions, format, position, offset, scale factor, boxes
    outFile ... output PDF file
  imageFile ... a list of image files

  <description> is a comma separated configuration string containing:

  optional entries:

      (defaults: "d:595 842, f:A4, pos:full, off:0 0, sc:0.5 rel, dpi:72, gray:off, sepia:off")

So I use defaults string:

./pdfcpu import -- "d:595 842, f:A4, pos:full, off:0 0, sc:0.5 rel, dpi:72, gray:off, sepia:off" out.pdf image-00001.jpg image-00002.jpg
pdfcpu: ambiguous parameter prefix "d"
@imqishi imqishi changed the title import images default command and help mistake import images default command and help info mistake Apr 16, 2024
@hhrutter
Copy link
Collaborator

That's a bug in the doc.
Use dim and dpi meanwhile and you should be fine.
I take a look!!

@hhrutter
Copy link
Collaborator

Fixed with latest commit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants