pyfpdf icon indicating copy to clipboard operation
pyfpdf copied to clipboard

fpdf.output() Linux vs Mac

Open master0v opened this issue 3 years ago • 2 comments
trafficstars

On a mac machine fpdf.output() returns this:

bytearray(b'%PDF-1.3\n3 0 obj\n<</Type /Page\n/Parent 1 0 R\n/Resources 2 0 R\n/Contents 4 0 R>>\nendobj\n4 0 obj\n<</Filter /FlateDecode /Length 156>>\nstream\nx\x9c\x8d\x8f\xb9\nBA\x0cE\xe3\xae\xe3O\xdcR\x9b\x98\xc9L\xe6\xf1ZA\x0b;a>A\x14\xec\xb4\xf1\xf7\x8d\x8a\xb84\xda\x9c\x90\x85{\x88b\x13\x84\xad\xc1%,+\x16kE\x14\x96\x84\xba\xc7\xaa\x86\x13|W\xda\x0f\x9e\x0f\xf0\xcb\x9c\x12\x97\x8c\xc6\x94\xb3\xa2\xee0\xa3\x0eu\xa9G}\x1a8\x87\x04\x1a\xd1\xd8\'\x13\xef\x02a\x8ez\xf4Dl\x1f\x9a\xf8\xa7\xc6\x92qc\x1f\x1a\x90Pt\x99\x90:\xf5^\xf5+>#E...

while on a linux the same function returns this:

%PDF-1.3 3 0 obj <</Type /Page /Parent 1 0 R /Resources 2 0 R /Contents 4 0 R>> endobj 4 0 obj <</Filter /FlateDecode /Length 211>> stream xœ½KAÄ·˜êªÃD¬"„½·o÷Ý%Š"-$„--EÁNÿ}_.¢I*›ÙeÞ0?FùØH´_Í¢²{P&‰’Y_y_›ú­Ÿïèç=™-ÅY拲¾p‚ç Zœ¢Ã!Np†6GîStþo×.pî™)Žq°É\²¾;ŠO~ú'ß²ÅÁ¶ùAB ÑU]u|u¯¾0§¨²U_,¹Ê¼¬ë“üԍ¦ì‡{û]'¸Æ 3Ü@Æu‚;,±×¹‡n=³„AÇÌÕþxâ<˜...`

the outputs are of course incomplete, but you get the difference. This causes incompatibilities in the code down the line.

master0v avatar Feb 01 '22 17:02 master0v