PDF generated by Latex doesn't open in 100% zoom [closed] - pdf

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I created a pdf in Latex. All is well, except that I want to have the generated pdf to open at 100% zoom level by default when opened in adobe pdf reader. Currently, it is being displayed at 57%. I have also noticed other instances of pdf generated by my other Latex code being displayed at zoom levels other than 100%.
Is this just an issue with viewer or does this deviation from 100% zoom has to do something with Latex code in itself. I mean, if you change the page borders or something (or that the document type is article and not book or something else); does that effect the default zoom?

I do not remember LaTeX defaults, but for sure you can control zoom level using the hyperref package if you are not already doing so. Direct link to manual: here
\usepackage{hyperref}
\hypersetup{pdfstartview={XYZ null null 1.00}}
Please note I do not have Acrobat Reader installed on the machine I'm writing these, so don't hesitate to report if somethings wrong. Also, assuming compilation with pdflatex.

Start your code in this way if you want to compile your text either with pdflatex or latex.
Adequate it to your needs.
\RequirePackage{ifpdf}
\ifpdf
\documentclass[pdftex,letterpaper,12pt]{article}
\usepackage{lmodern}
% \usepackage{textcomp}
\else
\documentclass[dvips,letterpaper,12pt]{article}
% \usepackage[active]{srcltx} % for dvi viewers supporting source code mapping
\fi
But you may want to set the default zoom size in your viewer preferences option.
Evince viewer allows to configure the buttons of the top bar, add the scaling buttons.

You have to use the \usepackage[pdflatex]{hyperref} package, compile with pdflatex (or rubber -d) and use the hypersetup setting I put in a comment above.

Related

MS Word: Preserving vector graphics (SVG) when saving document as PDF [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Microsoft recently added SVG support to Word 2016. But when trying to save a document containing a SVG vector graphic as PDF the graphic will be converted to a raster image.
I tried to change the Image Size and Quality Options (-> "do not compress images in file" and "high fidelity") but this had no effect whats-o-ever.
My second approach was to use the "Microsoft Print to PDF"-printer but this didn't preserve the graphics either.
Is there a way to preserve the scalability of my graphics when saving to document as pdf? Is there somewhere an option in the settings that I haven't discovered yet?
If this is only a SVG issue: Which other vector graphics format will work better?
In response to your final question:
"If this is only a SVG issue: Which other vector graphics format will work better?"
For years the only vector format that Word supported was Microsoft's proprietary .emf file format. If you encounter further issues, you can always try converting your .svg to .emf. Inkscape can export as .emf, and in my experience it's a much more accurate conversion than Adobe Illustrator.
Incidentally, the workaround that Andrew posted above works by converting your clipboard data into an .emf file. However there are a few times when exporting from Inkscape directly would be preferable, for instance when you want to preserve a buffer of blank space around your graphic (using the clipboard will not select blank space).
Microsoft seems to have improved SVG support in Word. SVG vector graphics are now perfectly preserved when saving the document as PDF.
(I'm using Office version 1806)
I have Adobe Acrobat X Pro 10.1.16.13 installed, which gives me a Save as PDF file option in Word 2016 that does put the SVG graphic into the PDF file as a vector graphic.
I user Insert|Picture to get the SVG graphic files into word.
A 70K SVG file, for example, slows down the editing in Word significantly, so I put placeholder JPG or PNG graphics in the Word file until the final draft, then I replace them with SVG files as the last step before saving as PDF.
Ran into this issue today also. SVG seems to be broken in Word. One way I have found to preserve the scalability of graphics in PDF output from Word is:
Open the SVG in Inkscape
Select all and Copy to Clipboard
Using Paste Special in Word (Alt+E,S) paste it into the document as a "Picture (Enhanced Metafile)"
I believe this also works in previous versions of Word at least as far back as 2013 and 2010.
I just solved the problem by doing export directly from OneDrive online. Probably it happens because online word version is html-based and it has better treatment for svg.
I solved this yesterday and hope the answer works for you.
The graphic was cropped at first in your Word (my version is 2019)? In my case, if I insert the SVG graphics without cropping, the SVG graphic works well in PDF. While if the SVG graphic was cropped before converting to the PDF, it will collapse. It has nothing to do with the resolution.
Besides, my SVG graphics were generated by Python. If you need to crop the images to adjust the size, "Inksacpe" software is a good choice.

Photoshop color issues [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am having an issue with Photoshop where the project shows in different colors than the project in save for web preview and explorer. I like the color of it in browser but I want Photoshop to show the same!
I have looked everywhere and tried to do it how they say but there is still no fix.
EDIT:
The color on the project border is #272425 As you can see here, Photoshop is not showing it correctly..
http://www.color-hex.com/color/272425
EDIT 2:
I was messing with the "Save for web" and changed Preview to "Legacy Macintosh(No Color Management) and the preview matched the project in the canvas. Here is a screenshot of it.
i had the same issue, try this :
open a new file and check the color mode at the beginning. then open up your file again!
When you save a file it gives you various colour management profiles depending on your set up (or needs). If you save without any colour management profile then the colours will be true
May be you are using CMYK color mode. try to change it. go to image then mode and click RGB color. RGB use for displaying purpose while CMYK Mode use for Printing purpose. Since this is web site item design, select RGB Color mode.
The export for web uses sRGB. You use US Web Coated. Change your document to RGB mode and sRGB profile.
The sRGB color is the smallest RGB color space.
You typically always work in the smallest space, even if your screen allows a wider RGB.

Free tool for watching coordinates in PDF [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Is there any tool in some PDF Viewer/Editor like Acrobat, Evince, etc. where I can navigate and watch coordinates(i.e. (x,y)) of any selected point in PDF-document?
Apache PDFBox PDFDebugger 2.0.* displays PDF coordinates in the status bar. Get it here:
https://pdfbox.apache.org/download.cgi
Download the pdfbox-app-2.0.*.jar available under command line tools on above link. Then run the below command with the required file.
java -jar pdfbox-app-2.0.*.jar PDFDebugger "InputFile"
You would be able to see the coordinates by hovering the mouse on pdf page. You can select a particular page from left hand side and corresponding page will be displayed on right. Note pdf displays coordinates from lower left of the page so if you want to extract some text using these coordinates you need to subtract the y axis from the total height and then use it. In case of below example you will have to use x:47 y:(792-522)=270
The 3.0.0 version has a few extra features unrelated to this question:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-debugger/3.0.0-SNAPSHOT/
I've found that Gimp is perfect for this! It even has different units of measure, so this is my choice
To explain #michael Z's answer, I found the following works:
These steps are for paint.net, but most image manipulation programs like The Gimp should be similar:
open the pdf up in reader.
screenshot it.
paste into paint.net
choose image > flip vertical.
choose view >show rulers.
Also tick pixels.
Resize image to use inches and be 8.5 x 11 (if it's American letter) and 72 DPI.
Now use the rectangle select tool. The image is upside-down, so the upper-left of the tool is the lower-left for the .pdf and the lower right is the upper-right for the .pdf.
FYI - In Paint.Net, the bottom toolbar always shows the xy coordinates of the cursor.
It makes your eyes a bit squiffy to read documents upside-down for while, but at least you can now get a pretty good estimate of the locations on the document!
I found this description helpful too
Also good old GhostView (gv) shows coordinates.
CanOpener is a very impressive tool for working with PDF files. It operates as a plugin for Acrobat Pro - http://www.windjack.com/product/pdfcanopener/
Another option would be to use the Foxit Phantom PDF Advanced Editor which allows you to select objects and see the properties of each object.
You could use a library such as Quick PDF Library to render the image to a BMP file and then write yourself a little TOOL to scroll and zoom around the BMP file reporting back coordinated. http://www.quickpdflibrary.com - (Note : I do consulting work for Quick PDF)
I am sure you could load the PDF into Adobe Illustrator and get the current coordinates in the status bar.
Andrew
If you are trying to do this without using Acrobat Pro because it not free, here is how you can do it.
1. download and install Acrobat Pro (yes seriously)
2. activate the trial version. if you already did this, it's okay
3. once the trial is done you will lose a bunch of tools from Acrobat, but you will definitely not lose the cursor coordinate tool
here is how to use it
1. go to the main menu strip, click view, and select show/hide
2. from here you can select cursor coordinate and voilà
I use InkScape v 0.91 to map out PDF rectangles for extracting text. It can load a PDF into the canvas. Don't forget to change the measurements to inches (Ctrl-Shift-D) with the document open for the document properties. For the Page property tab set the Default Units to inches, for the Grids property tab set Grid Units to inches.
This page, PDF coordinates, explains the PDF coordinate system, and its unit of measurement.
I was looking for a tool to get the co-ordinates to use extract option available in PDFBox library. Gimp way worked well for my purpose. I opened the PDF in Gimp and set the measuring unit to points.
In case you don't want to install any heavy software for such a trivial task, you can create annotations in a xfdf file, set their location and then see which area is annotated in PDF.
You can use this template:
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<annots>
<square style="solid" width="4" color="#000000" opacity="1" creationdate="D:20190624111403Z" flags="print" date="D:20190624111403Z" page="0" rect="0,0,135,390.6" subject="ROI" title="ROI" />
</annots>
<pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" />
</xfdf>
Change the coordinates of the "rect" attribute, save the file as xfdf. Then, as you open the xfdf file in Adobe reader, the reader will ask for the location of the PDF file. Locate the PDF document, and you will see the rectangle drawn at the specified coordinates.
There is ImageMagick which is lighter than Gimp and gives you coordinates along your mouse pointer.
Adobe Reader has it.
Edit->Analysis->Geospatial Location Tool

Is it possible to embed animated GIFs in PDFs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
The community reviewed whether to reopen this question 3 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Is it possible to embed animated GIFs in PDFs? And how might I go about such a thing? are there any dangers I should be aware of?
For some more details on why I think it's a good thing and how it helps feel free to see this post. I didn't think it was appropriately well-formed enough for SE.
As an example - I'd like to put this into a description of quicksort:
(This animation is from wikimedia.)
I haven't tested it but apparently you can add quicktime animations to a pdf (no idea why). So the solution would be to export the animated gif to quicktime and add it to the pdf.
Here the solution that apparently works:
Open the GIF in Quicktime and save as MOV (Apparently it works with other formats too, you'll have to try it out).
Insert the MOV into the PDF (with Adobe InDesign (make sure to set Object> Interactive> film options > Embed in PDF) - It should work with Adobe Acrobat Pro DC too: see link
Save the PDF.
See this link (German)
I do it for beamer presentations,
provide tmp-0.png through tmp-34.png
\usepackage{animate}
\begin{frame}{Torque Generating Mechanism}
\animategraphics[loop,controls,width=\linewidth]{12}{output/tmp-}{0}{34}
\end{frame}
It's not really possible. You could, but if you're going to it would be useless without appropriate plugins. You'd be better using some other form. PDF's are used to have a consolidated output to printers and the screen, so animations won't work without other resources, and then it's not really a PDF.
You can use Tikz/pgfplots for creating animations in beamer. http://www.texample.net/tikz/examples/tag/animations/
Another possibility is LaTeX + animate package. You will need to provide the individual frames making the animation. The resulting pdf does NOT require any plugin, the animation is shown in Adobe reader
Maybe use LaTeX and try something like this
\documentclass[a4paper]{article}
\usepackage[3D]{movie15}
\usepackage{hyperref}
\begin{document}
\includemovie[
poster,
toolbar,
3Daac=60.000000, 3Droll=0.000000, 3Dc2c=0.000000 2.483000 0.000000, 3Droo=2.483000, 3Dcoo=0.000000 0.000000 0.000000,
3Dlights=CAD,
]{\linewidth}{\linewidth}{Bob.u3d}
\end{document}
where Bob3d.u3d is a sample virtual reality file I had. This works (or did) for movies, and I expect it might work for gifs too.
I just had to figure this out for a client presentation and found a work around to having the GIF play a few times by making a fake loop.
Open the Gif in Photoshop
View the timeline
Select all the instances and duplicate them (I did it 10 times)
Export as a MP4
Open up your PDF and go to TOOLS> RICH MEDIA>ADD VIDEO> then place the video of your gif where you would want it
A window comes up, be sure to click on SHOW ADVANCED OPTIONS
Choose your file and right underneath select ENABLE WHEN CONTENT IS VISIBLE
Hope this helps.
Having the ability to add small animations to a PDF (portable document format, independent of application software, hardware, and operating systems) would make it the perfect solution for making extremely useful user guides. Some text, some images, and some animations/videos, all in one file that can be read by anybody on any computer.
As of acrobat pro version x, a gif can be added under Tools > Insert from File. But the gif wont play, it only shows the first image.

Link to external application in LaTeX Beamer [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there a way to link to an external application (so that it starts) when clicking on a link in a PDF file, e.g. in a beamer class LaTeX file?
I usually use the movie command of the multimedia package to open any video, audio, image file in an external viewer. But no, it will not open programs.
\frame{
\movie[externalviewer]{Audio Title}{audio.wav}
\movie[externalviewer]{Video Title}{video.mp4}
\movie[externalviewer]{Image Title}{image.jpg}
\movie[externalviewer]{PDF Title}{doc.pdf}
\movie[externalviewer]{Gedit}{/usr/bin/gedit} % does not work
}
It is possible! The following works well with my Acrobat, involves a bit PDF hacking. Just tested it on my Mac, you have to adjust it according your platform.
Simply define the following macro
\newcommand{\LaunchBinary}[2]{%
% #1: layer name,
% #2: link text
\leavevmode%
\pdfstartlink user {
/Subtype /Link
/Border [0 0 0]%
/A <<
/F <<
/DOS (xxx)
/Unix (xxx)
/Mac (#1)
>>
/S /Launch
>>
}#2%
\pdfendlink%
}
Fix the "xxx" to maybe #1 as well or rewrite it to suit your need. Then, to add a link somewhere in the PDF called "Start" which launches "demos/1/Wave1D.app", just
\LaunchBinary{demos/1/Wave1D.app}{Start}
This works well even for beamer class. With this, I can directly launch demo apps from a fullscreen presentation. Awesome!
Note again, though, this apparently only works with Adobe Acrobat (Reader). MacOS "Preview" does not work.
I'm quite sure you can't. It's very application-dependent, system-dependent, and other-1000-things-dependent.
Afaik only url works quite well...