2016-11-28 23:34 GMT+01:00 Pantxo Diribarne <pantxo.diriba...@gmail.com>:

>
>
> 2016-11-28 15:47 GMT+01:00 Pantxo Diribarne <pantxo.diriba...@gmail.com>:
>
>> Hi,
>>
>> I have pdf documents which are generated using gl2ps [1], on which I
>> would like to superimpose text.
>>
>> As a first test, I used the provided example helloworld.cpp, which I
>> modified as follows:
>> * use a PdfMemDocument (instead of a PdfDocument) and load an existing
>> pdf file.
>> * use the Write method to export the modified pdf
>>
>> As a result I get a pdf that has been modified (at least its size on the
>> disk is larger) and can be loaded, but the "hello world!" is no where to be
>> found.
>>
>> What am I doing wrong? I played with the position arguments in DrawText
>> to no avail.
>>
>> Thanks in advance,
>>
>> Pantxo
>>
>
> Now I see that when the original pdf already contains text, the simple
> approach described above works (incidentally?), the Hello World appears and
> the right font is selected (different from the one in the original file).
>
> Are there some more examples around to get started?
>
> Pantxo
>
Ok I finally found what was wrong: the current color of the document
(wherever the text was iserted) was white. I just had to use
Painter::SetColor and the newly added text appeared.

Pantxo
------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to