Computing desk
< January 19 << Dec | January | Feb >> January 21 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


January 20

Trying to convert a PDF symbol of a document to a display of a picture[edit]

as it shows in the above photograph, in What'sApp. Ignore the the Hebrew language text in it, since it doesn't matter. In the upper part of the photograph there's the PDF symbol of the document, in red, and in its lower part there's the actual photograph received from the symbol (done by someone else). I'm trying to figure out how the conversion is done. I know it's to do with a short & simple step, involving screensaving, but don't see how exactly. Thanks, בנצי (talk) 12:54, 20 January 2020 (UTC)[reply]

Your question is unclear. Are you asking how to add a screenshot to a PDF document? Or are you asking how What'sApp displays PDF documents? Or something else? NonmalignedNations (talk) 13:31, 20 January 2020 (UTC)[reply]
Let's make it simpler: I've a PDF document > send it as an SMS on What'sApp > it appears as in the upper part of the attached photograph, namely as a red symbol. Now, my problem is getting it as a picture, the way it's shown in the lower part of the above mentioned photograph, but don't know how to do it. I hope it's clearer now. בנצי (talk) 13:55, 20 January 2020 (UTC)[reply]
I don't think you can. Basically, you're asking how to have the document show with a thumbnail or preview. I don't think PDFs provide for that. For example, on my Windows 10 machine, I can switch view in Windows Explorer to show thumbnails. For items such as images, videas, and PowerPoint presentations, tiny previews get generated. But for most other file types, including PDFs, that doesn't happen; you only see the generic symbol. Most PDFs are text heavy, so there is little demand for the ability to generate thumbnails since few people could read them anyway. Matt Deres (talk) 20:00, 20 January 2020 (UTC)[reply]
Added after 'edit conflict': I don't understand, though what you say is clear. You ignore what the photograph I uploaded here shows. Someone, who received my message (the one on the top of the photograph), somehow transformed it to the actual picture of the document, shown in his answer below my message. Since I don't have any contact with him, I'm left with the quiz. בנצי (talk) 21:02, 20 January 2020 (UTC)[reply]
Possibly if the PDF file consists of one image only (which can include an image of text) but no actual text, What'sApp might choose to display a thumbnail. Give it a try. NonmalignedNations (talk) 20:44, 20 January 2020 (UTC)[reply]
Maybe you're right if I understand what you say. It does consist one image only. Well. How do I get further ? How to give it a try ? בנצי (talk) 21:05, 20 January 2020 (UTC)[reply]
You would get whatever you want displayed on the screen, then use the Print Screen button on the keyboard (to the right of the function keys on a standard desktop keyboard). Then go into Microsoft Paint or equivalent, and click on the Paste menu option. The full image should display. From there you can trim the image and save it. Then, within the PDF editor, import the image. NonmalignedNations (talk) 21:48, 20 January 2020 (UTC)[reply]
Perhaps the second one is not a simple PDF but rather a webpage with a PDF in it? Matt Deres (talk) 16:06, 21 January 2020 (UTC)[reply]
I think we should start with the basics here. Does the 2nd one even seem like a PDF? In other words, if you click on it, does it actually open a PDF in a PDF viewer? It looks to me like it could just be an image. BTW, when you're done here, you probably should ask for that image to be deleted. I suggest in future you upload to image sharing sites like ImgUr. I see 2 comments in there that could be protected by copyright. Then there's the image of the PDF which I'm not sure is your own work. Nil Einne (talk) 07:54, 22 January 2020 (UTC)[reply]
Thanks. On the technical side: I'll check what you say later. On what looks private: they're mine, otherwise I wouldn't have uploaded them. I'm aware to that. The comments are technical in nature, and are mine, as well as the picture. The tip regarding ImgUr is a good idea for future necessity. בנצי (talk) 10:08, 22 January 2020 (UTC)[reply]
בנצי, open PDF document on the device, then screenshot your device (ios android). Save to your photos, in the whatsapp conversation send an image and pick it from wherever you saved it. —TheDJ (talkcontribs) 10:40, 22 January 2020 (UTC)[reply]
and that's not an 'good' / 'official' way to convert a pdf to an image, but it is super quick and works very well on most modern mobile devices. If you are looking for a desktop method to do it properly, or a technical method to do it for hundreds of them at the same time or something, then please indicate what it is that you are trying to achieve. —TheDJ (talkcontribs) 10:42, 22 January 2020 (UTC)[reply]

Reading parameter value in Angular[edit]

At work, I'm developing an ASP.NET Core web application that uses Angular on the front end, embedded in the HTML. The Angular code needs to read a parameter value in the ngOnInit() method when the page containing the Angular code is loaded. All works OK when I use an HTTP GET request, because then the parameter value is in the URL and Angular can get it from queryParams. But when I use HTTP POST, the parameter value is not in the URL at all. The ASP.NET Core controller knows the parameter value, but how can I pass it to Angular? Would it work to write it on the rendered HTML page as a hidden field and have Angular somehow access the page DOM in ngOnInit()? Can I use jQuery or just plain JavaScript to retrieve it? JIP | Talk 19:51, 20 January 2020 (UTC)[reply]