You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by ☼ R Nair <ra...@gmail.com> on 2018/10/10 15:30:07 UTC

getBytes : save as pdf

All,

I am reading a zipped file into an RdD and getting the rdd._1as the name
and rdd._2.getBytes() as the content. How can I save the latter as a PDF?
In fact the zipped file is a set of PDFs. I tried saveAsObjectFile and
saveAsTextFile, but cannot read back the PDF. Any clue please?

Best, Ravion

Re: getBytes : save as pdf

Posted by Joel D <ga...@gmail.com>.
I haven’t tried this but maybe you can try using some pdf library to write
the binary contents as pdf.

On Wed, Oct 10, 2018 at 11:30 AM ☼ R Nair <ra...@gmail.com>
wrote:

> All,
>
> I am reading a zipped file into an RdD and getting the rdd._1as the name
> and rdd._2.getBytes() as the content. How can I save the latter as a PDF?
> In fact the zipped file is a set of PDFs. I tried saveAsObjectFile and
> saveAsTextFile, but cannot read back the PDF. Any clue please?
>
> Best, Ravion
>