Yes, that is exactly the same PoDoFo does if you leave the parameters for dScaleX and dScaleY away. So p.DrawXObject( 0, 10, &xo, pdfWidth, pdfHeight ); and p.DrawXObject( 0, 10, &xo ); are equal.
But at least it is working now :-) Sorry for the misunderstandings. Am Mittwoch, 25. Juni 2008 schrieb EXTERNAL Loch Sebastian (Firma Ferchau; BhP/TEF17): > I found a solution. > > When I specify the width and the height when drawing the Xobject it works: > p.DrawXObject( 0, 10, &xo, pdfWidth, pdfHeight ); > > Maybe there's something wrong with the automatic setting of the matrix > with the size of the Xobject... > > Regards > Sebastian > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 25. Juni 2008 08:34 > An: EXTERNAL Loch Sebastian (Firma Ferchau; BhP/TEF17) > Cc: [email protected] > Betreff: Re: AW: [Podofo-users] Conversion Cals to Pdf not working anymore > sinceswitch from 0.5.0 to svn trunk! > > Sorry, I think my answer was not clear. You do not have to set the matrix, > PoDoFo will do it for you. > > Unfortunately the old code of yours was setting the matrix in a wrong way: > p.DrawXObject( 0, vPos, &xo, 1, 1 ); > > The last two parameters are 1 which result in a matrix like this: > 1.000 0 0 1.000 0.000 10.000 cm > > If you leave the last 2 parameters to PdfPainter::DrawXObject away, PoDoFo > will pick default values, i.e. the size of the XObject. > > So you onle have to use the line: > p.DrawXObject( 0, vPos, &xo ); > > regards, > Dom > > Am Mittwoch, 25. Juni 2008 schrieb EXTERNAL Loch Sebastian (Firma Ferchau; > > BhP/TEF17): > > At the moment, I don't see how to set the matrix. > > Maybe it's still to early... > > > > Probably by adding a key Matrix to the dictionary? > > How can I specify these six values to the corresponding key? > > > > Regards > > Sebastian > > > > -----Ursprüngliche Nachricht----- > > Von: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Im Auftrag von > > Dominik Seichter Gesendet: Dienstag, 24. Juni 2008 13:43 > > An: [email protected] > > Cc: EXTERNAL Loch Sebastian (Firma Ferchau; BhP/TEF17) > > Betreff: Re: [Podofo-users] Conversion Cals to Pdf not working anymore > > sinceswitch from 0.5.0 to svn trunk! > > > > Hello, > > > > Matrix in the 0.5.0 PDF: 3168.000 0 0 2448.000 0.000 10.000 cm > > Matrix in the 0.6.0 PDF: 1.000 0 0 1.000 0.000 10.000 cm > > BBox of XObject in both: [ 0.0 0.0 3168.000 2448.000] > > > > So just setting the correct matrix before drawing the XObject does the > > trick. > > > > Instead of p.DrawXObject( 0, vPos, &xo, 1, 1 ); just do > > p.DrawXObject( 0, vPos, &xo );. PoDoFo will pick the correct default > > values for scaling the XObject. This change was necessary because we > > inconsistencies between drawing XObjects and Images. Sorry for the > > inconviniences the change caused for you. > > > > best regards, > > Dom > > > > Am Dienstag, 24. Juni 2008 schrieb EXTERNAL Loch Sebastian (Firma > > Ferchau; > > > > BhP/TEF17): > > > Hello all, > > > > > > I switched our project from old release 0.5.0 to the > > > actual version from trunk, but our main functionality > > > didn't work since this switch. > > > > > > We need to convert documents in Cals format to pdf. > > > With the new version a Pdf document is created, but you > > > see only a blank page! > > > I attached an example origin document plus the generated pdfs > > > with the old 0.5.0 and new version from trunk. > > > Maybe someone can see what's going wrong there... > > > > > > The conversion is done by the following: > > > -reading header data from cals containing width,height,dpi,... > > > -creating pdf page > > > -creating Xobject with subtype Image and CCITTFAXDecode filter > > > -> creating appropriate dictionary > > > -> setting raw data > > > -finally drawing XObject to page and writing pdf document > > > > > > For more details see see attached code.txt. > > > > > > At the moment I have no idea why this conversion is going wrong. > > > It seems that the created pdf has the "correct" structure, > > > but I don't know for sure! Maybe someone can have please a look > > > at the created files. > > > > > > Any help is appreciated! > > > > > > Thanks. > > > > > > Regards > > > Sebastian -- ********************************************************************** Dominik Seichter - [EMAIL PROTECTED] KRename - http://www.krename.net - Powerful batch renamer for KDE KBarcode - http://www.kbarcode.net - Barcode and label printing PoDoFo - http://podofo.sf.net - PDF generation and parsing library SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE Alan - http://alan.sf.net - A Turing Machine in Java **********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
