Several issues in latest release

Discussions about PDF management.
Post Reply
MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

Several issues in latest release

Post by MarkoZ » Tue Aug 30, 2011 8:55 am

I've been using the plugin to create new PDF and ran into a couple of problems. I was using these settings.

Code: Select all

            gdPDF.NewPDF(true);
            gdPDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitPoint);
            gdPDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
When drawing an image on PDF page with function DrawImage, DstX variable seems to be ignored. No matter which value I provide, images are always drawn at same distance from left border. Also DstY value seems to refer to lower left corner of the image, which seems inconsistent with PdfOrigin setting. Same happens when using DrawText function. DrawRectangle however uses upper left corner.

Plugin throws odd exception when drawing any of the following characters using DrawText function: š, Š, č. Č, ć, Ć, ž, Ž, đ, Đ. Since I have no such problems when drawing to image object with GdPictureImaging class, I assume the problem is in PDF plugin and not font used. In case it matters, I used "PdfStandardFont.Helvetica";
Message: Index was outside the bounds of the array.

Source: GdPicture.NET.PDF

StackTrace: at m.e(String A_0)
at m.a(Single A_0, Single A_1, String A_2)
at GdPicture.NET.PDF.CGdPicturePDF.DrawText(Single XPos, Single YPos, String Text)
at GdPicture.GdPicturePDF.DrawText(String FontResName, Single DstX, Single DstY, String Text)
at PPI.clsIzpisDokumenta.IzdelajListoDveKoloni(GdPicturePDF gdPDF, String NaslovListe, Double startY, Double PozicijaSeparatorja, List`1 Lista, Double& currentY)
at PPI.clsIzpisDokumenta.Porocilo(List`1 Paket1, List`1 Dokument, Image Slika)

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Several issues in latest release

Post by Loïc » Tue Aug 30, 2011 9:47 am

Hi,

All these problems are solved in our current 8.2 release that will be published in 1rst September.

Kind regards,

Loïc

MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

Re: Several issues in latest release

Post by MarkoZ » Fri Sep 02, 2011 11:00 am

Just tried the 8.2.0 version, same settings as before. DstX parameter of DrawImage still does nothing. And DstY parameter still refers to the lower left corner of the image, even with PdfOriginTopLeft setting.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Several issues in latest release

Post by Loïc » Fri Sep 02, 2011 11:10 am

Hi,
DstX parameter of DrawImage still does nothing
Damn you are right. We forgot to fix this validate this fix. It will be on the next 8.2.1 that will be published urgently.
And DstY parameter still refers to the lower left corner of the image, even with PdfOriginTopLeft setting.
This is the normal behavior. From the reference guide:
DstX: The X destination of the bottom left corner of the bitmap in current unit.
DstY: The Y destination of the bottom left corner of the bitmap in current unit.
Kind regards,

Loïc

MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

Re: Several issues in latest release

Post by MarkoZ » Fri Sep 02, 2011 11:24 am

Found another minor issue.

PdfStandardFont.PdfStandardFontHelveticaOblique is actually bold
PdfStandardFont.PdfStandardFontHelveticaBold is bold + oblique
PdfStandardFont.PdfStandardFontHelveticaBoldOblique is just oblique

Thanks for help.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Several issues in latest release

Post by Loïc » Fri Sep 02, 2011 12:02 pm

Thank you. This will be also fixed.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests