Convert PDF to TIFF after XFA to Acroform conversion with highlight annotation using Aspose.PDF

Hi!

I’m trying to render a PDF document to Tiff. When the PDF has
any kind of highlight annotation like text,drop downs, the text behind it is blanked in Tiff doc. Is there anything I can do to correct this?

Thanks!

Hi Mahesh,


Thanks for contacting support.

Can you please share the resource PDF file so that we can test the conversion at our end. We are sorry for this inconvenience.

Hi
Nayyer Shahbaz

PDF path : convertFromFile (source)
tiff file path : convertToFile (dest)

Private Function ConvertPdfToTif(ByVal convertFromFile As String, ByVal convertToFile As String) As Boolean
Dim license As New Aspose.Pdf.License()
license.SetLicense(“Aspose.Total.lic”)
Dim pc As New Aspose.Pdf.Facades.PdfConverter()

pc.Resolution = New Aspose.Pdf.Devices.Resolution(300)
Dim tiffDevice As New Aspose.Pdf.Devices.TiffDevice()
pc.ShowHiddenAreas = True
pc.BindPdf(convertFromFile)
pc.DoConvert()

pc.SaveAsTIFF(convertToFile, CompressionType.CCITT4)

Return True
End Function

Hi Mahesh,


Thanks for sharing the resource file.

I have tested the scenario and have observed that input PDF is an XFA form and in order to convert such files to TIFF/Image format, first we need to convert them to Standard Acro form. But I am afraid during my testing, I have observed that Annotations are missing in resultant TIFF even the form is first converted to Standard format. For the sake of correction, I
have logged it in our issue tracking system as PDFNEWNET-37632. We will investigate this
issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.


[VB.NET]

' load PDF form

Dim document As Document = New Document("c:/pdftest/Test (2).pdf")

' change form type from XFA to Standard Acro form

document.Form.Type = InteractiveFeatures.Forms.FormType.Standard

' create Stream instance

Dim stream As MemoryStream = New MemoryStream()

' save standard form in stream object

document.Save(stream)

Dim pc As New Aspose.Pdf.Facades.PdfConverter()

pc.Resolution = New Aspose.Pdf.Devices.Resolution(300)

pc.ShowHiddenAreas = True

' load standard acro from savedin stream

pc.BindPdf(stream)

pc.DoConvert()

pc.SaveAsTIFF("c:/pdftest/Test (2).tiff", CompressionType.CCITT4)

' close stream object

stream.Close()

hello Nayyer Shahbaz,

i don’t see any effect out put TIFF. here i attached the .zip

Hi Mahesh,


Thanks for your acknowledgement. As shared in my earlier post, I have also managed to reproduce the problem that Annotations are missing in resultant TIFF even the form is first converted to Standard format. For the sake of correction, its been logged it in our issue tracking system as PDFNEWNET-37632. As soon as the problem is resolved, we will update you within this forum thread.

Please be patient and wait for the resolution.

Hi Nayyer Shahbaz,

Do you have any update…

Hi Mahesh,


<span style=“font-size:10.0pt;font-family:“Verdana”,“sans-serif”;
color:#333333”>As we recently have been able to notice this issue, and until or
unless we have investigated and have figured out the actual reasons of this
problem, we might not be able to share any timelines by which this problem will
be resolved.<o:p></o:p>

However, as soon as we have made some significant progress towards the resolution of this issue, we would be more than happy to update you with the status of correction. Please be patient and spare us little time. Your patience and comprehension is greatly appreciated in this regard.

Hi Nayyer,

Let me know the progress about this ticket,this is on the very IMP and high priority.I hope you will finish it very soon.


Hi Mahesh,


Thanks for your inquiry. I am afraid your reported issue is not investigated yet as our development team is working over other priority tasks. We schedule issue investigation and resolution on first come first serve basis. However, we have recorded your concern and will update you ETA/findings as soon as our development team completes the issue investigation.

Thanks for your patience and cooperation.

Best Regards,

Hi All,

Please give the priority to this issue and provide the ETA to me ASAP.
Thanks for your response to my replay.

Thanks
Mahesh

Hi Mahesh,


The development team
has been busy resolving other priority issues and I am afraid the earlier
reported problem is not yet resolved. Furthermore, please note that you have reported issue under normal/free support
forum and as a normal rule of practice, issues are resolved in first come
and first serve basis; but the problems logged/reported under Enterprise or
Priority support model, have high precedence in terms of resolution, as compare
to issues under normal/free support model.
<o:p></o:p>

In case you need to have your issue prioritized, you may consider opting for Enterprise or Priority support options. Nonetheless, note that ES/PS support does not guarantee any immediate resolution of issues (because it might be dependent on other issues or feature which needs to be implemented) but under this model, the development team starts investigating the problem on high priority. For further details, please visit Support Options.

We are sorry for this delay
and inconvenience.

Hi Mahesh,


Thanks for your patience.

The development team has further investigated the issue reported earlier as PDFNEWNET-37632 and as per our current estimates, we plan to get this problem fixed in Aspose.Pdf for .NET 10.1.0 which is planned to release in February-2015. We will try our level best to get the problem fixed by said time.

Your patience and comprehension is greatly appreciated in this regard.

Hi Mahesh,


Thanks for your patience.

The development team has further investigated the issue PDFNEWNET-37632 and due to complexity of this issue, I am afraid it cannot be resolved in next release of Aspose.Pdf for .NET 10.1.0. However the new ETA is 10.3.0 release which is planned for April-2015.

Your patience and comprehension is greatly appreciated in this regard.

The issues you have found earlier (filed as PDFNEWNET-37632) have been fixed in Aspose.Pdf for .NET 11.3.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Mahesh,


Thanks for your patience.

During the investigation of earlier reported issue, we have found that

  1. If field does not have Appearance dictionary (“AP” entry), field value is missing in resultant file.
  2. Fields which have “DV” entry (Default Value) is missing (because default value does not have appropriate appearance).

Please execute following code snippet before conversion is started.

[C#]

private void ProcessField(Field field)<o:p></o:p>

{

if (field.Count > 0)

{

foreach (Field subfield in field)

ProcessField(subfield);

}

else

{

if (field.Value == null)

{

if (field.EngineDict.HasKey("DV"))

{

field.Value = field.EngineDict["DV"].ToPdfString().ExtractedString;

}

}

}

}

foreach (Field subField in doc.Form)

{

ProcessField(subField);

}


If we fill the field value with Default Value from field dictionary, then values become visible.

<o:p>We need to update conversion process accordingly. </o:p>

Also please note that UpdateAppearanceOnConvert property is used to correctly update field appearance. This will make conversion correct.

[C#]

Document document = new Document(“37632.pdf”);<o:p></o:p>

document.Form.Type
=
FormType.Standard;<o:p></o:p>

MemoryStream stream = new MemoryStream();<o:p></o:p>

TiffDevice
tiffdevice =
new TiffDevice();<o:p></o:p>

document.Save(stream);<o:p></o:p>

Annotation.UpdateAppearanceOnConvert
=
true;<o:p></o:p>

tiffdevice.Process(document, "37632.tiff");