Re: Where is the definition or documentation of PDF "default user space units"?



On Mar 11, 10:35 am, Ted Byers <r.ted.by...@xxxxxxxxx> wrote:
On Mar 10, 2:54 pm, Ted Byers <r.ted.by...@xxxxxxxxx> wrote:

Searching through the documentation for the PDF Perl packages'
documentation, I found very terse mention of "default user space
units", but I have yet to find what the default is, or how I can
change it (or at least make a call that says the coordinates provided
are in mm). To date, all my perl scripts that make PDF files use
coordinates determined by trial and error, but I want to change this
so I can just use coordinates in mm, or cm, and forget the tedium of
rerunning the script seemingly countless times to get the position of
text just right.

Thanks

Ted

Thanks guys.

Knowing the default units are points is a start, providing familiar
ground.  It makes writing functions to convert from any other unit of
length to points trivial.  I am quite used to writing code in a number
of languages to support real time animation, and to write code
generated graphics to a variety of output devices including printers:
all of which required explicit transformations from real world
coordinates to device coordinates.  However, the question is more
about use of PDF::API2, and related packages, than it is about the PDF
specification itself.

Depending on where the author lived and worked, his "default user
space units" could well have been inches, feet, millimeters, or
centimeters.  What was written in the documentation I referred to does
not make even that clear.

A colleague told me yesterday that the PHP PDF package he uses
supports providing coordinates in millimeters, and naturally I looked
into the Perl packages I use to see if they provide comparable
functionality.  The problem I encountered is one of salient
information apparently not being provided in the documentation of
functions and packages provided to create and edit PDF files.  If they
don't I can easily create it myself.  But as you can understand, I
would want to avoid recreating the wheel, and so would use the
packages' functions if they do what I require.

Thanks again,

Ted

If you're using a toolchain that goes through Postscript,
you can scale the coordinate system to inches

72 72 scale

or millimeters

72 2.54 div 28.3465 scale
or
28.3465 dup scale

I don't know the particulars of the various pdf
generators, but this is a fundamental capability
of the image model, hard-won in the desktop wars
of the eighties.
N.B. Transformations are often reset for each page.
For multiple pages, you'll have to arrange to
rescale on each one.

lxt
.



Relevant Pages

  • Re: new to ubuntu; have a few questions
    ... This is an ACPI-related error (the Root System Description Pointer ... This depends on what you need a PDF editor for. ... For learning suggestions with Linux, it is somewhat dependent on what ... The official documentation covers normal ...
    (Ubuntu)
  • Re: Carrying page numbering from one invocation of Pdf(la)tex to another
    ... forth the documentation consists of more than two hundred ... HTML and PDF. ... Each .tex file at present produces one HTML ... numbering scheme could be used, ...
    (comp.text.tex)
  • Re: [OT] Links to PDF manual
    ... wanted it in Tex format; I explained that I no longer programmed in punched cards, ... PDF, however, is largely user-hostile in terms of documentation. ... PDF files are designed to give the same physical appearance on every device, ...
    (microsoft.public.vc.mfc)
  • Re: Install from .tar.gz
    ... I do a "man -k pdf" (or ... Install it and try it out. ... The pity is that many of them not only think they can be administrator. ... Packages are bouncing all around and we have a package ...
    (alt.os.linux.suse)
  • Re: opening pdf file at or jumping to bookmark
    ... I want to use LaTeX as the documentation for a software ... With html it was easy to get the help viewer to open the ... nice pdf files with bookmarks with Latex, ... for on screen reading (but Im not sure if this is as a suitable ...
    (comp.text.tex)