Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
251 views
in Technique[技术] by (71.8m points)

python - reportlab in django, return a string instead of a pdf

I am working in an application in which I need to create pdf file from response which I am getting from server. I am using reportlab with django 1.8 and the response looks like this:

%PDF-1.3

%???? ReportLab Generated PDF document http://www.reportlab.com

1 0 obj

<< /F1 2 0 R >>

endobj

2 0 obj

<< /BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font >>

endobj

3 0 obj

<< /BitsPerComponent 8 /ColorSpace /DeviceRGB /Filter [ /ASCII85Decode /DCTDecode ] /Height 1250 /Length 1206832 /Subtype /Image 

  /Type /XObject /Width 1667 >>

stream

[...]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...