You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Croe.David" <cr...@inside-online.de> on 2016/08/01 10:39:13 UTC
embedded fonts an subsets
hi,
i would like to use a pdf as a template in which certain variables will be replaced.
If I create a template pdf via powerpoint or word and export it, it
only exports a pdf file with an embedded subset font.
This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
Any idea ?
best regards,
david
____________________________________________________________
[https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
Danke an unsere Kunden für die Wahl zum Anbieter des Jahres 2016!
Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
zum Anbieter des Jahres gewählt haben.
Gerne sprechen wir auch über Ihr E-Learning-Projekt!
____________________________________________________________
Re: embedded fonts an subsets
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.08.2016 um 09:03 schrieb Croe.David:
> thank you for fast reply,
>
>> This won't work due to different length / positions. PDF isn't HTML where positioning is done depending on the browser size and where you can easily insert a text into a paragraph.
> yes I know. I've to collect all Tj and TJ calculate positions and so on, of course not easy at all.
> but how to load the same font ? for example text would be rendered with font F1 .
> to load a font I need the corresponding filename. All I can extract is a font name (and family?) which doesn't have any informations which font file should be loaded again.
> How to fill the gap between font name and concrete font file names ? even if it should work on windows and unix/linux (Ubuntu) , or did i miss something?
But you told that you are creating the files yourself, so you'd know in
advance what fonts this is about. If not, then you'd need to make
yourself a table with names and os font file names.
Tilman
> best regards,
> david
>
>
>
> -----Urspr�ngliche Nachricht-----
> Von: Tilman Hausherr [mailto:THausherr@t-online.de]
> Gesendet: Dienstag, 2. August 2016 18:44
> An: users@pdfbox.apache.org
> Betreff: Re: embedded fonts an subsets
>
> Am 02.08.2016 um 12:02 schrieb Croe.David:
>> I've placed some text let's call it variables in the document
>> for example: %NAME%
>> now I want to replace %NAME% with Mr.Realname
> This won't work due to different length / positions. PDF isn't HTML where positioning is done depending on the browser size and where you can easily insert a text into a paragraph.
>
>> this doesn't work because of the missing characters in the subset font, thus i had the idea to reload the complete font
>> and use that instead.
>>> Alternatively, just append a content stream that puts what you need at a specific place.
>> the problem is, how to load the same font as used in the given text ?
> The new font would get another name, e.g. F4 instead of F3, so this
> wouldn't be a problem. A problem would be if you want to change / set a
> word into an existing paragraph.
>
>
>
> Tilman
>
>
>> best regards,
>> david
>>
>> -----Urspr�ngliche Nachricht-----
>> Von: Tilman Hausherr [mailto:THausherr@t-online.de]
>> Gesendet: Montag, 1. August 2016 18:27
>> An: users@pdfbox.apache.org
>> Betreff: Re: embedded fonts an subsets
>>
>> Am 01.08.2016 um 12:39 schrieb Croe.David:
>>> hi,
>>> i would like to use a pdf as a template in which certain variables will be replaced.
>>> If I create a template pdf via powerpoint or word and export it, it
>>> only exports a pdf file with an embedded subset font.
>>> This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
>> You'll get another problem: the codes for the characters will usually not be the ones you'd expect. I.e. it could be that a = 1, t = 2, x = 3.
>>
>> The better solution is to use acroform for that. But I don't know if word can generate acroforms.
>>
>> Alternatively, just append a content stream that puts what you need at a specific place.
>>
>> Tilman
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>>
>>
>>
>> ____________________________________________________________
>>
>> [https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
>> Danke an unsere Kunden f�r die Wahl zum Anbieter des Jahres 2016!
>> Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
>> zum Anbieter des Jahres gew�hlt haben.
>> Gerne sprechen wir auch �ber Ihr E-Learning-Projekt!
>> ____________________________________________________________
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
AW: embedded fonts an subsets
Posted by "Croe.David" <cr...@inside-online.de>.
thank you for fast reply,
> This won't work due to different length / positions. PDF isn't HTML where positioning is done depending on the browser size and where you can easily insert a text into a paragraph.
yes I know. I've to collect all Tj and TJ calculate positions and so on, of course not easy at all.
but how to load the same font ? for example text would be rendered with font F1 .
to load a font I need the corresponding filename. All I can extract is a font name (and family?) which doesn't have any informations which font file should be loaded again.
How to fill the gap between font name and concrete font file names ? even if it should work on windows and unix/linux (Ubuntu) , or did i miss something?
best regards,
david
-----Ursprüngliche Nachricht-----
Von: Tilman Hausherr [mailto:THausherr@t-online.de]
Gesendet: Dienstag, 2. August 2016 18:44
An: users@pdfbox.apache.org
Betreff: Re: embedded fonts an subsets
Am 02.08.2016 um 12:02 schrieb Croe.David:
> I've placed some text let's call it variables in the document
> for example: %NAME%
> now I want to replace %NAME% with Mr.Realname
This won't work due to different length / positions. PDF isn't HTML where positioning is done depending on the browser size and where you can easily insert a text into a paragraph.
>
> this doesn't work because of the missing characters in the subset font, thus i had the idea to reload the complete font
> and use that instead.
>> Alternatively, just append a content stream that puts what you need at a specific place.
> the problem is, how to load the same font as used in the given text ?
The new font would get another name, e.g. F4 instead of F3, so this
wouldn't be a problem. A problem would be if you want to change / set a
word into an existing paragraph.
Tilman
>
> best regards,
> david
>
> -----Ursprüngliche Nachricht-----
> Von: Tilman Hausherr [mailto:THausherr@t-online.de]
> Gesendet: Montag, 1. August 2016 18:27
> An: users@pdfbox.apache.org
> Betreff: Re: embedded fonts an subsets
>
> Am 01.08.2016 um 12:39 schrieb Croe.David:
>> hi,
>> i would like to use a pdf as a template in which certain variables will be replaced.
>> If I create a template pdf via powerpoint or word and export it, it
>> only exports a pdf file with an embedded subset font.
>> This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
> You'll get another problem: the codes for the characters will usually not be the ones you'd expect. I.e. it could be that a = 1, t = 2, x = 3.
>
> The better solution is to use acroform for that. But I don't know if word can generate acroforms.
>
> Alternatively, just append a content stream that puts what you need at a specific place.
>
> Tilman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
>
>
>
> ____________________________________________________________
>
> [https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
> Danke an unsere Kunden für die Wahl zum Anbieter des Jahres 2016!
> Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
> zum Anbieter des Jahres gewählt haben.
> Gerne sprechen wir auch über Ihr E-Learning-Projekt!
> ____________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: embedded fonts an subsets
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 02.08.2016 um 12:02 schrieb Croe.David:
> I've placed some text let's call it variables in the document
> for example: %NAME%
> now I want to replace %NAME% with Mr.Realname
This won't work due to different length / positions. PDF isn't HTML
where positioning is done depending on the browser size and where you
can easily insert a text into a paragraph.
>
> this doesn't work because of the missing characters in the subset font, thus i had the idea to reload the complete font
> and use that instead.
>> Alternatively, just append a content stream that puts what you need at a specific place.
> the problem is, how to load the same font as used in the given text ?
The new font would get another name, e.g. F4 instead of F3, so this
wouldn't be a problem. A problem would be if you want to change / set a
word into an existing paragraph.
Tilman
>
> best regards,
> david
>
> -----Urspr�ngliche Nachricht-----
> Von: Tilman Hausherr [mailto:THausherr@t-online.de]
> Gesendet: Montag, 1. August 2016 18:27
> An: users@pdfbox.apache.org
> Betreff: Re: embedded fonts an subsets
>
> Am 01.08.2016 um 12:39 schrieb Croe.David:
>> hi,
>> i would like to use a pdf as a template in which certain variables will be replaced.
>> If I create a template pdf via powerpoint or word and export it, it
>> only exports a pdf file with an embedded subset font.
>> This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
> You'll get another problem: the codes for the characters will usually not be the ones you'd expect. I.e. it could be that a = 1, t = 2, x = 3.
>
> The better solution is to use acroform for that. But I don't know if word can generate acroforms.
>
> Alternatively, just append a content stream that puts what you need at a specific place.
>
> Tilman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
>
>
>
> ____________________________________________________________
>
> [https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
> Danke an unsere Kunden f�r die Wahl zum Anbieter des Jahres 2016!
> Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
> zum Anbieter des Jahres gew�hlt haben.
> Gerne sprechen wir auch �ber Ihr E-Learning-Projekt!
> ____________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
AW: embedded fonts an subsets
Posted by "Croe.David" <cr...@inside-online.de>.
I've placed some text let's call it variables in the document
for example: %NAME%
now I want to replace %NAME% with Mr.Realname
this doesn't work because of the missing characters in the subset font, thus i had the idea to reload the complete font
and use that instead.
>Alternatively, just append a content stream that puts what you need at a specific place.
the problem is, how to load the same font as used in the given text ?
best regards,
david
-----Ursprüngliche Nachricht-----
Von: Tilman Hausherr [mailto:THausherr@t-online.de]
Gesendet: Montag, 1. August 2016 18:27
An: users@pdfbox.apache.org
Betreff: Re: embedded fonts an subsets
Am 01.08.2016 um 12:39 schrieb Croe.David:
> hi,
> i would like to use a pdf as a template in which certain variables will be replaced.
> If I create a template pdf via powerpoint or word and export it, it
> only exports a pdf file with an embedded subset font.
> This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
You'll get another problem: the codes for the characters will usually not be the ones you'd expect. I.e. it could be that a = 1, t = 2, x = 3.
The better solution is to use acroform for that. But I don't know if word can generate acroforms.
Alternatively, just append a content stream that puts what you need at a specific place.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
____________________________________________________________
[https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
Danke an unsere Kunden für die Wahl zum Anbieter des Jahres 2016!
Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
zum Anbieter des Jahres gewählt haben.
Gerne sprechen wir auch über Ihr E-Learning-Projekt!
____________________________________________________________
Re: embedded fonts an subsets
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 01.08.2016 um 12:39 schrieb Croe.David:
> hi,
> i would like to use a pdf as a template in which certain variables will be replaced.
> If I create a template pdf via powerpoint or word and export it, it
> only exports a pdf file with an embedded subset font.
> This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
You'll get another problem: the codes for the characters will usually
not be the ones you'd expect. I.e. it could be that a = 1, t = 2, x = 3.
The better solution is to use acroform for that. But I don't know if
word can generate acroforms.
Alternatively, just append a content stream that puts what you need at a
specific place.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: embedded fonts an subsets
Posted by John Hewson <jo...@jahewson.com>.
> On 1 Aug 2016, at 03:39, Croe.David <cr...@inside-online.de> wrote:
>
> hi,
> i would like to use a pdf as a template in which certain variables will be replaced.
> If I create a template pdf via powerpoint or word and export it, it
> only exports a pdf file with an embedded subset font.
> This subset seems to contain only the characters already in the document and not all characters. How to fix that ? is it possible to reload the font and embed it fully , but how to know which font name correlates to which font file ? In ms office there seems to be no option to force to embed full fonts.
There’s a setting in MS Word called "Embed only the characters used in the document”, which is used to enable subsetting of fonts. I assume it’s turned on for you. Here’s a guide which mentions in (see page 2):
http://www.sheridan.com/sites/default/files/generating_pdf_from_ms_word_041713.pdf
— John
> Any idea ?
>
> best regards,
> david
>
>
>
> ____________________________________________________________
>
> [https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
> Danke an unsere Kunden für die Wahl zum Anbieter des Jahres 2016!
> Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
> zum Anbieter des Jahres gewählt haben.
> Gerne sprechen wir auch über Ihr E-Learning-Projekt!
> ____________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org