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. Image for the cookie policy date

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

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

3 Replies

PV Prakash Viswanathan Syncfusion Team 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 



MI Milan 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


PV Prakash Viswanathan Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon