CTAN
Comprehensive TeX Archive Network

New on CTAN: ex­tract­pdf­mark

Date: Oc­to­ber 10, 2016 9:43:19 PM CEST
Masamichi Hosoda sub­mit­ted the ex­tract­pdf­mark pack­age. Ver­sion: 1.0.0 Li­cense: gpl3 Sum­mary de­scrip­tion: Ex­tract page mode and named des­ti­na­tions as PDF­mark from PDF An­nounce­ment text:
If you cre­ate a PDF doc­u­ment by some­thing like TeX sys­tems, many small PDFs as fig­ures get in­cluded into the main PDF. It is com­mon for each small PDF to use the same fonts. If the small PDFs are em­bed­ded sub­set­ted fonts, the TeX sys­tem in­cludes them as-is for the main PDF. As a re­sult, the main PDF is em­bed­ded dif­fer­ent sub­sets of the same du­pli­cate font. It is not pos­si­ble to re­move the du­pli­cates since they are dif­fer­ent sub­sets. It enor­mously in­creases the main PDF file size. On the other hand, if the small PDFs are em­bed­ded full set fonts, the TeX sys­tem also in­cludes all of them for the main PDF. The main PDF is em­bed­ded many du­pli­cate fonts, but they are all same full set fonts. There­fore, Ghostscript can re­move the du­pli­cates. It can re­duce the main PDF files size. More­over, if the small PDFs are not em­bed­ded any fonts, the TeX sys­tem out­puts the main PDF which lacks some fonts. In this case, Ghostscript can em­bed the nec­es­sary fonts. It can sig­nif­i­cantly re­duce the re­quired disk size. Either way, Ghostscript in­puts the main PDF which is out­putted by the TeX sys­tem, and out­puts the fi­nal PDF. Un­for­tu­nately, dur­ing this pro­cess, Ghostscript does not pre­serve PDF page-mode and named-des­ti­na­tions etc. As a re­sult, when you open the fi­nal PDF, it can­not re­al­ize the in­tended how the doc­u­ment shall be dis­played. Re­mote PDF links also do not work. Ex­tract PDF­mark can ex­tract page mode and named des­ti­na­tions as PDF­mark from PDF. You can get the small PDF that has pre­served them by us­ing this tool. https://github.com/trueroad/ex­tract­pdf­mark
The pack­age's Cat­a­logue en­try can be viewed at http://www.ctan.org/pkg/ex­tract­pdf­mark The pack­age's files them­selves can be in­spected at http://mir­ror.ctan.org/sup­port/ex­tract­pdf­mark/
Thanks for the up­load. For the CTAN Team Pe­tra RĂ¼be-Pugliese
We are sup­ported by the TeX users groups. Please join a users group; see http://www.tug.org/user­groups.html .

ex­tract­pdf­mark – Ex­tract page mode and named des­ti­na­tions as PDF­mark from PDF

When you cre­ate a PDF doc­u­ment us­ing a sys­tem you may in­clude many small PDF files in the main PDF file. It is com­mon for each of the small PDF files to use the same fonts.

If the small PDF files con­tain em­bed­ded font sub­sets, the sys­tem in­cludes them as-is in the main PDF. As a re­sult, sev­eral sub­sets of the same font are em­bed­ded in the main PDF. It is not pos­si­ble to re­move the du­pli­cates since they are dif­fer­ent sub­sets. This vastly in­creases the size of the main PDF file.

On the other hand, if the small PDF files con­tain em­bed­ded full font sets, the sys­tem also in­cludes all of them in the main PDF. This time, the main PDF con­tains du­pli­cates of the same full sets of fonts. There­fore, Ghostscript can re­move the du­pli­cates. This may con­sid­er­ably re­duce the main PDF-file's size.

Fi­nally, if the small PDF files con­tain some fonts that are not em­bed­ded, the sys­tem out­puts the main PDF file with some fonts miss­ing. In this case, Ghostscript can em­bed the nec­es­sary fonts. It can sig­nif­i­cantly re­duce the re­quired disk size.

Either way, when Ghostscript reads the main PDF pro­duced by the sys­tem and out­puts the fi­nal PDF it does not pre­serve PDF page-mode and named-des­ti­na­tions etc. As a re­sult, when you open the fi­nal PDF, it is not dis­played cor­rectly. Also, re­mote PDF links will not work.

This pro­gram is able to ex­tract page mode and named des­ti­na­tions as PDF­mark from PDF. By us­ing this you can get the small PDF files that have pre­served them.

Pack­ageex­tract­pdf­mark
Ver­sion1.0.2
Main­tainerMasamichi Hosoda

An­nounce­ments

more

Guest Book Sitemap Contact Contact Author