5 Replies - 1906 Views - Last Post: 14 August 2019 - 06:58 PM Rate Topic: -----

#1 KC10513   User is online

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 13-October 17

PDF document error

Posted 08 August 2019 - 03:20 AM

Hi All,

 byte[] data = PDF Contents....
 string path = "myPath";
 File.WriteAllBytes(path + ".pdf", data);



After successfully creating my pdf file,when i try to open it i get "Cannot extract the embedded font 'GZGACV+TimesNewRomanPSMT'. Some characters may not display or print correctly." and any image on the document appear sort of blurry

Can someone please help me with this.


Thanks in advance.

Attached image(s)

  • Attached Image

Attached File(s)

  • Attached File  Word.pdf (239.64K)
    Number of downloads: 7

This post has been edited by KC10513: 08 August 2019 - 03:22 AM


Is This A Good Question/Topic? 0
  • +

Replies To: PDF document error

#2 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7057
  • View blog
  • Posts: 24,004
  • Joined: 05-May 12

Re: PDF document error

Posted 08 August 2019 - 03:51 AM

The issue is not in the pseudo code you presented above for writing out the file. The issue is in the generation of the PDF contents that you are putting into the file. You need to show us how you are generating those bytes.
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6818
  • View blog
  • Posts: 28,231
  • Joined: 12-December 12

Re: PDF document error

Posted 08 August 2019 - 03:54 AM

Are you able to open the file with a different reader?
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7057
  • View blog
  • Posts: 24,004
  • Joined: 05-May 12

Re: PDF document error

Posted 08 August 2019 - 05:26 AM

Opening with Chrome, Opera, and Edge seem to work without complains. Acrobat complains like in the screenshot above. I've uninstalled FoxIt about a year ago when they started becoming bloatware -- I figured that if I was going to have bloatware, I might as well use Adobe Acrobat.
Was This Post Helpful? 0
  • +
  • -

#5 KC10513   User is online

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 13-October 17

Re: PDF document error

Posted 12 August 2019 - 11:28 PM

@Skydiver, the bytes received are printed document coming from an iPAD then i generate a .pdf file that i will then send to the physical printer, which is a bit complex to explain the whole process taken to receive the bytes.
@Andrewsw opening with Chrome and Edge doesn't seem to be giving the error on the screenshot. but my suspicion is that, i might be losing some data when receiving the document to print. So i'm looking at that and will update you if i find the reasons behind this behavior.
Thank you guys.
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7057
  • View blog
  • Posts: 24,004
  • Joined: 05-May 12

Re: PDF document error

Posted 14 August 2019 - 06:58 PM

So it is your PDF generation which is sticking in that embedded font. Fix that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1