[reportlab-users] PDF File corrupt
Dani Reguera
drbakhache at gmail.com
Fri Dec 4 09:53:30 EST 2009
Here is the code:
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import landscape,A4
from reportlab.pdfgen.textobject import PDFTextObject
from reportlab.lib.colors import HexColor
from reportlab.pdfbase import pdfmetrics
mycanvas = canvas.Canvas(SUBTITLE,pagesize=landscape(A4))
mycanvas.drawImage(styles['credits']['path'],int(styles['credits']['x'])*mm,int(styles['credits']['y'])*mm,width=int(styles['credits']['width'])*mm,height=int(styles['credits']['height'])*mm,
mask='auto')
kk = canvas.textobject.PDFTextObject(mycanvas)
kk.setTextOrigin(x=0*mm,y=0*mm)
kk.textOut(text)
mycanvas.drawRightString(x*mm,y*mm,text)
mycanvas.showPage()
mycanvas.save()
2009/12/4 Carl Karsten <carl at personnelware.com>
> Dani,
>
> You should post either some python code that generates the pdf, and or the
> pdf.
>
> On Fri, Dec 4, 2009 at 8:18 AM, Dani Reguera <dreguera at tagzania.com>
> wrote:
> > Hi everybody!
> >
> >>>>> post a short example to the list that illustrates the problem.
> >
> > The problem is when I open the file with acrobat reader (In Win or in
> > Linux). Reportlab generates the file well (I can see it with the document
> > viewer) but I can open it with acrobat reader. The file is corrupted
> >
> > "An error exists on this page. Acrobat does not display the page
> correctly.
> > Please contact the person who created the PDF document to correct the
> > problem"
> >
> >
> >
> > 2009/12/4 Robin Becker <robin at reportlab.com>
> >>
> >> Dani Reguera wrote:
> >>>
> >>> I generated the pdf file with reportlab, then I choose "Open with..."
> and
> >>> select "Acrobe REader" and gives me that error, all this with Ubuntu.
> >>> Also I have tested sending via e-mail and trying to open with Windows
> and
> >>> gives me the same problem. File corrupted.
> >>
> >> .....
> >> post a short example to the list that illustrates the problem.
> >> --
> >> Robin Becker
> >> _______________________________________________
> >> reportlab-users mailing list
> >> reportlab-users at lists2.reportlab.com
> >> http://two.pairlist.net/mailman/listinfo/reportlab-users
> >
> >
> >
> > --
> >
> > Dani Reguera
> > dreguera at tagzania.com
> >
> > Tagzania Services [www.tagzania-services.com]
> > Azitaingo Industrialdea 3 K
> > E-20600 Eibar
> > Tel: (+34) 943 82 17 80
> >
> > _______________________________________________
> > reportlab-users mailing list
> > reportlab-users at lists2.reportlab.com
> > http://two.pairlist.net/mailman/listinfo/reportlab-users
> >
> >
>
>
>
> --
> Carl K
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
--
Dani Reguera
dreguera at tagzania.com
Tagzania Services [www.tagzania-services.com]
Azitaingo Industrialdea 3 K
E-20600 Eibar
Tel: (+34) 943 82 17 80
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20091204/17c46159/attachment.htm>
More information about the reportlab-users
mailing list