mpdf如何在版本7上设置页边距?

时间:2018-07-22 17:14:59

标签: mpdf

如何设置新7版本的边距? 我想删除页面的边距,设置为0。在版本6中,我将它们设置为新的mPDF(但现在我不知道怎么可能

在我使用的6上:

$pdf = new \mPDF('utf-8', 'A4'.($orientation == 'L' ? '-L' : ''), '', '', $margin_left, $margin_right, $margin_top, $margin_bottom, 0, 0);

现在?

谢谢

1 个答案:

答案 0 :(得分:1)

mPDF 7构造函数的签名为

CoreVideo

您需要传递带有适当键的值数组,其边距为SIGSEGV Attempted to dereference null pointer. Frameworks/CoreFoundation.framework/CoreFoundation _CFArrayAppendValue Frameworks/CoreVideo.framework/CoreVideo CVMetalTextureCache::bufferBackingNotInUse(CVBufferBacking*) Frameworks/CoreVideo.framework/CoreVideo CVBufferBacking::releaseUsage() Frameworks/CoreVideo.framework/CoreVideo CVMetalTexture::finalize() Frameworks/CoreFoundation.framework/CoreFoundation __CFRelease /Users/builduser/buildslave/unity/build/Modules/Video/Public/Media/AVFoundation/AVFoundationVideoPlayback.mm:349:25 ___ZZN15TextureCacheImpILb1EE20ReleaseNativeTextureElEN5Local14ReleaseStorageEiPv_block_invoke Frameworks/Metal.framework/Metal __doMTLDispatch Frameworks/Metal.framework/Metal -[_MTLCommandBuffer didCompleteWithStartTime:endTime:error:] Frameworks/Metal.framework/Metal -[MTLIOAccelCommandBuffer didCompleteWithStartTime:endTime:error:] Frameworks/Metal.framework/Metal -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:] PrivateFrameworks/IOAccelerator.framework/IOAccelerator _ioAccelCommandQueueBlockFenceCallback Frameworks/IOKit.framework/Versions/A/IOKit _IODispatchCalloutFromCFMessage Frameworks/IOKit.framework/Versions/A/IOKit __IODispatchCalloutWithDispatch /usr/lib/system/libdispatch.dylib _dispatch_mig_server$VARIANT$armv81 /usr/lib/system/libdispatch.dylib __dispatch_client_callout /usr/lib/system/libdispatch.dylib __dispatch_continuation_pop$VARIANT$armv81 /usr/lib/system/libdispatch.dylib __dispatch_source_invoke$VARIANT$armv81 /usr/lib/system/libdispatch.dylib __dispatch_queue_serial_drain$VARIANT$armv81 /usr/lib/system/libdispatch.dylib __dispatch_queue_invoke$VARIANT$armv81 /usr/lib/system/libdispatch.dylib __dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81 /usr/lib/system/libdispatch.dylib __dispatch_workloop_worker_thread$VARIANT$armv81 /usr/lib/system/libsystem_pthread.dylib __pthread_wqthread \Mpdf\Mpdf::__construct([array $config = []]) margin_leftmargin_rightmargin_top和{ {1}}。

整个代码将是

margin_bottom

所有这些和其他构造函数$ config键都写在mPDF constructor documentation page上。