We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SVGToPDF conversion Embedded style issue(font-family & font- size)

Thread ID:

Created:

Updated:

Platform:

Replies:

150040 Dec 18,2019 02:15 PM UTC Dec 20,2019 09:45 AM UTC ASP.NET Web Forms 3
loading
Tags: PDF
Milan
Asked On December 18, 2019 02:15 PM UTC

Hello,

PFA,
I am facing issue with svg to Pdf conversion. The converted PDF missing dimension, font-Family & Font Size that is embadded  in SVG file.

Your help in this regards is highly appreciated...!

Thanks,
Milan

Attachment: sampleSho_c305e232.zip

Prakash Viswanathan [Syncfusion]
Replied On December 19, 2019 07:39 AM UTC

Hi Milan, 

Thank you for contacting Syncfusion support.  

We have converted the provided SVG file to PDF using WebKit rendering engine and it is converted properly. The output PDF document is preserver as like the input SVG file view in browser. We have attached the documents for your reference, please find the documents from below link, 

If you need to adjust the content size (image,  text, etc.,) in the PDF document, then we can use the WebKitViewPort property in WebKitConverterSettings. Please refer below links for more information about WebKitViewPort.  

If it is not your requirement, kindly provide more details about the issue and requirement. So, that it will be helpful for us to analyze and assist you further on this.  

Regards, 
Prakash V 


Milan
Replied On December 19, 2019 10:43 AM UTC

Hey Prakash,

Thanks for your response. I have checked the PDF files you have sent, still file dimension is changed in PDFs. Let me provide you more clear overview about my requirement. 

  1. Output PDF dimension(not inner content) should be same as SVG dimension.
  2. Fonts looks embedded in the PDF file when open in Acrobat or in the Browser, but when I open it in Illustrator or any PDF editor it shows font missing error. Below i am attaching PDF screenshot open in Illustrator with . 
  3. Because of font did not get embedded in PDF it doesn't remain editable and shows error "Font is missing".
  4. I require an option to convert "Text as path"(non editable text without any font missing error) or keep text editable. 

I am attaching expected output PDF file which is generated by some other tool.  

Thanks
    

Attachment: Sample_fc0bf0a3.zip

Prakash Viswanathan [Syncfusion]
Replied On December 20, 2019 09:45 AM UTC

  
Hi Milan, 

Thank you for your update. 

Queries 
Response 
Output PDF dimension(not inner content) should be same as SVG dimension. 
HTML converter do not have native support for this requirement. However, we can achieve this in sample level by getting the size from SVG and set it to the PDF page size.  Please find the sample and output PDF document from below link, 

 
Fonts looks embedded in the PDF file when open in Acrobat or in the Browser, but when I open it in Illustrator or any PDF editor it shows font missing error. Below i am attaching PDF screenshot open in Illustrator with .  

Because of font did not get embedded in PDF it doesn't remain editable and shows error "Font is missing". 
Yes, the fonts are embedded in the PDF document, we have tried editing the PDF document in the acrobat editor. But we did not face any font missing error.  

We suspect that the error may occurs due to some other reasons, kindly check and resolve this. Please refer below link, 
I require an option to convert "Text as path"(non editable text without any font missing error) or keep text editable. 
Currently, HTML converter do not have direct support for switch the rendering of text as path. We internally make use of QtWebKit rendering engine for converting HTML to PDF. QtWebKit rendering engine itself, generates PDF document with text. Currently there is no option to render the text as path in WebKit rendering engine itself.  
 
However, as a workaround you can convert the HTML/SVG to Image and render the image to PDF document. Please refer below link for converting HTML/SVG to Image and render the image to PDF document.  
 
 

Please let us know if you need any further assistance on this.  

Regards, 
Prakash V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon