Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » vector rendering of svg in pdf
vector rendering of svg in pdf [message #367764] Tue, 07 April 2009 08:33 Go to next message
Eclipse UserFriend
Originally posted by: piebe.de.vries.geodan.nl

hi,

Is any work being done on vector based rendering of svg in de pdf emitter?

If not, could anybody point me in the right direction of how to do it myself. I know how to get svg
into pdf using batik/itext. I had a quick look at the pdfemitter. But by the time the image data
arrives at PDFPage.drawImage(...) it is already transformed to a png image. So the svg data is not
available there. I am looking for an easy way to get the svg data available in the pdftransmitter
plugin, any hints?

greetings,
Piebe
Re: vector rendering of svg in pdf [message #367774 is a reply to message #367764] Tue, 07 April 2009 16:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Piebe,

Are you referring to charts?
Look at PageDeviceRender.drawImage
Also look at SvgFile.transSvgToArray

Jason

piebe wrote:
> hi,
>
> Is any work being done on vector based rendering of svg in de pdf emitter?
>
> If not, could anybody point me in the right direction of how to do it
> myself. I know how to get svg into pdf using batik/itext. I had a quick
> look at the pdfemitter. But by the time the image data arrives at
> PDFPage.drawImage(...) it is already transformed to a png image. So the
> svg data is not available there. I am looking for an easy way to get the
> svg data available in the pdftransmitter plugin, any hints?
>
> greetings,
> Piebe
Re: vector rendering of svg in pdf [message #367780 is a reply to message #367774] Wed, 08 April 2009 07:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: piebe.de.vries.geodan.nl

No I need to include a svg image, I do not need to render a chart (actually I assumed that the chart
would use the pdfemitter aswell to render its svg, in which case changing the emitter would solve
two things at the same time, but appearantly I was wrong there :( ) Anyway at the moment I am just
interested in an image not the chart.

Piebe


Jason Weathersby wrote:
> Piebe,
>
> Are you referring to charts?
> Look at PageDeviceRender.drawImage
> Also look at SvgFile.transSvgToArray
>
> Jason
>
> piebe wrote:
>> hi,
>>
>> Is any work being done on vector based rendering of svg in de pdf
>> emitter?
>>
>> If not, could anybody point me in the right direction of how to do it
>> myself. I know how to get svg into pdf using batik/itext. I had a
>> quick look at the pdfemitter. But by the time the image data arrives
>> at PDFPage.drawImage(...) it is already transformed to a png image. So
>> the svg data is not available there. I am looking for an easy way to
>> get the svg data available in the pdftransmitter plugin, any hints?
>>
>> greetings,
>> Piebe
Re: vector rendering of svg in pdf [message #367790 is a reply to message #367780] Wed, 08 April 2009 15:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Piebe,

Are you wanting a new report item that contains svg data instead of
normal image data? An SVG report item would be a good report item
extension.
If you are wanting to go this route take a look at:
rotated text example in the source code &
http://www.birt-exchange.com/devshare/designing-birt-reports /537-birt-extension-mechanism/


Jason


piebe wrote:
> No I need to include a svg image, I do not need to render a chart
> (actually I assumed that the chart would use the pdfemitter aswell to
> render its svg, in which case changing the emitter would solve two
> things at the same time, but appearantly I was wrong there :( ) Anyway
> at the moment I am just interested in an image not the chart.
>
> Piebe
>
>
> Jason Weathersby wrote:
>> Piebe,
>>
>> Are you referring to charts?
>> Look at PageDeviceRender.drawImage
>> Also look at SvgFile.transSvgToArray
>>
>> Jason
>>
>> piebe wrote:
>>> hi,
>>>
>>> Is any work being done on vector based rendering of svg in de pdf
>>> emitter?
>>>
>>> If not, could anybody point me in the right direction of how to do it
>>> myself. I know how to get svg into pdf using batik/itext. I had a
>>> quick look at the pdfemitter. But by the time the image data arrives
>>> at PDFPage.drawImage(...) it is already transformed to a png image.
>>> So the svg data is not available there. I am looking for an easy way
>>> to get the svg data available in the pdftransmitter plugin, any hints?
>>>
>>> greetings,
>>> Piebe
Re: vector rendering of svg in pdf [message #367812 is a reply to message #367790] Thu, 09 April 2009 09:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: piebe.de.vries.geodan.nl

No I do not want to define a new report item.

I put standard image reportitem in my report which refers to a SVG image.
When I look at the report as html, this image is displayed as a svg image and therefore drawn using
vectors.
When I look at the same report as pdf, this image is displayed as a png image and therefore drawn as
a bitmap and not using vectors. This does not look very nice, does not print very well, and it is
not a very efficient way of storage for the large pictures I want to use...

Therefore I want to change the pdf emitter so that it functions the same way as the html emitter
currently works, that is let it draw a svg image using vectors and not as a bitmap.



Jason Weathersby wrote:
> Piebe,
>
> Are you wanting a new report item that contains svg data instead of
> normal image data? An SVG report item would be a good report item
> extension.
> If you are wanting to go this route take a look at:
> rotated text example in the source code &
> http://www.birt-exchange.com/devshare/designing-birt-reports /537-birt-extension-mechanism/
>
>
>
> Jason
>
>
> piebe wrote:
>> No I need to include a svg image, I do not need to render a chart
>> (actually I assumed that the chart would use the pdfemitter aswell to
>> render its svg, in which case changing the emitter would solve two
>> things at the same time, but appearantly I was wrong there :( )
>> Anyway at the moment I am just interested in an image not the chart.
>>
>> Piebe
>>
>>
>> Jason Weathersby wrote:
>>> Piebe,
>>>
>>> Are you referring to charts?
>>> Look at PageDeviceRender.drawImage
>>> Also look at SvgFile.transSvgToArray
>>>
>>> Jason
>>>
>>> piebe wrote:
>>>> hi,
>>>>
>>>> Is any work being done on vector based rendering of svg in de pdf
>>>> emitter?
>>>>
>>>> If not, could anybody point me in the right direction of how to do
>>>> it myself. I know how to get svg into pdf using batik/itext. I had a
>>>> quick look at the pdfemitter. But by the time the image data arrives
>>>> at PDFPage.drawImage(...) it is already transformed to a png image.
>>>> So the svg data is not available there. I am looking for an easy way
>>>> to get the svg data available in the pdftransmitter plugin, any hints?
>>>>
>>>> greetings,
>>>> Piebe
Re: vector rendering of svg in pdf [message #367819 is a reply to message #367812] Thu, 09 April 2009 14:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Piebe,

Understood.
You need to look at
ImageLayout.java and SvgFile.java

ImgaeLayout.getIntrinsicDimension calls SvgFile.transSvgToArry which
converts svg to image for pdf.

Jason

piebe wrote:
> No I do not want to define a new report item.
>
> I put standard image reportitem in my report which refers to a SVG image.
> When I look at the report as html, this image is displayed as a svg
> image and therefore drawn using vectors.
> When I look at the same report as pdf, this image is displayed as a png
> image and therefore drawn as a bitmap and not using vectors. This does
> not look very nice, does not print very well, and it is not a very
> efficient way of storage for the large pictures I want to use...
>
> Therefore I want to change the pdf emitter so that it functions the same
> way as the html emitter currently works, that is let it draw a svg image
> using vectors and not as a bitmap.
>
>
>
> Jason Weathersby wrote:
>> Piebe,
>>
>> Are you wanting a new report item that contains svg data instead of
>> normal image data? An SVG report item would be a good report item
>> extension.
>> If you are wanting to go this route take a look at:
>> rotated text example in the source code &
>> http://www.birt-exchange.com/devshare/designing-birt-reports /537-birt-extension-mechanism/
>>
>>
>>
>> Jason
>>
>>
>> piebe wrote:
>>> No I need to include a svg image, I do not need to render a chart
>>> (actually I assumed that the chart would use the pdfemitter aswell to
>>> render its svg, in which case changing the emitter would solve two
>>> things at the same time, but appearantly I was wrong there :( )
>>> Anyway at the moment I am just interested in an image not the chart.
>>>
>>> Piebe
>>>
>>>
>>> Jason Weathersby wrote:
>>>> Piebe,
>>>>
>>>> Are you referring to charts?
>>>> Look at PageDeviceRender.drawImage
>>>> Also look at SvgFile.transSvgToArray
>>>>
>>>> Jason
>>>>
>>>> piebe wrote:
>>>>> hi,
>>>>>
>>>>> Is any work being done on vector based rendering of svg in de pdf
>>>>> emitter?
>>>>>
>>>>> If not, could anybody point me in the right direction of how to do
>>>>> it myself. I know how to get svg into pdf using batik/itext. I had
>>>>> a quick look at the pdfemitter. But by the time the image data
>>>>> arrives at PDFPage.drawImage(...) it is already transformed to a
>>>>> png image. So the svg data is not available there. I am looking for
>>>>> an easy way to get the svg data available in the pdftransmitter
>>>>> plugin, any hints?
>>>>>
>>>>> greetings,
>>>>> Piebe
Re: vector rendering of svg in pdf [message #762841 is a reply to message #367819] Thu, 08 December 2011 17:37 Go to previous message
Manuel Padilha is currently offline Manuel PadilhaFriend
Messages: 1
Registered: December 2011
Junior Member
Piebe,

Have you made any progress? Could you please share what you've achieved so far?
I'm also very interested in proper SVG image rendering in PDF files.

Thanks in advance
Previous Topic:ClassLoader Problem in Event Handler
Next Topic:Warnings when rendering chart to svg
Goto Forum:
  


Current Time: Tue Apr 16 21:00:00 GMT 2024

Powered by FUDForum. Page generated in 4.22157 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top