[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swftools-common] possible rounding issue when using "-s zoom="
From: |
Ben Broadhurst |
Subject: |
[Swftools-common] possible rounding issue when using "-s zoom=" |
Date: |
Wed, 03 Mar 2010 14:00:55 +0000 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
Hi all,
I am having a minor issue with swfs being sized incorrectly. An example
pdf is here:
http://ps1.sk.im/7/8/78826/PDFs/page_01.pdf
PDF size info:
width/height: 595.22x842 points (209.98x297.04 mm)
Our system converts pdfs to 450px wide, so I calculate the "-s zoom="
param with the formulae (450/widthInPoints)*72, this gives me a dpi of
54.43365478
So pdf2swf get run like this:
pdf2swf -p 1 -s zoom=54.43365478 -s jpegquality=90 -S -z
PDFs/page_01.pdf -o hiRes/page_01.swf
This generates an sdf that is 449 pixels wide. Not a huge difference I
know, but it gives us headaches down the line. This happens in about 7%
of PDFs that I convert, and when it does happen it's always 449 - never
451 which is why I thought it may be a rounding issue.
In case it helps, I get the size info out using pdf2text
(www.pdftron.com) using the command line:
pdf2text --pages 1 --pageinfo PDFs/page_01.pdf
which spits out:
595.22, 842, 0, 0, 595.22, 842, 0, 0, 595.22, 842, 180
which is page width height mw mh pw ph
cropLeft cropBottom nw nh rotation
These dimensions match what I get from Acrobat as well.
Sorry for the long email - I have been trying to fix this for what feels
like my entire natural life.
Cheers all,
ben.
- [Swftools-common] possible rounding issue when using "-s zoom=",
Ben Broadhurst <=