Using cfpdf
with saveoption = "linear"
or "full"
. I can't able to see any difference between using it.
If anyone knows this means, please share it here.
Thank you.
<cfoutput>
<cfdocument name="myBook" format="PDF">
<cfloop from="1" to="200" index="i">
<h1>"Gandhi"redirects here. For the third prime minister of India, see Indira Gandhi. For other uses, see Gandhi (disambiguation).
MahātmāMohandas Karamchand GandhiStudio photograph of Mohandas K. Gandhi, London, 1931.Born Mohandas Karamchand Gandhi2 October 1869Porbandar, Kathiawar Agency, British-ruled IndiaDied 30 January 1948 (aged 78)New Delhi, IndiaCause of death Assassination (gunshot)
Monuments Raj Ghat,Gandhi SmritiNationality IndianOther names Mahatma Gandhi, Bapu ji, Gandhi jiEducation Bachelor of LawsAlma mater University College London[1]Inner TempleOccupation LawyerPoliticianActivistWriterYears active 1893–1948Era British RajKnown for Indian Independence Movement,Nonviolent resistanceNotable work
</h1>
</cfloop>
</cfdocument>
</cfoutput>
<cfpdf action="write" source="myBook" destination="res.pdf" overwrite="yes" saveoption="linear">
From https://cfdocs.org/cfpdf
"For efficient access of PDF files over the web, linearize PDF documents. A linearized PDF file is structured in a way that displays the first page of the PDF file in the browser before the entire file is downloaded from the web server. As a result linear PDF documents open almost instantly."
I notice that you have tagged Lucee as well as multiple versions of Coldfusion in your question. Note that as I write this there is an open (but not verified) ticket claiming that saveoption="linear" is not functioning correctly on Lucee - https://luceeserver.atlassian.net/browse/LDEV-2537