Hot answers tagged

15 votes

Can QGIS preserve layers when exporting to PDF?

A short guide on producing a multi layered pdf from Qgis - Mar 2015 https://lists.osgeo.org/pipermail/qgis-user/2015-March/031206.html Below is a paraphrased version of the link above: From QGIS ...
user avatar
  • 3,627
15 votes
Accepted

Renaming non-GIS files through QGIS?

You have 2 options: 1) Using PyQGIS + OS library: [Must run QGIS as Administrator to rename files] import os #needed to replace filenames layer = iface.activeLayer() #get selected layer selection ...
user avatar
  • 2,845
13 votes

Exporting map to PDF or SVG in QGIS

If you want to export to PDF then you will need to create a composer window first. 'File'-> 'New Print Composer'. Once you have done this and have a new print composer then you can add a map. The ...
user avatar
10 votes

Adding PDF (especially GeoPDF) to ArcMap as data?

A new PDF to TIFF tool has been added to ArcGIS 10.3 for Desktop: Exports an existing PDF file to a Tagged Image File Format (TIFF). If the PDF has georeference information, the TIFF can be a ...
user avatar
  • 63.7k
9 votes
Accepted

Automating QGIS project composer printing?

Saving this in a Python file and using it in the --code arg should do what you need: from PyQt4.QtCore import * from PyQt4.QtGui import * import os from qgis.core import * from qgis.gui import * ...
user avatar
  • 33.8k
8 votes
Accepted

Exporting reduced size PDF in ArcMap?

It will possibly be a bit of testing to find what works best for you. Try adjusting your DPI down until it produces a better file size but still readable, or adjust the Raster quality down slightly....
user avatar
  • 29.2k
8 votes
Accepted

How to keep polygons detailed when exporting in QGIS?

Try setting the thickness of the borders of the polygons a bit smaller, in millimeter and maybe change the join style. If you set it too high and on bevel or rounded, the rounded factor you can set in ...
user avatar
  • 7,488
8 votes
Accepted

exportToPdf doesn't export the layout in QGIS 3

Code 4 means Could not start printing to destination device (Reference). Probably, Windows does not allow you to write files to the root directory. Make a new directory in C:, then export the layout ...
user avatar
7 votes

Can I export a pdf that renders my layers differently at different zoom levels?

Negative. Adobe Acrobat or Professional is not the program to achieve what you are trying to do. PDF's are meant to be sheets of paper on your screen, that's why they are hard to edit and reproduce. ...
user avatar
  • 4,365
7 votes
Accepted

Optimal ArcGIS PDF export compression settings for raster topographic basemaps

Considering the fact that you are exporting some raster data as well; the best technique, IMHO, is to NOT use the ArcGIS PDF exporter at all but rather export to a high resolution TIFF instead and ...
user avatar
7 votes

Can QGIS export Geospatial PDF for Avenza PDF map app?

Yes, you can make Geospatial PDF from QGIS raster maps to Avenza PDF map. If you have vector layers you can save the QGIS map to an Image (Projects > Save as Image...). Use this image as input in a ...
user avatar
  • 7,291
7 votes

Printing highly detailed and/or complex maps on large format paper?

I have not used this in more than 15 years but ArcPress still seems to be part of ArcGIS for Desktop: The ArcPress printer engine is designed to make printing large, complex maps possible on ...
user avatar
  • 63.7k
7 votes
Accepted

Batch export from multiple QGS projects to image or PDF

First try. Thanks to PyQGIS, we can call the Maps Printer plugin's functions to achieve what you want! So, having such plugin installed, adjust your own settings in Your settings section of the ...
user avatar
7 votes

Export a layered pdf in QGIS 3.0

This exact feature has not be implemented yet for the composer. However, you can export layered pdf from the canvas. You might want to follow the feature request as you will find some tips on the ...
user avatar
  • 7,488
7 votes
Accepted

Setting options in "PDF Export Options" to export an atlas to PDF using PyQGIS

Setting those options using PyQGIS requires using QgsLayoutExporter.PdfExportSettings() instance. pdf_settings = QgsLayoutExporter.PdfExportSettings() Then; For "Always export as vector" ...
user avatar
6 votes

Import PDF to QGIS

In the 3.10 version, you don't need to convert the PDF to another format. I have just imported it as a new raster layer. It works. Afterward, you must georeference this image, as per the answer above....
user avatar
  • 3,546
6 votes

Automate & set layers for PDF maps

You are describing the exact functionality of Data-Driven Pages (DDP), a built-in feature of ArcGIS. You can implement them either in a Python script or in ArcMap. If you've never used them before, I'...
user avatar
  • 12k
6 votes
Accepted

Printing to Scale only works for PDF format

A PDF file has a controlled page size that can be used by the reader app (Adobe Reader or similar) to output a set page size when printed. Image files such as TIFF, PNG, BMP etc., are not a page at ...
user avatar
  • 29.2k
6 votes

Adding vector layer to QGIS?

It looks like it is working properly. Try right-clicking a layer, then zoom to layer extent for you to view it on the map canvas to the right.
user avatar
  • 11.8k
6 votes

Batch Exporting Layouts to PDF in ArcGIS Pro using ArcPy?

This is what I use to do this. the print statement is completely unnecessary though, especially since this is run as a script tool in ArcGIS Pro. import arcpy aprx = arcpy.mp.ArcGISProject("CURRENT")...
user avatar
  • 61
6 votes
Accepted

Writing PDF Output with PyQGIS?

Here is a small example of how you could use it: projectInstance = QgsProject.instance() layoutmanager = projectInstance.layoutManager() layout_item = layoutmanager.layoutByName("test") # test is ...
user avatar
  • 613
6 votes
Accepted

Point features appear in PDF export when they shouldn't

Instead of showing the points with a size of 0, you can filter them out. In the graduated style (or any type of style), instead of choosing the val column, use the expression if (val>0, val,null) ...
user avatar
  • 34.3k
6 votes
Accepted

Keeping lines in PDF after export in QGIS 3.4?

Up and Coming QGIS 3.10 has a potential solution: "Geospatial PDFs can now be created either by exporting the main QGIS map canvas, or by creating and exporting a custom print layout. For ...
user avatar
  • 48.5k
6 votes

Saving PDF files as part of QGIS Project

This is a general challenge and not just about PDF, or even just Qgis. Other doc types necessary in a project, such as work notes about why such-n-such was done, and how to reproduce it. I'm not aware ...
user avatar
  • 27.5k
5 votes

Is it possible to georeference an existing, un-georeferenced pdf?

I know this question is old, but I had this issue recently and eventually came out with a way to do this. This can be accomplished by using Osgeo's gdal, which happens to have a PDF driver included. ...
user avatar
5 votes
Accepted

Multi MXD export excluding specific MXD using arcpy

Your problem is that you use pass which will do nothing, but jumps to the next code row. Do it like this: for mxd in arcpy.ListFiles("*.mxd"): mapdoc = arcpy.mapping.MapDocument(r"D:\desktop\...
user avatar
5 votes
Accepted

How to link pdf to a shapefile?

When you created the action, make sure to use the button "update" action. I have a simple example in this video how to add actions: https://youtu.be/ONVB_lDt2O8
user avatar
  • 2,494
5 votes
Accepted

ArcMap symbols exported to PDF don't draw when viewed on another computer

Make sure you have the option "Embed All Document Fonts" checked.
user avatar
  • 5,288
5 votes
Accepted

Open specific page of a PDF using QGIS actions

You can use the following Python action: import subprocess import os path_to_pdf = os.path.abspath(r'[% "path" %]') # path of your pdf file in the field path path_to_acrobat = os.path....
user avatar
  • 3,845
4 votes

Setting output parameter in Python script tool to be PDF?

Set it as a File type. You can use parameter validation to ensure the file extension is ".pdf" or as @blah238 notes, use the filter option to restrict file type to pdf.
user avatar
  • 51.8k

Only top scored, non community-wiki answers of a minimum length are eligible