Hi,
Take a look at the API documentation:
http://podofo.sourceforge.net/doc/html/classPoDoFo_1_1PdfVariant.html
The following code should work:
std::string str = "Hallo World!";
PdfVariant var(PdfString(str));
PdfString pdfStr = var.GetString();
cout << pdfStr.GetString()
It should work similar for all the other types like PdfName, PdfDictionary
etc.
Cheers,
Dominik
On Wed, Aug 28, 2013 at 3:31 PM, Domonic Tom <abdom...@hotmail.com> wrote:
> I'm just trying to get some basic grasp of PdfVariants. I can't seem to
> do anything with them.
> Would anyone be able to explain whether a PdfVariant can be turned into
> another Pdf Data Type or does it just support it in some elusive way.
>
> If it can hold any data type (like the VB variant type) then how is it
> initialized? It's quiet clear that .... myvar = "string"; doesn't work.
> Nor does myvar("string").
>
> I'm having trouble understanding them.. Why won't the below work? I get
> an error :
> *'request for member 'GetDataTypeString' in 'myvar', which is of
> non-class type '*
>
> *PdfVariant myvar(const PdfString &st);*
> *
> *
> *cout << myvar.GetDataTypeString();*
> *
> *
> Thanks
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Podofo-users mailing list
> Podofo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/podofo-users
>
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users