Those are bad news unfortunatelly. But I suppose the newest FPDI version can work with TCPDF 3.x, they didn't say it doesn't. So maybe I could try. But since my object programming knowledge is not so good, I have been struggling with this for hours.
Here is what I have found untill now: FPDI is using a kind of bridge class for remapping TCPDF to FPDF. So if you load TCPDF, then bridge class extends TCPDF (the trick is to remap to FPDF again by setting "class FPDF extends PDF") and then FPDF_TPL extends bridge class. This way, you can use one class for both TCPDF and FPDF. Now, how to implement p.mapper PDF class into all this? I have thought about setting bridge class to extend PDF class instead of TCPDF class, something like: FPDI class | FPDF_TPL class | bridge class | p.mapper PDF class | TCPDF class but I don't know if this is the right way. If I include require_once('tcpdf.php'); require_once('fpdi.php'); in pdfprint.php then bridge class cannot extend PDF class because it is not defined yet... Anyway, I am pretty weak on this but I suppose the solution is simple. If you point me to right direction, I am sure I can try using FPDI with TCPDF versioin3.x and if/when I make it work I can write a short Howto so maybe someone else can benefit :-) thanks very much regards, dejan "Armin Burger" <[EMAIL PROTECTED]> wrote on 14.11.2008 13:16:16: > I tried to use TCPDF 4 instead of the 3.x I placed under p.mapper dev. > It worked in most cases but for a layer with lots of classes the PDF > print created an unvalid PDF, without any chance to know where it > failed. With TCPDF 3 it worked fine however. > > armin > > > On Fri, Nov 14, 2008 at 9:58 AM, <[EMAIL PROTECTED]> wrote: > > > > Thanks Armin, you made me happy for the end of the week :-) > > > > I have successfully used your newest printpdf.php with the newest TCPDF > > version 4.2.009. Now I have to try using FPDI with all this ... I hope I'll > > be able to do it alone > > > > regards, dejan > > > > Armin Burger <[EMAIL PROTECTED]> wrote on 13.11.2008 21:58:14: > > > >> For the actual dev version I replaced the odler TCPDF with a newer > >> version (something 3.x). It worked, I just noticed some offset of the > >> text towards the legend icons in the printed legend. I haven't tried to > >> identify why. Maybe it's just a small adjustment necessary. So you could > >> use a newer version and try your luck. > >> > >> AFAIR it was necessary to modify 1 or 2 entries in the config for TCPDF > >> to work without absolute paths. Just compare the original and my > >> modified one. > >> > >> Armin > >> > >> On 13/11/2008 11:18, [EMAIL PROTECTED] wrote: > >> > I have tried using the newest TCPDF version instead of p.mapper one and > >> > it > >> > works! > >> > > >> > Now, do I have to include this new TCPDF version in p.mapper? Can I do > >> > it > >> > at all? Will p.mapper support this and which changes have to be done? > >> > > >> > regards, dejan > >> > > >> > [EMAIL PROTECTED] wrote on 13.11.2008 11:02:14: > >> > > >> >> Hi, > >> >> > >> >> The recent version of FPDI supports TCPDF. So I have tried the > >> > following, > >> >> just for the test: > >> >> > >> >> - downloaded FPDI-1.2.1 and FPDF TPL-1.1.2 > >> >> - put everything to an example web accessible folder, together with all > >> >> the content from pmapper/incphp/print folder > >> >> - made a test php file like this: > >> >> > >> >> <?php > >> >> require_once('tcpdf.php'); > >> >> require_once('fpdi.php'); > >> >> > >> >> // initiate FPDI > >> >> $pdf =& new FPDI(); > >> >> > >> >> // add a page > >> >> $pdf->AddPage(); > >> >> // set the sourcefile > >> >> $pdf->setSourceFile('PDFDocument.pdf'); > >> >> // import page 1 > >> >> $tplIdx = $pdf->importPage(1); > >> >> // use the imported page and place it at point 10,10 with a width of > >> >> 100 > >> > > >> >> mm > >> >> $pdf->useTemplate($tplIdx, 10, 10, 100); > >> >> // now write some text above the imported page > >> >> $pdf->SetFont('arial'); > >> >> $pdf->SetTextColor(255,0,0); > >> >> $pdf->SetXY(25, 25); > >> >> $pdf->Write(0, "This is just a simple text"); > >> >> > >> >> $pdf->Output('newpdf.pdf', 'D'); > >> >> > >> >> But when I try to run it, I get "FPDF error: Cannot access protected > >> >> property FPDI:$fontlist / Undefined property: FPDI::$fontlist" error > >> >> > >> >> Do I have to try with another (newer) TCPDF version? Do I have to > >> >> modify > >> > > >> >> something in p.mapper TCPDF version? > >> >> > >> >> thanks very much > >> >> > >> >> regards, dejan > >> >> > >> > > >> > ------------------------------------------------------------------------- > >> >> This SF.Net email is sponsored by the Moblin Your Move Developer's > >> > challenge > >> >> Build the coolest Linux based applications with Moblin SDK & win great > >> > prizes > >> >> Grand prize is a trip for two to an Open Source event anywhere in the > >> > world > >> >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> >> _______________________________________________ > >> >> pmapper-users mailing list > >> >> pmapper-users@lists.sourceforge.net > >> >> https://lists.sourceforge.net/lists/listinfo/pmapper-users > >> > > >> > ------------------------------------------------------------------------- > >> > This SF.Net email is sponsored by the Moblin Your Move > >> > Developer'schallenge > >> > Build the coolest Linux based applications with Moblin SDK & win > >> great prizes > >> > Grand prize is a trip for two to an Open Source event anywhere in the > >> > world > >> > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> > _______________________________________________ > >> > pmapper-users mailing list > >> > pmapper-users@lists.sourceforge.net > >> > https://lists.sourceforge.net/lists/listinfo/pmapper-users > >> > > >> > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users