0

I need to convert a PDF file using GHOSTSCRIPT and make it compatible to ISSUU.com

My pdf came from PHP-FPDI output. When I upload it to ISSUU some text/fonts become broken and not visible.

Need to do everything with PHP.

  1. The pdf is an exisiting PDF. PDF v1.7. When I upload this to ISSUU everything works fine.
  2. I needed to put margin on the exisiting PDF so I used FPDF and FPDI to put a margin.

    $pdf = new FPDI;
    $pdf->AddPage();
    $pdf->SetMargins(10,10,10);
    $pdf->setSourceFile($temp_dir . "/get_" . $row['idml_pages_id'] . ".pdf");  
    $tplIdx = $pdf->importPage(1);
    $pdf->useTemplate($tplIdx, 5, 5, 200, 285, true);  
    $pdf->SetFont('Arial','B',16);
    $pdf->Output($temp_dir . '/bord_' . $row['idml_pages_id'] . '.pdf' , 'F'); 
    
  3. There is now a Margin on the PDF. You can see the exact output here: output PDF Sample

  4. I then upload it to ISSUU and the output becomes like this: ISSUU output . Some of the texts are missing now.

  5. What settings should I use in ghostscript?

  6. How can I fix this issue?
  7. I also need Hyperlinks and changing the dCompatibilityLevel to 1.3 will make the hyperlinks not to work.
  8. I contacted ISSUU and seems no response so I really need to convert using ghostscript.
  9. Also tried -dCompatibilityLevel 1.7 and it's still same output.

I am using Ghostscript 9.10.

CODE USED:

"C:\Program Files (x86)\gs\gs9.10\bin\gswin32c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -sOutputFile=C:/xampp/htdocs/autoepaper/for_upload/1017abord_11599-d14.pdf C:/xampp/htdocs/autoepaper/for_upload/bord_11599.pdf
SandoMarco
  • 11
  • 3

1 Answers1

0

Which version of Ghostscript are you using ? Which settings are you using (ie what's the command line) ?

Have you questioned USSUU.com to see why you text 'becomes broken' (and what do you mean by 'becomes broken) ?

There is no way anyone can answer your questions as posed, because we don't have an example to look at, and don't know what you mean by 'broken'. Its also entirely possible that the problem lies at the other end.

KenS
  • 30,202
  • 3
  • 34
  • 51
  • Already edited my question and added more details. In really need of help. – SandoMarco Oct 17 '13 at 09:53
  • I'm afraid I know zero about PHP so the stuff in '2' is incomprehensible to me. However I don't see where Ghostscript figures in the workflow you've described. I can't download the file in '3' without signing up to some service, which I'm not prepared to do. But it looks to me like the file was fine before you uploaded it, in which case the problem is at the ISSUU end and you need to talk to them about it. From the description here I don't see anything GS can help you with. – KenS Oct 18 '13 at 07:39