45
Views
7
Comments
[Doc2PDF] Losing formatting after converting Doc do PDF
doc2pdf
Service icon
Forge asset by Henrique Oliveira
Application Type
Service
Service Studio Version
11.54.62 (Build 63330)

Hello,

I'm having trouble converting a Word document to PDF, since it's losing the font and text size, so the formatting is incorrect.

I also noticed that there are items missing on the project:

Is there anything I can do to prevent the PDF to change my formatting?

Thank you in advance,
Sofia Rodrigues.

2025-09-04 06-33-37
Nikhil___Vijay

Hello @Sofia Rodrigues 

Here I share a forge component for converting documents to PDF. You can also define the formatting and customize it according to your needs.

convert-word-to-pdf-o11

Thanks 

Regards 

Nikhil Kumar Vijay

UserImage.jpg
Sofia Rodrigues

Hello Nikhil,


Thank you for your response.

I already tried to use that component but I could not achieve everything I needed. It kept the font but it did not kept the formatting of the page. The words were all aligned to the left and I needed them to be justified.

Maybe I used the wrong classes, but I could not achieve what I needed.

Do you have any suggestion on which classes to use in order to keep both the font and the paragraph alignment? 

Thank you in advance,

Sofia Rodrigues.

UserImage.jpg
Huub Keulartz

Hi

I' m facing the same problem.

Is there a solution?


Regards


Huub

UserImage.jpg
Sofia Rodrigues

Hi Huub,

I did not find a solution for this component, so I had to use another on in order the format to stay the same, and ignore the font part. 

Regards,

Sofia Rodrigues.

UserImage.jpg
Huub Keulartz

Hi Sofia,

What did you use instead?

I m planning to use UltimatePDF. 

Huub

UserImage.jpg
Sofia Rodrigues

Hi Huub,

I was checking my code and actually I used Doc2Pdf.

I did this because the file keeps the original format but changes the text font and, in my case, it was more important to keep the formatting, so I ended up using Doc2PDF.

But if, in your case, it's more important to keep the font and text size, use the component recommended by Nikss - convert-word-to-pdf-o11.

I tried a lot of components, even converting to HTML and then to PDF, but I always got the same problem - it didn't keep both the font and the format.

Regards,

Sofia Rodrigues.

UserImage.jpg
Huub Keulartz

Hi Sofia

Thanks for responding.

I tried them all..;-) 

I will change the userInterface and i wil use UltimatePDF. 


Huub

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.