Merging Different PDF formats with PHP? -


i trying merge few pdf files setasign fpdi. packages working fine pdf format failing others.
there 3 different formats of pdf find.

format 1:

%pdf-1.4 %´µ¶· % 1 0 obj << /type /catalog /pagemode /usenone /viewerpreferences 2 0 r /pages 3 0 r /pagelayout /onecolumn >> 

format 2:

--uuid:3c4caf6a-2a7e-4ca5-9e0a-63346610deae content-type: application/octet-stream content-transfer-encoding: binary content-id: <1>  %pdf-1.4 %âãÏÓ 1 0 obj <</colorspace/devicegray/subtype/image 

format 3:

2550 4446 2d31 2e34 0a25 aaab acad 0a34 2030 206f 626a 0a3c 3c0a 2f43 7265 6174 6f72 2028 4170 6163 6865 2046 4f50 2056 6572 7369 6f6e 2031 2e30 290a 2f50 726f 6475 6365 7220 2841 7061 6368 6520 464f 5020 5665 7273 696f 6e20 312e 3029 0a2f 4372 6561 7469 6f6e 4461 7465 2028 443a 3230 3136 3131 3130 3135 3437 3532 5a29 0a3e 3e0a 656e 646f 626a 0a35 2030 206f 

fpdi works great format 1 failing format 2.

when tried merge 2 files format 2 pdf merging website, got combined pdf in format 3.

my question how can merge 2 format 2 files in format in php.

and if can explain these formats, great too.

"format 2" corrupted file, because includes invalid header data corrupt byte offset positions in pdf (fpdi not repair such files requires valid pdfs).

"format 3" bunch of hex values not pdf file.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -