PDF SaveAsTIFF Not working


#1

I have a PDF file that works fine in reader, I can send it as an email attachment, save it to disk reads fine. When I try to save it as TIFF it bombs.

Error: Object reference not set to an instance of an object.

Stacktrace:
at #=zwDke0qLP6_TZqOtxwhERJTp6UcTa6x9rSg==.#=zz0_DJQs=()
at #=zwDke0qLP6_TZqOtxwhERJTp6UcTa6x9rSg==.#=zVSPGEZAq5Fo8(Int32 #=z0zdEIRA9EUxI, Int32& #=zkeAgoKLQjNud)
at #=zwDke0qLP6_TZqOtxwhERJTp6UcTa6x9rSg==.#=zu_woWKA=(Int32 #=z0zdEIRA9EUxI)
at Aspose.Pdf.PageCollection.#=z8ptdGYBwmJRgbl0quYl63gs=(Int32 #=zUuFS314=)
at Aspose.Pdf.PageCollection.#=zG3HHHx0=(Int32 #=zUuFS314=)
at Aspose.Pdf.Devices.TiffDevice.Process(Document document, Int32 fromPage, Int32 toPage, Stream output)
at Aspose.Pdf.Facades.PdfConverter.SaveAsTIFF(Stream outputStream, PageSize pageSize, TiffSettings settings)
at Aspose.Pdf.Facades.PdfConverter.SaveAsTIFF(String outputFile, PageSize pageSize, TiffSettings settings)
at RmolTest.Program.PDFtoTIFList(String rmolid, String inPDF, Dictionary`2 Settings) in C:\Users\U332309\Desktop\2dsr_Apps\RmolTest\Program.cs:line 144


#2

Here is the file

RM06392042.pdf (1.6 KB)


#3

Here is the code used:

public static bool PDFtoTIFList(string rmolid, string inPDF, Dictionary<string, string> Settings) {
  int fid = 0;
  var retData = new List<string>();
  Aspose.Imaging.Cache.CacheType = CacheType.CacheOnDiskOnly;
  Aspose.Imaging.Cache.CacheFolder = Settings["RMOLTemp"];
  try {
    var outTIF = string.Format("{0}{1}_{2:D2}.tif", Settings["RMOLTemp"], rmolid, ++fid);
    using (Aspose.Pdf.Facades.PdfConverter pdfC = new Aspose.Pdf.Facades.PdfConverter()) {
      Resolution res = new Resolution(300, 300);
      pdfC.Resolution = res;
      pdfC.BindPdf(inPDF);
      TiffSettings ts = new TiffSettings();
      ts.Depth = ColorDepth.Format1bpp;
      ts.Compression = CompressionType.CCITT4;
      pdfC.SaveAsTIFF(outTIF, Aspose.Pdf.PageSize.A4, ts);
      //pdfC.SaveAsTIFF(outTIF);
    }
  } catch (Exception ex) {
    ex = ex;
  }
  return true;
}

}
}


#4

@Taylor.Mcdonald2

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-46507 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.


#5

Any response yet??

Thanks


#6

@Taylor.Mcdonald2

Please note that the issue has been logged under free support model and will be investigated on first come first serve basis. Therefore, it may take some months to resolve. As soon as we have some definite updates or ETA regarding ticket resolution, we will let you know.

Moreover, we also offer Paid Support, where issues are used to be investigated with higher priority. Our customers, who have paid support subscription, report their issue there which are meant to be investigated urgently. In case your reported issue is a blocker, you may please consider subscribing for Paid Support. For further information, please visit Paid Support FAQs.


#7

Hello,

My supervisor asked me to clarify. When you pay the yearly subscription is there no “Paid Support” included? We have had 2 issues in the 3 years we have been using and both issues turned out to be real issues that only helps Aspose to fix.

Thanks,
Taylor


#8

@Taylor.Mcdonald2

Please note that yearly subscription allows upgrades up to 12 months from your purchase data while Paid Support needs to be subscribed separately. For further details about your order, you may contact our sales team over Purchase Forum while sharing your 12 digit order ID.