drccfl9407 2016-11-16 15:55
浏览 29

合并PDF而不保存磁盘上的文件

In php, after calling a webservice, I have some PDF content in variables.

I need to merge the pdf content in a single variable to make one single PDF and then post it to another webservice.

I found some solutions based on GS exec or FPDI but those solutions oblige me to save the files on the disk before merging it.

Is there a way to merge it in a variable without writing on the disk?

Code in Php (I have to merge the result of the foreach):

foreach($LogContent->DocumentsAnnexes->DocAnnexe as $parametre=>$value){
$content_brut=$value->fichier;
}
$content_maj=base64_decode($content_brut);
$OKMDocument->checkin(array('token' => $token, 'docPath' => $uuid, 'content' => $content_maj, 'comment' => 'Facture validée depuis le parapheur'));

(I can't add PDF example because of the size limit of the post)

  • 写回答

2条回答 默认 最新

  • duan6301 2016-11-16 20:27
    关注

    You can use a stream wrapper for variables (e.g. this) to overcome this issue.

    评论

报告相同问题?

悬赏问题

  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数