简体   繁体   English

在不使用php库的情况下如何制作pdf文件?

[英]How would I make an pdf without using an php library?

I've been looking for creating a pdf using php without using a library but when I was looking on google for this I am not being able find any information how a pdf is made within php. 我一直在寻找不使用库而使用php创建pdf的方法,但是当我在google上寻找此文件时,我找不到任何信息如何在php中制作pdf。 Now I know the simple answer is 'Look at the code of an existing library'. 现在,我知道最简单的答案是“看看现有库的代码”。 But this does not give me much detail and how/why certain lines of codes are being used and what is or what isn't bad practice. 但这并没有给我太多细节,也不提供如何/为什么使用某些代码行以及什么是或什么不是不好的做法。

I hope, any of you have some prior experience with this and can help me out. 我希望任何人都对此有一定的经验,可以帮助我。

You can learn specification (for example this https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf ) and write your own library or component. 您可以学习规范(例如, https://www.adobe.com/content/dam/acom/cn/devnet/pdf/pdfs/PDF32000_2008.pdf )并编写自己的库或组件。

Or just use simple library fpdf http://www.fpdf.org/ (this is recommended). 或仅使用简单的库fpdf http://www.fpdf.org/ (建议这样做)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM