Is relative css possible with Aspose when converting pdf to html?

Hi,

I have a situation where pdfs needs to be translated to different languages. The process is to first convert it into html and the pass the html as input to translator API. Translator returns the translated html with original html tags intact. Now if the translated text isn’t of the same size of text in original language then overlapping happens and the readability is affected. So want to know if relative styling possible with Aspose. Attaching picture of position styling generated by Aspose.

Regards,
Amit

Hi Amit,


Thanks for using our API’s.

I will appreciate if you share your sample project along with input/output files. It will help us to understand your requirement exactly and address it accordingly.

Best Regards,
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}

Hi Fahad,

Attaching below documents:

1. Original pdf(in Japanese) which needs to be translated into English and hence first needs to be converted to html format(Japanese.pdf).

2. Html format conversion by Aspose which is fed into Google Translator API(Japanese_Aspose.html -> its zipped into Japanese_Aspose.zip).

3. Translated html returned by Google Translator(Japanese_Aspose_GOOGLE_Translated.html).

You can see how unusable the document becomes in terms of readability when the its finally translated by Google and this is because all the styling in Aspose generated html is absolute.

In addition to above query, requesting you to kindly assist me on :

1. How can I extend the trial period as the evaluation which I am doing on behalf of my company is still not complete?

You can directly call me(sent my number as a reply to automated email I received) so that we can discuss the scenario in detail and sort out this asap.

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Attached docs. Was not allowed to upload html file so renamed it as .txt.

Hi Amit,


Thanks for sharing further details.

I have tested the scenario and have managed to reproduce the same issue. I have logged an enhancement ticket PDFNET-42278 in our issue tracking system to provide support of relative css when converting pdf to html. We will update you on status through this thread once your issue is resolved. Please have patience and spare us a little time.

How can I extend the trial period as the evaluation which I am doing on behalf of my company is still not complete?

I have created a separate thread in Aspose.Purchase forum on your behalf for this. One of my colleague from Aspose.Purchases team will respond you there.

We are sorry for the inconvenience.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}
Best Regards,

Till the enhancement is done and somebody responds me will I be able to continue evaluation and testing of my usecase as trial period is going to expire? Can it be extended till enhancement is completed?
Can you provide me link to my query thread in Aspose.Purchase forum.

Thanks.

Hi Amit,


You should have received email for new thread. Below is the link for thread

<a rel=“nofollow” href="

Best Regards,

Hi Team

I generate Pdf to html with list of option :

HtmlSaveOptions options = new HtmlSaveOptions
{
FontSavingMode = HtmlSaveOptions.FontSavingModes.AlwaysSaveAsTTF,
FontEncodingStrategy = HtmlSaveOptions.FontEncodingRules.DecreaseToUnicodePriorityLevel,
PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedCssOnly,
TryMergeAdjacentSameBackgroundImages = false,
RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsPngImagesEmbeddedIntoSvg,
LettersPositioningMethod = HtmlSaveOptions.LettersPositioningMethods.UsePixelUnitsInCssLetterSpacingForIE,

            }; 

After generate html i m facing lot of issue as :

  1. The order of html div is not correct sequences.
  2. The div using absolute position which facing browser search issue of multiple word in multiple lines.

Can you please provide solution as above comment do help us lot.

Note : We raise 4 ticket include this on different issue as still not get any solution .
Thank You

image.png (57.8 KB)

@uk_itprocurement_tcs_com

We apologize for the inconvenience which has been faced.

Would you please share your sample PDF document with us so that we can test the scenario in our environment and address it accordingly.

Hi Team

can you test on any pdf it will reflect over there.
ParaWrap3.pdf (27.6 KB)

@uk_itprocurement_tcs_com

We have logged an issue as PDFNET-46972 in our issue tracking system after testing the scenario with Aspose.PDF for .NET 19.9. We will surely look into details of it and keep you informed with the status of its correction. Please be patient and spare us little time.

Would you kindly share the IDs of those tickets here. We will log your concerns with them and review them.

We are sorry for the inconvenience.