Tag Archives: pdf

Downloading PDF file with GET request okhttp error

Questions: fellow community! So I have this simple request using Retrofit 2 @Headers(“Content-Type: application/pdf”) @GET(“endpoint/download/{id}”) Call<ResponseBody> downloadPdf(@Header(“Authorization”) String accessToken, @Path(“id”) int id); I’ve laso tried to add @Streaming annotation Which should trigger web server and start download I am always getting error HTTP FAILED: java.io.IOException: unexpected end of stream on Connection{server_ip_here , proxy=DIRECT@ hostAddress=/server_ip_address cipherSuite=none… Read More »

TCPDF/TCPDI Variable not printing in merged document

Questions: I’ve tried a few different things and can’t seem to figure out why this isn’t working. This prints a page number at the bottom of the merged document. Example: If the last name is Smith, it should say Smith POL 0001. However, it’s not printing the last name… it just says POL 0001. The… Read More »

Ionic InAppBrowser PDF iOS no back Button

Questions: I created an app in Visual Studio Code using Cordiva, Ionic and Angular. I can request some json files from my server and in this json is amongst other things a pdf-file in base64 format. to show the pdf i got the InAppBrowser plugin and to display the pdf i use this code: Constructor:… Read More »

How to set equal size of element using TCPDF?

Questions: The element in the main should be equal size of all pages in the PDF output. Please see the picture below for the desired output. $this->load->library(“Pdf”); $pdf = new Pdf($orientation, ‘mm’, $papersize, true, ‘UTF-8’, false); $pdf->SetCreator(PDF_CREATOR); $pdf->setHtmlHeader($this->input->post(‘htmltopdfheader’)); $pdf->setHtmlFooter($this->input->post(‘htmltopdffooter’)); $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, ”, PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, ”, PDF_FONT_SIZE_DATA)); $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); $pdf->SetMargins(10, 77.5, 10); $pdf->SetHeaderMargin(2); $pdf->SetFooterMargin(80); $pdf->SetAutoPageBreak(TRUE, 80); $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); $pdf->AddPage();… Read More »

TCPDF: getimagesize(): SSL operation failed with code 1 error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Questions: I’ve been using TCPDF. In my local machine, TCPDF works fine, but it throws an error in the actual server. The error message is as follows. Message: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed Message: getimagesize(): Failed to enable crypto getimagesize(http:/test.com/images/sample.jpg): failed to open stream: operation failed… Read More »

Flying Saucer – HTML to PDF and Licensing (iText)

Questions: I’m writing code to convert HTML to PDF, which includes the following 2 dependencies: <dependency> <groupId>org.xhtmlrenderer</groupId> <artifactId>flying-saucer-core</artifactId> <version>9.1.6</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.xhtmlrenderer</groupId> <artifactId>flying-saucer-pdf-itext5</artifactId> <version>9.1.6</version> <scope>compile</scope> </dependency> I have it working. And the only way I can see to do this is using the ITextRenderer. Unfortunately, it looks like this is iText 5, which requires… Read More »

Automate OCR reading for pdf, php

Questions: Hi I need to get the information on a pdf, which comes through an API that “prints it” The pdf is the SFHDF (this is an eg https://www.fema.gov/media-library-data/20130726-1438-20490-8829/086_0_32.pdf) The problem is that the checkboxes are not being read by most of the tools that I tried, pdftotext obviously was a waste of time, all… Read More »