Page shrinking or scaling

View: New views
4 Messages — Rating Filter:   Alert me  

Page shrinking or scaling

by DeanNelson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi y'all,
 
Is there a way to shrink the page size in Docbook without having to reformat the doc going to PDF (FOP).
 
My users would like to have a "half size" manual to travel with instead of a regular US Letter size page. I guess I could to this at the printers, but it would be nice if I could do it at the office.
 
I tried adjusting the page.height and .width but that just messed things up because the fonts were still the same size as were the images.
 
Any ideas?
 
Regards,
Dean Nelson

Re: Page shrinking or scaling

by Camille Bégnis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

font size is static by default. But you could actually make the value
dynamic by assigning its value depending on the paper.type parameter for
example.

<xsl:param name="body.font.master">
  <xsl:choose>
    <xsl:when test="$paper.type="A5">10pt</xsl:when>
    <xsl:when test="$paper.type="A3">14pt</xsl:when>
    <xsl:otherwise>12pt</xsl:otherwise>
  </xsl:choose>
</xsl:param>

(untested)

Concerning images, you can either:
- make the size relative (e.g. width="80%")
- recalculate the size at transformation time by extracting it in the
image handling template and making it a fraction of the static size
depending on the paper size change... (might be more difficult).

Good luck,

Camille.

DeanNelson@... wrote:

> Hi y'all,
>  
> Is there a way to shrink the page size in Docbook without having to
> reformat the doc going to PDF (FOP).
>  
> My users would like to have a "half size" manual to travel with
> instead of a regular US Letter size page. I guess I could to this at
> the printers, but it would be nice if I could do it at the office.
>  
> I tried adjusting the page.height and .width but that just messed
> things up because the fonts were still the same size as were the images.
>  
> Any ideas?
>  
> Regards,
> Dean Nelson

[camille.vcf]

begin:vcard
fn:Camille Begnis
n:Begnis;Camille
org:NeoDoc
adr:;;5 rue de la Touloubre;Venelles;;13770;France
email;internet:camille@...
tel;work:+33.9.54.96.99.55
tel;fax:+33.9.59.96.99.55
tel;cell:+33.6.33.15.10.23
url:http://www.neodoc.biz
version:2.1
end:vcard




---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...

Re: Page shrinking or scaling

by Vincent Hennebert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Dean Nelson wrote:

> Hi y'all,
>  
> Is there a way to shrink the page size in Docbook without having to  
> reformat the doc going to PDF (FOP).
>  
> My users would like to have a "half size" manual to travel with instead of  
> a regular US Letter size page. I guess I could to this at the printers, but
> it  would be nice if I could do it at the office.
>  
> I tried adjusting the page.height and .width but that just messed things up
>  because the fonts were still the same size as were the images.
>  
> Any ideas?

I think your best bet is to use some PDF post-processing tool to scale
down the PDF produced by FOP. That way you are sure that both versions
will look absolutely the same, so it will be easier to, e.g., refer back
to the normal version after a first reading with the small one.

Your PDF viewer should allow you to ‘print’ the file into another PDF
file with a different scale. You can also use Ghostscript (taken from
the ps2pdf command and adapted):
    gs -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
        -sPAPERSIZE=halfletter -dPDFFitPage -sOutputFile=small.pdf normal.pdf


HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Parent Message unknown Re: Page shrinking or scaling

by DeanNelson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks! The gs command line worked.
 
In a message dated 10/23/2009 3:42:06 A.M. Pacific Daylight Time, vhennebert@... writes:
Hi,

Dean Nelson wrote:

> Hi y'all,

> Is there a way to shrink the page size in Docbook without having to 
> reformat the doc going to PDF (FOP).

> My users would like to have a "half size" manual to travel with instead of 
> a regular US Letter size page. I guess I could to this at the printers, but
> it  would be nice if I could do it at the office.

> I tried adjusting the page.height and .width but that just messed things up
>  because the fonts were still the same size as were the images.

> Any ideas?

I think your best bet is to use some PDF post-processing tool to scale
down the PDF produced by FOP. That way you are sure that both versions
will look absolutely the same, so it will be easier to, e.g., refer back
to the normal version after a first reading with the small one.

Your PDF viewer should allow you to ‘print’ the file into another PDF
file with a different scale. You can also use Ghostscript (taken from
the ps2pdf command and adapted):
    gs -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \
        -sPAPERSIZE=halfletter -dPDFFitPage -sOutputFile=small.pdf normal.pdf


HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...