We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conversion PDF Problem on revision inside a table

Hello,



I am using aspose-words-16.3.0.

I have some revisions in my input .doc file.

I want to convert this file into a .pdf file with the revision bar.



Here the code :



Document asposeDoc = new Document(docFile);



if (asposeDoc.hasRevisions())

{

try

{

RevisionOptions lRevisionOptions = asposeDoc.getLayoutOptions().getRevisionOptions();

lRevisionOptions.setShowRevisionMarks( false );

lRevisionOptions.setShowRevisionBars( true );

lRevisionOptions.setRevisionBarsColor(1);

} catch (Exception ex) {

logger.log(Level.SEVERE,“Exception acceptAllRevisions”,ex);

} finally

{

}

}



PdfSaveOptions asposePdfSaveOptions = new PdfSaveOptions();

asposePdfSaveOptions.setCompliance(PdfCompliance.PDF_15);

asposePdfSaveOptions.setTextCompression(PdfTextCompression.FLATE);

asposePdfSaveOptions.setJpegQuality(100);

asposePdfSaveOptions.setImageCompression(PdfImageCompression.AUTO);

asposePdfSaveOptions.setUseHighQualityRendering(true);

asposePdfSaveOptions.setUseAntiAliasing(false);

asposePdfSaveOptions.setImageColorSpaceExportMode(PdfImageColorSpaceExportMode.AUTO);

asposePdfSaveOptions.setEmbedFullFonts(false);

asposePdfSaveOptions.setCustomPropertiesExport(PdfCustomPropertiesExport.METADATA);



String pdfFileTemp=pdfFile+".pdf";

asposeDoc.save(pdfFileTemp,asposePdfSaveOptions);







The problem is :

In the table Page 3, the first line “Connecter et initialiser la chaîne JTAG” is different between the input document (Pb_revision_table_for ASPOSE.doc) and the output pdf (Pb_revision_table_for ASPOSE.pdf).

A big part of the text in the second column is troncated.



The problem appears only in one table. revisions in table page 1 are well converted.







If I add the following line in my source code :



asposeDoc.acceptAllRevisions();



the problem is fixed but we lost the revision bar in the output pdf file.



First question, Is that possible to accept all revisions and display the revision bar ?



If not, can you please help me to fix this problem ?



Thanks,



Regards,



Simon

Hi Simon,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15028.

Document.AcceptAllRevisions method accepts all tracked changes in the document. So, revision bars will not be rendered after accepting revisions. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Hello,

Do you have an idea about the resolution date of this issue ?

Thanks,

Regards,

Simon

Hi Simon,

Thanks for your inquiry. We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. Our developers work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is pending for analysis and is in the queue. Once our product team completes the analysis of your issue, we will then be able to provide you an estimate.

Thanks for your patience and understanding.

Hello,
Is it possible to move this post to “Public” instead of “private” ?
Thanks,
Regards,
Simon

Hi Simon,

Thanks for your inquiry.

We have made this forum thread as public. Please let us know if you have any more queries.

@sgrimal,

The issues you have found earlier (filed as WORDSNET-15028) have been fixed in this Aspose.Words for .NET 17.8 update and this Aspose.Words for Java 17.8 update.

Hello,

Regarding issue WORDSNET-15028, here is our feedback after some unit tests :

  •      Main issue regarding table rendering in PDF file after Doc2 PDF conversion seems to be OK : no more data loss, track changes ok.
    
  •      But a specific issue appears when a table is deleted in word, it is translated as an empty table in the PDF file, instead of not appearing at all (please find attached LA_8M0_word and LA_8M0_pdf screenshots for your reference).
    

I join also the .doc file and the converted pdf.

Could you please analysis the issue raised above?

Thanks a lot,
Regards

Simon

LA_8M0_ASPOSE.zip (544.4 KB)

@sgrimal,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 17.8 with following code example and have not found the shared issue. We have attached the output PDF with this post for your kind reference. Please use Aspose.Words for .NET 17.8.
17.8.pdf (233.4 KB)

Document asposeDoc = new Document(MyDir + "LA_8M0_for_ASPOSE.doc");

if (asposeDoc.HasRevisions)
{
    RevisionOptions lRevisionOptions = asposeDoc.LayoutOptions.RevisionOptions;
    lRevisionOptions.ShowRevisionMarks = true;
    lRevisionOptions.ShowRevisionBars = true;
    lRevisionOptions.RevisionBarsColor = RevisionColor.Black;
}

PdfSaveOptions asposePdfSaveOptions = new PdfSaveOptions();
asposePdfSaveOptions.Compliance = PdfCompliance.Pdf15;
asposePdfSaveOptions.TextCompression = PdfTextCompression.Flate;
asposePdfSaveOptions.JpegQuality = 100;
asposePdfSaveOptions.ImageCompression = PdfImageCompression.Auto;
asposePdfSaveOptions.UseHighQualityRendering = true;
asposePdfSaveOptions.UseAntiAliasing = false;
asposePdfSaveOptions.ImageColorSpaceExportMode = PdfImageColorSpaceExportMode.Auto;
asposePdfSaveOptions.EmbedFullFonts = false;
asposePdfSaveOptions.CustomPropertiesExport = PdfCustomPropertiesExport.Metadata;

asposeDoc.Save(MyDir + "17.8.pdf", asposePdfSaveOptions);

Hello,
Thanks for your feedback.
OK, the table is not empty but we don’t want to display revisions marks. We have to dispaly only the revisionBar.
We are using exactly the same code except for “lRevisionOptions.ShowRevisionMarks”. We are setting this option to false.
Can you please try to reproduce the problem with this option ?
Thanks,
Regards,
Simon GRIMAL

@sgrimal,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15850. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@sgrimal,

Further to my previous post, please use following workaround of this issue. Hope this helps you.

if (asposeDoc.HasRevisions)
{
    RevisionOptions lRevisionOptions = asposeDoc.LayoutOptions.RevisionOptions;
    lRevisionOptions.ShowRevisionBars = true;
    lRevisionOptions.RevisionBarsColor = RevisionColor.Black;

    lRevisionOptions.DeletedTextColor = RevisionColor.Black;
    lRevisionOptions.DeletedTextEffect = RevisionTextEffect.None;

    lRevisionOptions.InsertedTextColor = RevisionColor.Black;
    lRevisionOptions.InsertedTextEffect = RevisionTextEffect.None;
}

Thanks for your workaround but the deleted table must not appear in the PDF result file.
I will follow WORDSNET-15850 resolution.

Regards,

Simon

@sgrimal,

You will be notified via this forum thread once this issue is resolved. Please let us know if you have any more queries.

@sgrimal,

The issues you have found earlier (filed as WORDSNET-15850) have been fixed in this Aspose.Words for .NET 17.10 update and this Aspose.Words for Java 17.10 update.

Thanks a lot, it works !
Regards,
Simon