0

I am using matchbox to insert images into text_flow which is working nicely, I need to do the same with small PDF charts - before I go down this path just wondering if its even possible ....Yes / No ?

alQemist
  • 362
  • 4
  • 13

1 Answers1

1

sure, instead of fitting the image you just have to use the PDF page afterwards. So when you go the way of the following PDFlib Cookbook sample http://www.pdflib.com/pdflib-cookbook/text-output/wrap-text-around-images/ (case 4) but just place a PDI page instead of the fit_image():

                x1 = p.info_matchbox(matchboxnames[m][0], i, "x1");
                y1 = p.info_matchbox(matchboxnames[m][0], i, "y1");
                width = p.info_matchbox(matchboxnames[m][0], i, "width");
                height = p.info_matchbox(matchboxnames[m][0], i, "height");
                p.fit_pdi_page(page, x1, y1,
                    "boxsize {" + width + " " + height +
                    "} fitmethod meet position=center");
Rainer
  • 2,013
  • 1
  • 10
  • 7
  • I have implement this solution however I have multiple inserts one after another - as long as there is no whitespace between them the inserts are fine but if this is the p.info_matchbox y1 property is null. – alQemist Feb 17 '16 at 19:13
  • without details it's hard to guess what happens in your case. When you think this is a bug in the software, I would recommend to contact the guys from PDFlib directly http://www.pdflib.com/licensing-support/opening-a-support-case/. – Rainer Feb 18 '16 at 05:50