genpdf: command line string of images, and Type 2 text alignment

9 views
Skip to first unread message

Jonathan Hung

unread,
Oct 7, 2011, 10:31:05 AM10/7/11
to Hasan Al-Khaffaf, dec...@googlegroups.com
Hi Hasan,

I had some time to test the latest version of genpdf from your bitbucket repository.

While I haven't had a chance to test this thoroughly yet, I do have 2 bits of feedback:

1. Is it possible to change the command line so that a space separated list of image files can be used?
Example: decapod-genpdf.py -d foo/ -p foo.pdf -b image1.png image2.png image3.png

2. The text generated by Type 2 is not aligning with the text in the image. Notably, there doesn't appear to be any white space being inserted into the text. (See attached)

I don't know if you changed anything, but Type 1 PDF generation appears to be performing a bit faster. (Could just be a coincidence though :).

Thanks!

- Jonathan.

---
Jonathan Hung / jh...@ocad.ca
IDRC - Interaction Designer / Researcher
Tel: (416) 977-6000 x3959
Fax: (416) 977-9844

1-1-1-t2.pdf

Hasan Al-Khaffaf

unread,
Oct 13, 2011, 7:54:16 AM10/13/11
to Jonathan Hung, dec...@googlegroups.com, Hasan Al-Khaffaf
Hi Jonathan

Thanks for your feedbacks.

1. It is possible to accomplish the same result requested in point 1 of your email by using the img2dfper.py, it will accept a folder of images and will run decapod-genpdf on it.

2. I had corrected the ocro2pdf.py code. The text-words are now well aligned in Type 2 & Type 3 PDF.

3. I have also removed a bug that causes the duplication of pages in PDF files.
4. No change is made to the code that generate Type 1 PDF, so the speed gain could be a matter of coincidence.


The new changes is already pushed to my bitbucket account:: https://bitbucket.org/hasan/genpdf/changesets

Hasan

Jonathan Hung

unread,
Oct 25, 2011, 10:53:14 AM10/25/11
to Hasan Al-Khaffaf, dec...@googlegroups.com
Hi Hasan,

I have (finally) gotten around to testing this again.

1. I did use img2pdfper.py but the output isn't quite what I expected. Currently genpdf creates 1 PDF per image. What I would like to see is the ability to generate 1 PDF from multiple images. Thus making it easier to create PDFs from PNGs and JPGs without having to convert them into multipage TIFFs first.

2. This looks much better! I tested with type 2 PDF. I have not tried Type 3 yet.

3. Confirmed fixed.

Also I did some testing of some old genpdf bugs we found a long time ago and discovered that they still exist:
DECA-157: Exported PDF sometimes produces inverted images

I think the general expectation is that with Type 1, the output PDF should be faithful to the input image. I don't think the user expects any changes to the colour, aspect ratio, rotation, etc 

I'll continue to test genpdf a little more.

- Jon.

---
Jonathan Hung / jh...@ocad.ca
IDRC - Interaction Designer / Researcher
Tel: (416) 977-6000 x3959
Fax: (416) 977-9844



Reply all
Reply to author
Forward
0 new messages