如何使用json中的tcpdf创建pdf

时间:2014-03-02 10:37:00

标签: php json laravel tcpdf

我正在运行的json文件,例如:

{
  "id": "1",
  "title": "IW Photobook",
  "alias": "iw_photobook",
  "design_data": {
    "pages": {
      "page_00": {
        "width": 7500,
        "height": 3300,
        "dpi": {
          "x": 300,
          "y": 300
        },
        "layers": [
          {
            "uniqid": "coverfil_53052cb8b544b",
            "lowres_url": "/assets/iw_photobook/72dpi/coverfil_53052cb8b544b.jpg",
            "highres_url": "/assets/iw_photobook/300dpi/coverfil_53052cb8b544b.png",
            "name": "coverfill",
            "x": 0,
            "y": 0,
            "width": 3749,
            "height": 3300
          },
          {
            "uniqid": "iwlogo_53052cbd2c7e2",
            "lowres_url": "/assets/iw_photobook/72dpi/iwlogo_53052cbd2c7e2.png",
            "highres_url": "/assets/iw_photobook/300dpi/iwlogo_53052cbd2c7e2.png",
            "name": "iwlogo",
            "x": 397,
            "y": 2386,
            "width": 1023,
            "height": 472
          },
          {
            "uniqid": "2013_53052cbe63098",
            "lowres_url": "/assets/iw_photobook/72dpi/2013_53052cbe63098.png",
            "highres_url": "/assets/iw_photobook/300dpi/2013_53052cbe63098.png",
            "name": "2013",
            "x": 2686,
            "y": 2537,
            "width": 410,
            "height": 170
          },
          {
            "uniqid": "shape1_53052cbf8a0f6",
            "lowres_url": "/assets/iw_photobook/72dpi/shape1_53052cbf8a0f6.jpg",
            "highres_url": "/assets/iw_photobook/300dpi/shape1_53052cbf8a0f6.png",
            "name": "shape1",
            "x": 2502,
            "y": 2380,
            "width": 15,
            "height": 471
          }
        ]
      }
    }
  },
  "exterior_dimensions": {
    "width": 3750,
    "height": 3300
  },
  "interior_dimensions": {
    "width": 3750,
    "height": 3300
  },
  "pages": "6",
  "symmetrical_bleed": null,
  "spine_width": null,
  "hinge_offset": null,
  "collate": null,
  "crop_marks": null,
  "published": "1",
  "seam_orientation": "1",
  "state": "notifying",
  "template_type_id": "1",
  "binding_method_id": "1",
  "cover_type_id": "2",
  "user_id": "1",
  "created_at": "2014-02-19 20:48:58",
  "updated_at": "2014-02-19 22:29:34",
  "deleted_at": null
}

我想使用tcpdf创建pdf文件,例如: -

我必须使用上面较高网址的图片网址。

forntpage-> page00-> page_01-> page_02-> page_03->尾页

有没有人可以帮助我。

0 个答案:

没有答案