You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new feature has been added to quickly export cover pages. This feature only supports quick export of cover pages. This can speed up the export of cover pages for large numbers of PDFs by loading only the xref objects involved in the cover page and then saving the cover page.
cover is the cover page of the PDF. Setting fastCover can quickly export the cover page of the PDF. For example, a 200MB PDF may contain many xref objects and may require 10K seed and read file operations. If fastCover is used, only a small number of xref objects involved in the cover may be loaded, and only 50 seed and read file operations may be required. This can significantly reduce the number of data operations, speed up the export of the cover page, and save memory, because only the cover page xref object data is in the memory.
Although it works, your strategy to hack the page tree in order to keep all first kids of Pages entries is interesting.
Since this is a rather specialized usecase I want to keep this out of the codebase at this point.
The implementation also needs to be analysed thoroughly for side effects.
this is very usefull,This user case is that the client can use the pdfcpu interface to directly obtain the cover page of a PDF through the URL address of the PDF, without the server pre-generate the PDF cover page. It can obtain the cover page with minimal traffic using just the URL address.
if conf.FastCover {
coverShrinkTable(c, ctx)
}
Fast cover only keeps page 1, and does not intrude on other pages, so this feature is safe.
Activity
hhrutter commentedon Sep 7, 2025
Although it works, your strategy to hack the page tree in order to keep all first kids of
Pagesentries is interesting.Since this is a rather specialized usecase I want to keep this out of the codebase at this point.
The implementation also needs to be analysed thoroughly for side effects.
[-]fast export cover page[/-][+]Quick access to page 1[/+][-]Quick access to page 1[/-][+]feature: quick access to page 1[/+]izouxv commentedon Sep 7, 2025
this is very usefull,This user case is that the client can use the pdfcpu interface to directly obtain the cover page of a PDF through the URL address of the PDF, without the server pre-generate the PDF cover page. It can obtain the cover page with minimal traffic using just the URL address.
Fast cover only keeps page 1, and does not intrude on other pages, so this feature is safe.
hhrutter commentedon Sep 8, 2025
I don't doubt that - still a radical code change.
Let me think about that.
I keep it in the pipeline.