PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > PDF:Writer pages landscape and portrait
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
PDF:Writer pages landscape and portrait

Réponse
 
LinkBack Outils de la discussion
Vieux 14/09/2007, 10h20   #1
John Butler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PDF:Writer pages landscape and portrait

Hi,

Im creating a PDF report and throughout the PDF document there will be
some pages that need to be landscape and some that need to portrait. I
cant seem to find any documentation about inserting pages in the
document with a different layout, it looks like the whole document needs
to be on or the other when initialising
pdf = PDF::Writer.new(rientation => :landscape)

I currently have the seperate parts of the document rendering
individually so one option would be to merge them altogether when
finished and use the page numbering to tie them together.

Can anyone give some advice on the best route to take for this?

thanks

JB
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 14/09/2007, 12h00   #2
John Butler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PDF:Writer pages landscape and portrait

Using a java library is not an option,

Im looking at imagemagick but that looks like its only images to PDF.

JB
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 14/09/2007, 14h47   #3
Axel Etzold
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PDF:Writer pages landscape and portrait


-------- Original-Nachricht --------
> Datum: Fri, 14 Sep 2007 17:20:56 +0900
> Von: John Butler <johnnybutler7@gmail.com>
> An: ruby-talk@ruby-lang.org
> Betreff: PDF:Writer pages landscape and portrait


> Hi,
>
> Im creating a PDF report and throughout the PDF document there will be
> some pages that need to be landscape and some that need to portrait. I
> cant seem to find any documentation about inserting pages in the
> document with a different layout, it looks like the whole document needs
> to be on or the other when initialising
> pdf = PDF::Writer.new(rientation => :landscape)
>
> I currently have the seperate parts of the document rendering
> individually so one option would be to merge them altogether when
> finished and use the page numbering to tie them together.
>
> Can anyone give some advice on the best route to take for this?
>
> thanks
>
> JB
> --
> Posted via http://www.ruby-forum.com/.


Dear John,

one option might be to convert the PDF document to postscript
(using ghostscript http://pages.cs.wisc.edu/~ghost/doc/AFPL/index.htm),

You can then select certain pages using psselect (which is part
of psutils (ftp://ftp.dcs.ed.ac.uk/pub/ajcd/psutils.tar.gz) , which contains also pstops, which allows to rotate a ps file :

(assuming it started out being 8.5" wide):

pstops -w0 -h0 1:0R\(0in,8.5in\) input.ps > rotated.ps

Next, you would need to output the rotated file on a landscape
page while converting it to pdf. For a 11" W x 8.5" H page:

ps2pdf13 -g7920x6120 rotated.ps

(The units of measure are decipoints, where 720 decipoints = 1 inch)

Best regards,

Axel
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

  Réponse avec citation
Vieux 14/09/2007, 14h51   #4
Axel Etzold
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PDF:Writer pages landscape and portrait


-------- Original-Nachricht --------
> Datum: Fri, 14 Sep 2007 21:47:11 +0900
> Von: "Axel Etzold" <AEtzold@gmx.de>
> An: ruby-talk@ruby-lang.org
> Betreff: Re: PDF:Writer pages landscape and portrait


>
> -------- Original-Nachricht --------
> > Datum: Fri, 14 Sep 2007 17:20:56 +0900
> > Von: John Butler <johnnybutler7@gmail.com>
> > An: ruby-talk@ruby-lang.org
> > Betreff: PDF:Writer pages landscape and portrait

>
> > Hi,
> >
> > Im creating a PDF report and throughout the PDF document there will be
> > some pages that need to be landscape and some that need to portrait. I
> > cant seem to find any documentation about inserting pages in the
> > document with a different layout, it looks like the whole document needs
> > to be on or the other when initialising
> > pdf = PDF::Writer.new(rientation => :landscape)
> >
> > I currently have the seperate parts of the document rendering
> > individually so one option would be to merge them altogether when
> > finished and use the page numbering to tie them together.
> >
> > Can anyone give some advice on the best route to take for this?
> >
> > thanks
> >
> > JB
> > --
> > Posted via http://www.ruby-forum.com/.

>
> Dear John,
>
> one option might be to convert the PDF document to postscript
> (using ghostscript http://pages.cs.wisc.edu/~ghost/doc/AFPL/index.htm),
>
> You can then select certain pages using psselect (which is part
> of psutils (ftp://ftp.dcs.ed.ac.uk/pub/ajcd/psutils.tar.gz) , which
> contains also pstops, which allows to rotate a ps file :
>
> (assuming it started out being 8.5" wide):
>
> pstops -w0 -h0 1:0R\(0in,8.5in\) input.ps > rotated.ps
>
> Next, you would need to output the rotated file on a landscape
> page while converting it to pdf. For a 11" W x 8.5" H page:
>
> ps2pdf13 -g7920x6120 rotated.ps
>
> (The units of measure are decipoints, where 720 decipoints = 1 inch)
>
> Best regards,
>
> Axel
> --
> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


Dear John,

I forgot to say how to merge postscript files before converting them:
that's also done by ghostscript:

gs -sDEVICE=pswrite -sOutputFile=output.ps -dNOPAUSE -dBATCH file1.ps file2.ps file3.ps

Best regards,

Axel
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h14.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,60800 seconds with 12 queries