Decreasing the page size when saving to PDF
I created an SVG image in InkScpae. It is 1328 pixels wide.
Then I did "Save as PDF". The resulting PDF was 15 inch wide.
I need the PDF to be in the width of an A4 paper - about 8 inch.
I tried to play with the DPI setting, both while saving the PDF and in "File -> InkScape settings". I increased the DPI from 90 to 200 and to 300, but it did not change anything - the PDF is still too wide.
What can I do?
The "pixel" unity in SVG (or CSS) files is for reference only. Your image is never using actual pixels - they do not exist in vector formats such as SVG (the internal representation of Inkscape) or PDF files.
So, if you want your resulting image to be 210x297mm in size (A4), set
this size in your document (
File->Document Properties) - if you want a different aspect ratio but 210mm width, use a calculator and type the proper height in the
Custom Size box in this dialog.
And finally, if you want "1328 pixels" in an exported raster (usually PNG) export of the same artwork, pick that amount of pixels on the "Export to PNG" dialog box. Only when this export is performed do actual pixels are created - and there 1328 pixels do have any sense. If you want the resulting PNG to have 1328 pixels wide, pick that value on raster-export.
If you for some reason need to work with 1328 width units, just do all your work, and prior to export, just resize everything so that the artwork will fit in 210mm: Set the document size as above, select all objects, and resize to fit. As you are working with a vector image, there is no data-loss in doing that.